Skip to content

Fix Capybara screenshots in feature specs#6753

Merged
murugapl merged 1 commit intonextfrom
fix-capybara-screenshots
May 1, 2026
Merged

Fix Capybara screenshots in feature specs#6753
murugapl merged 1 commit intonextfrom
fix-capybara-screenshots

Conversation

@floehopper
Copy link
Copy Markdown
Contributor

@chrislo & I accidentally removed the screenshotting capability in #6669 at the same time as we removed the redundant configuration for running feature specs in a browser using the cuprite driver, because we were under the mistaken impression that rack-test driver did not support screenshots.

As @murugapl & @misaka pointed out, capybara-screenshot does actually support HTML screenshots when using rack-test. These screenshots are improved by setting Capybara.asset_host = "http://localhost:4000" so that assets can be loaded if you have the Rails app running locally.

This commit partially reverts this commit to restore the screenshotting behaviour.

@floehopper floehopper requested a review from a team as a code owner April 30, 2026 17:24
@floehopper floehopper force-pushed the fix-capybara-screenshots branch from d18d515 to 375fc0b Compare April 30, 2026 17:34
Copy link
Copy Markdown
Collaborator

@misaka misaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@floehopper floehopper force-pushed the fix-capybara-screenshots branch from 375fc0b to c5aefae Compare May 1, 2026 06:01
@murugapl murugapl force-pushed the fix-capybara-screenshots branch from c5aefae to f4b511e Compare May 1, 2026 16:08
@murugapl murugapl enabled auto-merge May 1, 2026 16:08
@chrislo & I accidentally removed the screenshotting capability in #6669 at the
same time as we removed the redundant configuration for running feature specs
in a browser using the cuprite driver, because we were under the mistaken
impression that rack-test driver did not support screenshots.

As @murugapl & @misaka pointed out, capybara-screenshot does actually support
HTML screenshots when using rack-test. These screenshots are improved by
setting `Capybara.asset_host = "http://localhost:4000"` so that assets can be
loaded if you have the Rails app running locally.

This commit partially reverts this commit [1] to restore the screenshotting
behaviour.

[1]: 0a95de7
@murugapl murugapl force-pushed the fix-capybara-screenshots branch from f4b511e to 4446df0 Compare May 1, 2026 16:39
@murugapl murugapl merged commit 107270c into next May 1, 2026
16 checks passed
@murugapl murugapl deleted the fix-capybara-screenshots branch May 1, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants