-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Local visual regression test time out #47988
Comments
@WunderBart @kevin940726 and @t-hamano , could you help with this one? I'm not as well versed as you may be in Playwright. Tests in Thank you! |
@bph we may want to delay advertising local visual regression testing until this issue isn't ironed out |
I think diff --git a/test/storybook-playwright/specs/font-size-picker.spec.ts b/test/storybook-playwright/specs/font-size-picker.spec.ts
index 6aa11e8926..c2f6fc3580 100644
--- a/test/storybook-playwright/specs/font-size-picker.spec.ts
+++ b/test/storybook-playwright/specs/font-size-picker.spec.ts
@@ -1,7 +1,7 @@
/**
- * WordPress dependencies
+ * External dependencies
*/
-import { test, expect } from '@wordpress/e2e-test-utils-playwright';
+import { test, expect } from '@playwright/test'; Also, this may be an issue in my environment, but the Storybook now only shows components that include E2E testing 🤔 |
That seems to solve it! I'm not sure if there are any implications, but if we ever encounter any I guess we can create a specific version of
This shouldn't be too bad, since VizReg for now is only supposed to be used locally (the snapshots should be gitignored)
That is expected, so that only e2e-focused stories are compiled and served :) You can read here for more info |
Oops, I didn't know that I agree with @t-hamano here though, the package is designed to work with a WordPress instance, we want to keep it opinionated for that specific use case. You can always just use the official |
It's a relatively recent addition that we did to help testing some changes in the components package, still a bit rough around the edges (and for now working only locally). Awesome, thank you both for the extra context 🙏 |
@bph All solved, feel free to ignore this message :) |
How to reproduce
npm run distclean && npm ci
npm run storybook:e2e:dev
npm run test:e2e:storybook -- --update-snapshots
What should happen
The snapshots are generated correctly in a few seconds
What is currently happening
The tests time out and the snapshots are not generated
How to fix it
I traced the regression back to PR #46459
Removing the
auto: true
option from this file fixes the issue:gutenberg/packages/e2e-test-utils-playwright/src/test.ts
Line 156 in 8dee3e6
PR #46459 assumed that all Playwright e2e tests in the repository load the editor, but that assumption is not correct for visual regression tests
The text was updated successfully, but these errors were encountered: