-
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the nth
? This seems like it could be very brittle.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.js
and the test should pass