Repository navigation
Reset browser test sessions on Chrome 158 - #356
Merged
Merged
Conversation
Signed-off-by: Hampton Lintorn-Catlin <hampton@squareup.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Chrome 158 rejects the wildcard origin Capybara 3.40 uses to clear browser data between tests. A passing test can then fail during cleanup, as happened on both browser matrices in #338.
When Chrome reports this specific reset error, the test driver closes its temporary profile. The next browser starts with the configured desktop window size and fresh storage. Other reset errors still surface. On affected versions, the next test pays the cost of starting Chrome again.
Evidence
On Chrome for Testing 158.0.8127.88, the regression failed at
page.reset!withinvalid argument: * is not a valid URLbefore the fix. After the fix, the same test confirmed that the cookie and local-storage value disappeared and the window kept its configured size. It also passed on Chrome 150.0.7871.124.How to try it
With the test database configured, use Chrome 158 for Testing and run
bundle exec rspec spec/system/browser_session_reset_spec.rb. Expect one passing example.Testing
bundle exec rspec spec/system/browser_session_reset_spec.rb spec/system/browser_synchronization_spec.rb spec/system/voice_commenting_spec.rb:458 spec/system/comment_composer_spec.rb:471.Generated with Codex