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

Clear fields in tests before filling them in #4456

Merged
merged 2 commits into from
Apr 12, 2021
Merged

Conversation

javierm
Copy link
Member

@javierm javierm commented Apr 1, 2021

References

Background

There seems to be an issue with capybara or chromedriver which results in fill_in sometimes appending to an input rather than overwriting, causing some tests to fail under certain circumstances.

Objectives

  • Add a workaround to avoid flaky specs caused by filling in a field the wrong way

Notes

We're getting warnings on all tests using the rack driver. I haven't found a way to avoid the clear: :backspace option in non-JavaScript tests, so to avoid the annoying warnings we should reduce the number of tests using the rack driver even more.

@javierm javierm self-assigned this Apr 1, 2021
@javierm javierm added this to Reviewing in Consul Democracy via automation Apr 1, 2021
@javierm javierm force-pushed the browser_tests branch 2 times, most recently from 07bc106 to 8c46110 Compare April 2, 2021 14:37
@javierm javierm force-pushed the clear_backspace branch 2 times, most recently from 740246d to a5dd247 Compare April 2, 2021 20:09
@javierm javierm force-pushed the browser_tests branch 4 times, most recently from 2b123b5 to 5f5ef3e Compare April 7, 2021 12:41
Base automatically changed from browser_tests to master April 7, 2021 12:56
There seems to be an issue with capybara or chromedriver which results
in `fill_in` sometimes appending to an input rather than overwriting
[1], causing some tests to fail under certain circumstances.

Clearing fields before filling them in solves the issue.

Note we're now getting warnings on all tests using the rack driver. I
haven't found a way to avoid the `clear: :backspace` option in
non-JavaScript tests, so to avoid the annoying warnings we should reduce
the number of tests using the rack driver even more.

[1] See issue 2419 in https://github.com/teamcapybara/capybara/issues
Even after the previous changes, this test is still failing sometimes
(although now it fails for a different reason). We're doing this change
in order to discard it as the reason why the test is failing.
Consul Democracy automation moved this from Reviewing to Testing Apr 12, 2021
@javierm javierm merged commit cc5bdef into master Apr 12, 2021
Consul Democracy automation moved this from Testing to Release 1.3.0 Apr 12, 2021
@javierm javierm deleted the clear_backspace branch April 12, 2021 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants