Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Playwright for visual testing #145

Merged
merged 9 commits into from
Jan 31, 2024
Merged

Switch to Playwright for visual testing #145

merged 9 commits into from
Jan 31, 2024

Conversation

robintown
Copy link
Member

@robintown robintown commented Jan 27, 2024

Following the lead of Element Web, I propose we switch to using Playwright for visual testing, rather than Percy. (Context: Percy has been non-functional on this repository for months since we kept going over our billing limits.) This means that screenshots will now be stored directly in this repository as Playwright snapshots, which should be a much more cost-effective solution.

Note that this change also includes a couple of fixes for broken stories that the tests caught (yay!) The "Kitchen Sink" form stories were crashing due to lack of a TooltipProvider, and the search component was rendering inconsistently on dev vs. production builds due to bits of CSS being emitted in a different order.

Closes element-hq/compound#278

@robintown robintown requested a review from a team as a code owner January 27, 2024 20:56
@robintown robintown requested review from dbkr and t3chguy and removed request for a team January 27, 2024 20:56
Copy link

cloudflare-workers-and-pages bot commented Jan 27, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: bad5576
Status: ✅  Deploy successful!
Preview URL: https://0aedd2fe.compound-web.pages.dev
Branch Preview URL: https://playwright.compound-web.pages.dev

View logs

Following the lead of Element Web, I propose we switch to using Playwright for visual testing, rather than Percy. (Context: Percy has been non-functional on this repository for months since we kept going over our billing limits.) This means that screenshots will now be stored directly in this repository as Playwright snapshots, which should be a much more cost-effective solution.

Note that this change also includes a couple of fixes for broken stories that the tests caught (yay!) The "Kitchen Sink" form stories were crashing due to lack of a TooltipProvider, and the search component was rendering inconsistently on dev vs. production builds due to bits of CSS being emitted in a different order.
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

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

Looks generally sane, you should probably include a Docker command for updating the snapshots for those not on Linux, otherwise you're going to make it difficult for contributors

@robintown robintown removed the request for review from dbkr January 30, 2024 23:39
@robintown robintown merged commit 1226032 into main Jan 31, 2024
6 checks passed
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.

Consider alternatives for visual snapshot testing
2 participants