Skip to content
This repository was archived by the owner on Dec 18, 2019. It is now read-only.

Conversation

@diosmosis
Copy link

I was trying to see if I could get webdrivercss to work w/ the latest webdriverio. Then I realized a rewrite of webdrivercss is currently in progress, and the work was probably more than I could do in a couple of hours.

I managed to find and fix a couple bugs, though, while trying to get the instantiation.js test to pass. I figured they might be useful, so I created this PR.

Changes included:

  • Don't use the es2015 preset since it requires the generator transform. Since Babel 6, the blacklist property is no longer supported in .babelrc, so I think the only alternative is to specify manually what transforms to use.
  • In the gruntfile, the loadTasks('build') call would cause grunt to try and load tasks from the build directory. If the compiled files are in build, this causes grunt to fail.
  • Made documentScreenshot.js export it's function as the default export (this is what webdriver.css was expecting).
  • Don't require ErrorHandler directly from lib/.../ErrorHandler since this will try and load webdriverio's ES6 JS instead of the compiled JS.
  • Make sure there is an applitools key in DEFAULT_PROPERTIES since many files expect it to be there (eg, workflow.js).
  • In afterHook in bootstrap.js, don't pass a callback to browser.end() since it returns a promise now.
  • Get parts of the instantiation spec to pass. I couldn't get all of them to pass since it calls WebDriverCSS.init() multiple times (resulting in 'command already defined' errors). I believe the best way to fix this is to isolate the tests in that spec more, but I didn't want to make this PR any bigger.

If the PR requires some changes, let me know.

Benaka Moorthi added 7 commits May 30, 2016 15:31
…rm (in babel 6, the blacklist .babelrc property is no longer supported).
…e files babel outputted if files were already built (resulting in error). Also process all files in the lib folder, not just the top level files.
…erio since it will end up including the ES6 code, not the compiled code in webdriverio/build.
…ed to exist by workflow.js and other files.
…return a promise & checking properties in plugin.options instead of plugin.
@diosmosis
Copy link
Author

@christian-bromann don't want to create any noise or be annoying, but I'd be interested in helping to get webdrivercss compatible w/ webdriver.io 4. Would it be possible for me to get involved in that effort?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant