-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Migrate post editor feature preferences to use new preferences package #39115
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix css classes used in e2e tests
- Loading branch information
commit c79bdbafcfb9d6a2bdf0bf5002f8642e4fa25e2d
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,16 +11,16 @@ describe( 'popovers', () => { | |
| describe( 'dropdown', () => { | ||
| it( 'toggles via click', async () => { | ||
| const isMoreMenuOpen = async () => | ||
| !! ( await page.$( '.interface-more-menu__content' ) ); | ||
| !! ( await page.$( '.interface-more-menu-dropdown__content' ) ); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same again here. Could be a good opportunity to make these tests less dependent on implementation details such as class name. |
||
|
|
||
| expect( await isMoreMenuOpen() ).toBe( false ); | ||
|
|
||
| // Toggle opened. | ||
| await page.click( '.interface-more-menu > button' ); | ||
| await page.click( '.interface-more-menu-dropdown > button' ); | ||
| expect( await isMoreMenuOpen() ).toBe( true ); | ||
|
|
||
| // Toggle closed. | ||
| await page.click( '.interface-more-menu > button' ); | ||
| await page.click( '.interface-more-menu-dropdown > button' ); | ||
| expect( await isMoreMenuOpen() ).toBe( false ); | ||
| } ); | ||
| } ); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can we target using something that's user oriented e.g. ARIA label?
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.
Could be tricky as the block toolbar has an identical label for its settings menu.
I would like to get rid of this logic that uses a different class name for the site editor:
gutenberg/packages/e2e-test-utils/src/click-on-more-menu-item.js
Lines 15 to 20 in 11ae04c
I'll be able to remove that once I've done the migration for the site editor, so at that point I'll loop back and improve this.
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.
In my experience user-facing labels change more often than classnames 😅
It's always a compromise with e2e selectors; it's not a huge deal if we have to change them once in a while. Classnames also tend to be more unique than aria-labels.