-
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
Migrate 'taxonomies' e2e tests to Playwright #57662
Conversation
} | ||
|
||
const tagName = 'tag-' + generateRandomNumber(); | ||
const tags = page.locator( '.components-form-token-field__token-text' ); |
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.
I couldn't find a better locator here. The screen readers use the Remove Tag
button and its description, but PW currently can't locate elements based on descriptions.
Some workarounds are described in microsoft/playwright#18332, but decided to go with the simplest solution.
Size Change: 0 B Total Size: 1.69 MB ℹ️ View Unchanged
|
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.
I left only one comment, but LGTM 👍
await page | ||
.getByRole( 'button', { | ||
name: 'Add New Category', | ||
expanded: false, |
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 line seems unnecessary.
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.
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.
Oh, I missed that 😅 If so, there is no problem.
What?
Part of #38851.
PR migrates
taxonomies.test.js
e2e tests to Playwright.Why?
See #38851.
Notes
if the user has the right capabilities
suffixes andcanCreatTermInTaxonomy
checks. The tests currently only run for admin users which have the capabilities.Testing Instructions