-
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
Remove redundant type badges in navigation link control #24885
Remove redundant type badges in navigation link control #24885
Conversation
packages/block-editor/src/components/link-control/test/fixtures/index.js
Show resolved
Hide resolved
Size Change: +42 B (0%) Total Size: 1.17 MB
ℹ️ View Unchanged
|
expect( currentLinkHTML ).toEqual( | ||
expect.stringContaining( selectedLink.type ) | ||
); | ||
expect( currentLinkHTML ).toEqual( expect.stringContaining( 'Edit' ) ); | ||
expect( | ||
queryByRole( currentLink, 'button', { name: 'Edit' } ) | ||
).toBeTruthy(); |
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.
Fixed a bad test where it's asserting the HTML to contain a Page
text anywhere. It was passing because the text contains Hello Page
, but not we want to test against.
Fixed it by using RTL to search for a button with the Edit
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.
Nice! Thanks for adding/fixing tests.
Description
Fix #24839. Remove the type badges for Page/Post/Tag/Category.
How has this been tested?
See the unit tests, or
Screenshots
Types of changes
Bug fix
Checklist: