-
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
Link Control test migration: Should contain a label when it should open in a new tab #51001
Conversation
1d3665f
to
fabeb11
Compare
Flaky tests detected in 084740d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5091216065
|
Size Change: 0 B Total Size: 1.39 MB ℹ️ View Unchanged
|
3926038
to
26ca583
Compare
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.
Initial thoughts. Thank you 👍
65d02c1
to
084740d
Compare
0ff31a9
to
9d3e062
Compare
3a53923
to
7431fe3
Compare
This can get another review now, updated with the same improvements as #50996 |
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.
Awesome work!
await page.keyboard.type( 'w.org' ); | ||
|
||
await page | ||
.locator( '.block-editor-link-control' ) |
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.
Ref: #50996 (comment)
// Navigate back to inputs to verify appears as changed. | ||
await pageUtils.pressKeys( 'primary+k' ); | ||
const urlInputValue = await page | ||
.getByPlaceholder( 'Search or type url' ) |
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: I wonder if we could use getByRole
here? I think either is fine though 👍 .
09d9f56
to
2514e49
Compare
…en in a new tab (WordPress#51001) * fixed utils * update snapshots, commented waitForURLFieldAutoFocus * remove appender function * removed snapshots * migrated test * removed old test * removed old snapshots * use proper locator instead of a class * use locators instead of tabbing around, remove appender util function * simplified test * removed snapshots and updated locator of save button * add comment
What?
Part of #50995
Based on top of #50996
This Pr needs to wait for the previous one to get merged since we didn't have any playwright tests for this component yet, it needed that setup.
This PR migrates the test "Should contain a label when it should open in a new tab" for the link control component to playwright
Why?
In an effort to migrate our e2e tests to use playwright, we've decided to pick up some of the tests for this component as we work on it to improve it, instead of trying to maintain the puppeteer tests.
How?
Following the guidelines for e2e tests migrations
Testing Instructions
run
npm run test:e2e:playwright -- -g "Should contain a label when it should open in a new tab"
and the test should pass