-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Migration from PhantomJS to Headless Chrome #2534
Migration from PhantomJS to Headless Chrome #2534
Conversation
I was reading the commit messages and found out you're following some kind of pattern. Following the rules and conventions of the codebase you're working on it's always the best idea, please rebase them. It's not only about the header line, also about the lack of body description Some resources to learn about good commit messages:
|
a44e572
to
f8efc1d
Compare
Rebased commits, @bertocq. Added description to only 2 commits as the commit messages alone were not descriptive enough. |
5408ec6
to
1f09d0f
Compare
As today (16/03/2018), the migration from PhantomJS/Poltergeist to Headless Chrome/Selenium is 100% complete 🎉 |
4644339
to
3332d5e
Compare
JS modals/browser alerts are not automatically accepted now with Selenium, events that trigger such events must be wrapped in one of the following methods: `accept_alert`, `accept_confirm` or `dismiss_confirm`
Advanced search scenarios for Budget::Investments, Debates and Proposals need proper date formatting as they behave unexpectedly when APIs such as `7.days.ago` are used
The now-deprecated `.trigger('click')` API simulated a click against the DOM rather a click on the UI, which made our tests fragile and wouldn't simulate actual user interaction
The example tests if a certain selector is hidden after adding one image but the assertion expected said selector to be visible, which made the scenario to fail at random
3bf3062
to
257a338
Compare
Awesome @aitbw! 👏🎉 |
This is not working locally at macos as running a single spec (or multiple) throws errors like:
Should we include any tips/guidelines at readme file to make this work? |
Oh sorry about that @bertocq! On Mac OS you need to run I'll be updating the consul/docs later today with all this information |
Not necessary since test suite is using Headless Chrome for E2E integration tests since PR consuldemocracy#2534
Not necessary since test suite is using Headless Chrome for E2E integration tests since PR consuldemocracy#2534
References
Related issues: Improve test suite, move away from PhantomJS #2523, flaky specs-related issues @ consul/consul and flaky specs-related issues @ AyuntamientoMadrid/consul —closes Improve test suite, move away from PhantomJS #2523 once merged into
master
Related PRs: flaky specs-related PRs @ consul/consul and flaky specs-related PRs @ AyuntamientoMadrid/consul
Related links:
Objectives
Notes
Just one spec outside of the scope of this PR is failing and it's already fixed at Fixrake db:dev_seed
task flaky spec #2522xscenario
to this spec, as it fails randomly (apparently it can't find the browser's alert so it can't accept it —the feature works as expected, though.)To do
There are some failing specs that used to work with PhantomJS/Poltergeist because of poor CSS support and poorly implemented specs —here they areApparently, this spec (which is based on this one) is the last flaky remaining —it has failed just once in more than 20 Travis builds; I'll be monitoring this one closelyThis spec works with the
window-size=1200,600
argument forchromeOptions
or with any resolution if theheadless
flag is removed —while this doesn't affect any other scenarios, it'd be nice to refactor this test for it to work with and without the flagThis spec works when the
fill_in
steps are reordered to be first —that's because the banner reloads when the elements for customization are out of focus. This gives us room for improvement for this module so we can implement actual live reloadSince Decide Madrid has a bigger codebase / test suite, this PR can't be ported straight away —a different pull request is needed to keep the migration as smooth as possible
Update CONSUL docs accordingly