Skip to content

Commit

Permalink
E2E: Update close block button selector (#95592)
Browse files Browse the repository at this point in the history
* Update close block button label

* Match both the current label and the new one

* Add comment to clarify new selector
  • Loading branch information
holdercp authored Oct 23, 2024
1 parent 1cd82c8 commit 7ad9287
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { EditorComponent } from './editor-component';

const sidebarParentSelector = '.block-editor-inserter__main-area';
const selectors = {
closeBlockInserterButton: 'button[aria-label="Close block inserter"]',
// This selector was updated to the capitalized label in Gutenberg v19.5.0. Once that is released, we should be able to remove the old selector ("Close block inserter").
// See: https://github.com/WordPress/gutenberg/pull/65983
closeBlockInserterButton:
'button[aria-label="Close Block Inserter"], button[aria-label="Close block inserter"]',
blockSearchInput: `${ sidebarParentSelector } input[type="search"]`,
patternResultItem: ( name: string ) => `${ sidebarParentSelector } div[aria-label="${ name }"]`,
};
Expand Down

0 comments on commit 7ad9287

Please sign in to comment.