Add save_and_open_page
helper to IntegrationTest
#49267
Merged
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.
save_and_open_page
is a capybara helper that lets developers inspect the status of the page at any given point in their tests. This is helpful when trying to keep a short feedback loop while working on a test.This change adds a similar helper with a matching signature to integration tests.
20230913155205_0fccdf93e5.mp4
Motivation / Background
I have seen similar helpers defined in a number of projects in their
test_helper.rb
.I figured this would be a good candidate to upstream as we already have the same helper for system tests.
Detail
Launchy is required to automatically open the dump in a browser, but the helper still works without. Without launchy it prints a warning along with the path to the dump for manual review.
Additional information
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]