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

Visual Regression tests: use default playwright utils #47991

Merged
merged 2 commits into from
Feb 12, 2023

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Feb 11, 2023

What?

Closes #47988

Use PlayWright default test and expect utils for Visual Regression tests running on Storybook stories.

Why?

This fixes an issue introduced by #46459, where Visual Regression tests would timeout indefinitely. This is caused by the fact that utils from the '@wordpress/e2e-test-utils-playwright' package would assume that the e2e would load the editor.

How?

Since Visual Regression test don't seem to need any of the additions introduced by '@wordpress/e2e-test-utils-playwright', switching to the default versions from PlayWright seems the correct fix.

Testing Instructions

  • npm run distclean && npm ci

  • In two separate tabs:

    • First run npm run storybook:e2e:dev
    • Once storybook has launched, in a separate tab run npm run test:e2e:storybook -- --update-snapshots
  • Make sure that tests don't time out

  • Make sure that the generated snapshot images are gitignored

@ciampo ciampo added [Type] Bug An existing feature does not function as intended [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. labels Feb 11, 2023
@ciampo ciampo self-assigned this Feb 11, 2023
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM 👍

✅ Make sure that tests don't time out
✅ Make sure that the generated snapshot images are gitignored

The failure of the E2e test should not be an effect of this PR.

@ciampo ciampo merged commit b019306 into trunk Feb 12, 2023
@ciampo ciampo deleted the fix/visual-regressions-tests-config branch February 12, 2023 10:00
@github-actions github-actions bot added this to the Gutenberg 15.2 milestone Feb 12, 2023
@ciampo ciampo added the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Feb 12, 2023
ntsekouras pushed a commit that referenced this pull request Feb 13, 2023
* Visual Regression tests: use default playwright utils instead of custom wordpress utils

* Add new snapshot dir to gitignore
@ntsekouras
Copy link
Contributor

I just cherry-picked this PR to the wp/6.2 branch to get it included in the next release: 80aaf64

@ntsekouras ntsekouras removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local visual regression test time out
3 participants