5
11
Fork
You've already forked tomato
1

Switch to firefox to drive browser tests #142

Merged
edwardloveall merged 1 commit from el-firefox into main 2026年04月14日 22:25:50 +02:00

We were having some tests flake when using chrome and chromedriver. For example,
spec/system/pages_spec.rb was often failing with:

Failure/Error: visit root_path
Net::ReadTimeout:
 Net::ReadTimeout with #<TCPSocket:(closed)>

This is a bug in chrome/chromedriver, documented here in the capybara repo:
https://github.com/teamcapybara/capybara/issues/2770

I also tried cuprite, but something between it and
capybara_accessible_selectors is incompatible. I'd rather use Firefox instead of giving up capybara_accessible_selectors.

Switching to firefox/geckodriver as the browser to test with, I was unable to
get the same test to fail, whereas with chrome it would fail pretty easily
(maybe 50% of the time or more).

Two changes were needed to use firefox. First, date inputs are in the format of
yyyy-mm-dd not mm-dd-yyyy. Second, times don't have AM/PM; e.g. 06:30 instead
of 06:30AM.

I also ignored a deprecation warning that capybara has yet to fix to prevent
lots of warnings while running tests:
https://github.com/teamcapybara/capybara/issues/2779#issuecomment-2493919716

We were having some tests flake when using chrome and chromedriver. For example, spec/system/pages_spec.rb was often failing with: ``` Failure/Error: visit root_path Net::ReadTimeout: Net::ReadTimeout with #<TCPSocket:(closed)> ``` This is a bug in chrome/chromedriver, documented here in the capybara repo: https://github.com/teamcapybara/capybara/issues/2770 I also tried [cuprite](https://github.com/rubycdp/cuprite), but something between it and [capybara_accessible_selectors](https://github.com/citizensadvice/capybara_accessible_selectors) is incompatible. I'd rather use Firefox instead of giving up capybara_accessible_selectors. Switching to firefox/geckodriver as the browser to test with, I was unable to get the same test to fail, whereas with chrome it would fail pretty easily (maybe 50% of the time or more). Two changes were needed to use firefox. First, date inputs are in the format of yyyy-mm-dd not mm-dd-yyyy. Second, times don't have AM/PM; e.g. `06:30` instead of `06:30AM`. I also ignored a deprecation warning that capybara has yet to fix to prevent lots of warnings while running tests: https://github.com/teamcapybara/capybara/issues/2779#issuecomment-2493919716
Switch to firefox to drive browser tests
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
201198d383
We were having some tests flake when using chrome and chromedriver. For example,
spec/system/pages_spec.rb was often failing with:
```
Failure/Error: visit root_path
Net::ReadTimeout:
 Net::ReadTimeout with #<TCPSocket:(closed)>
```
This is a bug in chrome/chromedriver, documented here in the capybara repo:
https://github.com/teamcapybara/capybara/issues/2770
Switching to firefox/geckodriver as the browser to test with, I was unable to
get the same test to fail, whereas with chrome it would fail pretty easily
(maybe 50% of the time or more).
Two changes were needed to use firefox. First, date inputs are in the format of
yyyy-mm-dd not mm-dd-yyyy. Second, times don't have AM/PM; e.g. `06:30` instead
of `06:30AM`.
I also ignored a deprecation warning that capybara has yet to fix to prevent
lots of warnings while running tests:
https://github.com/teamcapybara/capybara/issues/2779#issuecomment-2493919716 
edwardloveall changed target branch from el-gem-updates to main 2026年04月14日 22:14:26 +02:00
jsilasbailey left a comment
Copy link

👍 disappointing that cuprite doesn't work with accessible selectors since that seems to be the route that most people take. Fixing the flake is worth a ton though!

👍 disappointing that cuprite doesn't work with accessible selectors since that seems to be the route that most people take. Fixing the flake is worth a ton though!
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rootable/tomato!142
Reference in a new issue
rootable/tomato
No description provided.
Delete branch "el-firefox"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?