fantoccini icon indicating copy to clipboard operation
fantoccini copied to clipboard

Expand all docs to have examples (including HTML)

Open jonhoo opened this issue 6 years ago • 6 comments

I'd like all the methods we provide to have doctests, and ideally to also give the HTML that they are operating over. I'd be happy to alos host those HTML snippets somewhere so that we don't have all the tests use wikipedia.org (which could also change).

It's a little sad that we need to disable these tests by default. We should probably get phantomjs or slimerjs running on travis so that it can run all the test cases too!

/cc @Phrohdoh

jonhoo avatar May 06 '18 19:05 jonhoo

In fact, for running doctests, we should probably use one of the techniques suggested by Travis here: https://docs.travis-ci.com/user/gui-and-headless-browsers/

jonhoo avatar May 06 '18 19:05 jonhoo

Agreed that this is a good thing to do! Perhaps we could make use of a gh-pages branch with HTML that we'll test against.

phrohdoh avatar May 06 '18 19:05 phrohdoh

Oh, yeah, that's a good idea. What we might actually want to do is use a free @saucelabs' open-source plan to run all the tests: https://saucelabs.com/open-source.

jonhoo avatar May 06 '18 20:05 jonhoo

I've sent them an e-mail.

jonhoo avatar May 06 '18 20:05 jonhoo

FWIW, this will likely depend on #18, since that's how you indicate to @saucelabs what backend to use.

jonhoo avatar May 06 '18 20:05 jonhoo

https://github.com/jonhoo/fantoccini/commit/d2843b0f37bb5deb8b3eb25a4c8a86b99aad7348 :tada:

jonhoo avatar May 13 '18 20:05 jonhoo