-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add E2E tests for 'Import widget area' button #47131
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
|
||
// Verify that the widget area was imported. | ||
await expect( | ||
editor.canvas.locator( '[data-type="core/search"]' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: we can also do editor.getBlocks()
and assert the array structure. See this guide for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I was actually looking for that helper but couldn't find it.
In any case it doesn't help us here because the blocks we care about are within the template part entity and so not returned by select( 'core/block-editor' ).getBlocks()
.
Size Change: 0 B Total Size: 1.33 MB ℹ️ View Unchanged
|
Flaky tests detected in 112b8f3. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3908162999
|
@noisysocks, I've noticed these tests fail a few times. I've no idea why they're not reported as "Flaky Tests", but here're examples: |
What?
Adds some basic E2E tests for the 'Import widget area' button added in #45509.
Why?
Anything to do with widgets tends to get forgotten about and break 😀. E2E tests, even simple ones, help catch regressions.
Testing Instructions
npm run test:e2e:playwright