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

Merged
merged 3 commits into from
Dec 25, 2019
Merged

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

merged 3 commits into from
Dec 25, 2019

Conversation

kiaking
Copy link
Member

@kiaking 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)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member Author

kiaking commented Nov 26, 2019

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

@kiaking
Copy link
Member Author

kiaking commented Nov 26, 2019

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

@kazupon
Copy link
Member

kazupon commented Nov 26, 2019

@kiaking
vue-i18n nightwatch.conf.js might help you. 😎
https://github.com/kazupon/vue-i18n/blob/dev/config/nightwatch.conf.js#L47-L56

@kiaking
Copy link
Member 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
Copy link
Member 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...

@kiaking
Copy link
Member Author

kiaking commented Dec 24, 2019

@ktsn Oh hi! What do you think about this?

Copy link
Member

@ktsn ktsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ktsn ktsn merged commit a1af9b1 into vuejs:dev Dec 25, 2019
@kiaking kiaking deleted the 1647-remove-phantomjs-from-e2e-test branch December 25, 2019 08:27
@vue-bot
Copy link

vue-bot commented Dec 25, 2019

Hey @kiaking, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚

vaga pushed a commit to vaga/vuex that referenced this pull request Apr 20, 2020
…driver (vuejs#1648)

* Remove PhantonJS from E2E test, and use Chrom Headless Webdriver

* Update Nightwatch

* Optimise Nighteatch config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants