Capybara slow steps - what to do ?
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem
Some feature specs are waiting 30 seconds (default max wait time) un-necessarily
Proposal
Digest https://www.cloudbees.com/blog/faster-rails-tests, and https://github.com/ngauthier/capybara-slow_finder_errors#common-fixes to find some automated way to:
- Detect these slow steps
- Fix these slow steps
/cc @alinamihaila
Discussion
-
Capybara auto-waits for certain finders / steps. e.g.
find_all,has_button? -
We cannot naively apply
wait: falseto every Capybara step. To find, and fix these requires some pre-conditions:- The previous step has already waited
- The current step does not have to wait in the success case
- The current step in the failure case will always fail deterministically (due to 1)
Links
Some example fixes:
Edited by 🤖 GitLab Bot 🤖