Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1647 Remove PhantomJS from E2E test, and use Chrom Headless Webdriver #1648

Open
wants to merge 3 commits into
base: dev
from

Conversation

@kiaking
Copy link
Contributor

kiaking commented Nov 19, 2019

Issue #1647

This PR removes PhantomJS from E2E test because it is not supported anymore. Instead, Chrome Headless Driver is used.

  1. Remove PhantomJS from dependency and config.
  2. Update Nightwatch and Chromedriver to the latest.
  3. Remove Selenium too, since the latest Nightwatch can handle Chromesriver without Selenium, and also it's not recommended to use Selenium (regarding the doc).
  4. Tests adjusted a little since some part wasn't working correctly. Please refer to the inline comments on this.
@kiaking kiaking changed the title #1647 Remove PhantonJS from E2E test, and use Chrom Headless Webdriver #1647 Remove PhantomJS from E2E test, and use Chrom Headless Webdriver Nov 19, 2019
@@ -20,7 +20,7 @@ module.exports = {
.assert.containsText('.cart', 'H&M T-Shirt White - $10.99 x 1')
.assert.containsText('.cart', 'Total: $1,011.01')
.click('.cart button')
.waitFor(120)
.waitFor(200)

This comment has been minimized.

Copy link
@kiaking

kiaking Nov 19, 2019

Author Contributor

I needed to change this because test was failing... Not sure why.

@@ -105,7 +105,7 @@ module.exports = {
.dblClick('.todo:nth-child(1) label')
.assert.count('.todo.editing', 1)
.assert.focused('.todo:nth-child(1) .edit')
.clearValue('.todo:nth-child(1) .edit')
deleteValue('.todo:nth-child(1) .edit', 'test2')

This comment has been minimized.

Copy link
@kiaking

kiaking Nov 19, 2019

Author Contributor

clearValue was not working. Not sure why but after clearValue, 2 todos was removed before setValue. So I'm guessing clearValue is emitting blur event or something...

So, I went ahead and created deleteValue function which will input "backspace" and deletes value. If this is the only workaround we have at the moment, I would like to extract that into a custom command so that we can do browser.deleteValue. Ref: Custom Command Doc

@kiaking

This comment has been minimized.

Copy link
Contributor Author

kiaking commented Nov 26, 2019

Updated Nightwatch to the latest version. Though it didn't fix clearValue problem 🤔

@kiaking

This comment has been minimized.

Copy link
Contributor Author

kiaking commented Nov 26, 2019

Hmmm... no idea why test is failing on circleci...

@kazupon

This comment has been minimized.

Copy link
Member

kazupon commented Nov 26, 2019

@kiaking

This comment has been minimized.

Copy link
Contributor Author

kiaking commented Nov 26, 2019

@kazupon Ohhhh what the hell is that headless option lol Thanks a lot! I'll try that and see how it goes!

@kiaking

This comment has been minimized.

Copy link
Contributor Author

kiaking commented Nov 26, 2019

OK I've optimized the Nightwatch config and circleci is padding, though I think it had nothing to do with it. Perhaps timing issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.