Strict mode violation in saveSiteEditorEntities
when using @wordpress/e2e-test-utils
#69042
Open
4 of 17 tasks
Labels
[Tool] E2E Test Utils
/packages/e2e-test-utils
[Type] Bug
An existing feature does not function as intended
Description
The
saveSiteEditorEntities
function in @wordpress/e2e-test-utils-playwright is causing flaky tests due to a strict mode violation when multiple snackbar notifications appear simultaneously. This affects multiple test suites in the WooCommerce repository and beyond.Affected test suites
WooCommerce
Gutenberg
Example error message from #49353:
The strict mode violation originates from
gutenberg/packages/e2e-test-utils-playwright/src/editor/site-editor.ts
Lines 50 to 54 in 047fdac
Proposed solution
To ensure consistent behaviour when multiple notifications are present, explicitly select the first matching notification:
Benefits of this proposed solution
Step-by-step reproduction instructions
See the error messages of the failing e2e tests in
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: