Support for phantomjs 2.0.0 and 2.0.1 pre-release with fileupload bugfix #1352
Conversation
Removed patchRequire() as it is no longer needed for 2.x Removed coffeescript tests as v2.x removed support Removed custom bind implementation as v2.x implements this Switched from phantom.args to system.args as v2.x deprecated the former
isJsFile now checks require.extensions (minus json) to determine valid javascript extensions Modified tests so that they accomodate engines (PhantomJSv2) that don't support coffeescript
system is no longer exposed as a global variable phantom.args has been deprecated with PhantomJS v2.x system.args is available with all supported engine versions
Version check now checks based on the engine in use This will allow SlimerJS to work when it reaches v1.0.0
Add `CASPERJS_ENGINE` environment variable * The `--engine=` flag takes priority over this Add `ENGINE_EXECUTABLE` environment variable * Engine specific env vars take priority over this Add PhantomJS version 2.0.0 Add SlimerJS version 0.9.6
Fix new engine URLs (Phantom v2.0.0 and Slimer v0.9.6) Launchers now utilize the `ENGINE_FLAGS` env variable Travis no lnger appends `ENGINE_FLAGS` to `ENGINE_EXECUTABLE`
ENGINE_EXECUTABLE should now be used by make This will most likely cause other tests to fail
Travis treats each element as one line, so semicolons are needed
Added `event` as an argument to `window.oncontextmenu` This works in Phantom because Webkit assumes an `event` var by default. Running `window.oncontextmenu = function() { event.preventDefault(); }` in Chrome prevents opening the context menu on a page, where Firefox would throw the error: `event is not defined`. Fixed some formatting
Changing from 'name' to 'username' variable fixed this. window.name defaults to an empty string in Firefox and it seems to be reset by the time Casper is able to access it in an `evaluate` call.
You could also user a min, maxVersion and test.skipIfEngine(nb, {name: "phantomjs", {min: "*", max: "1.9.0"}}) |
Hopefully addressed all changes @n1k0 mentioned. Introduced (Edit: ...and at least issue a 1.1-beta4 that contains 2.0.0 support to allow for broader testing.) Please review (build passes). |
@istr would you consider possible that CasperJS |
@paazmaya To be honest I don't really care much about versioning policy. From what I gather in the old issues marked milestone 2.0.0 and marked milestone 1.1 and from the discussion threads I read, the current setup is as follows:
That is from my understanding:
In short: I don't see that the CasperJS jump from major 1.* to major 2.* has to be coupled to phantomjs2 support, but should reflect a major change within CasperJS itself (which phantomjs2 support definitely isn't). So to not slow down things I would prefer to proceed along these lines:
The only thing that matters for me (and possibly most others waiting for phantomjs2 support) is to get out a next publicly available beta ready for testing as fast as possible. |
@istr very well argumented. Let's make |
@hexid may you do the honour? |
It looks like everything @n1k0 mentioned was fixed. |
Everything looks good to me. I couldn't find an issue that documents that the SlimerJS clitests are being skipped. |
Merging |
Support for phantomjs 2.0.0 and 2.0.1 pre-release with fileupload bugfix
👏 🎆 |
🍇 and 🍷 ! |
@hexid Nice, thanks a lot! Will close the issues PRs that are superseded now. Let's see how to proceed with the next beta and what open 1.1 issues to include. |
Thanks to everybody involved in achieving this and for the huge help provided. The project owes you many beers. |
This PR contains:
This closes / supersedes #1310, #1137, #1173, #1291, #1189, #1351, https://github.com/n1k0/casperjs/issues/1204, #775.