Clear fields in tests before filling them in
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
This commit is contained in:
@@ -47,6 +47,7 @@ end
|
||||
|
||||
Capybara.exact = true
|
||||
Capybara.enable_aria_label = true
|
||||
Capybara.default_set_options = { clear: :backspace }
|
||||
Capybara.disable_animation = true
|
||||
|
||||
OmniAuth.config.test_mode = true
|
||||
|
||||
Reference in New Issue
Block a user