Migrate remaining Link UI tests to Playwright#52828
Conversation
|
Size Change: 0 B Total Size: 1.65 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 8635538. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6460151720
|
a81d929 to
dc6b5da
Compare
e8066d4 to
461ab20
Compare
| // we do this to avoid an layout edge case whereby | ||
| // the rich link preview popover will obscure the block toolbar | ||
| // under very specific circumstances and screensizes. | ||
| await page.getByRole( 'button', { name: 'Unlink' } ).nth( 1 ).click(); |
There was a problem hiding this comment.
Why the nth? This seems like it could be very brittle.
There was a problem hiding this comment.
because the first one is the one in the block toolbar, I changed the selector to use the parent to specify which one we want to click, does that look better to you?
6169732 to
9b369ac
Compare
| ] ); | ||
| } ); | ||
|
|
||
| test( `can be created instantly when a URL is selected`, async ( { |
There was a problem hiding this comment.
This test should be grouped into describe with test named will not automatically create a link if selected text is not a valid HTTP based URL.
Co-authored-by: Ben Dwyer <ben@scruffian.com>
8fb0de5 to
8635538
Compare
|
Rebased to see if this resolves the failing Cover block tests. If these persist when I start again tomorrow morning then I will force merge as they are not related to changes in this PR. |
What?
This PR migrates all the puppeteer tests for the Link Control UI to playwright
Closes #50995
Why?
This picks up after #50996 and continues with the rest of the tests. We want all our tests to be on playwright because it's easier to debug them and they are way more readable.
How?
Following the guidelines for e2e tests migrations
Testing Instructions
run
npm run test:e2e:playwright -- test/e2e/specs/editor/blocks/links.spec.jsand the test should pass