Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix e2e tests
  • Loading branch information
youknowriad committed Jul 7, 2021
commit 5bc8bb7905b69b0ebffb22675ca704abcb6dfe57
4 changes: 2 additions & 2 deletions packages/e2e-tests/specs/editor/plugins/cpt-locking.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ describe( 'cpt locking', () => {
await page.click(
'.wp-block-column .block-editor-button-block-appender'
);
await page.type( '.block-editor-inserter__search-input', 'image' );
await page.type( '.block-editor-inserter__search input', 'image' );
await pressKeyTimes( 'Tab', 2 );
await page.keyboard.press( 'Enter' );
await page.click( '.edit-post-header-toolbar__inserter-toggle' );
await page.type(
'.block-editor-inserter__search-input',
'.block-editor-inserter__search input',
'gallery'
);
await pressKeyTimes( 'Tab', 2 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ describe( 'Inserting blocks', () => {
() =>
document.activeElement &&
document.activeElement.classList.contains(
'block-editor-inserter__search-input'
'components-search-control__input'
)
);
await page.keyboard.type( 'para' );
Expand Down Expand Up @@ -185,7 +185,7 @@ describe( 'Inserting blocks', () => {
() => document.activeElement.classList
);
expect( Object.values( activeElementClassList ) ).toContain(
'block-editor-inserter__search-input'
'components-search-control__input'
);

// Try using the up arrow key (vertical navigation triggers the issue described in #9583).
Expand All @@ -196,7 +196,7 @@ describe( 'Inserting blocks', () => {
() => document.activeElement.classList
);
expect( Object.values( activeElementClassList ) ).toContain(
'block-editor-inserter__search-input'
'components-search-control__input'
);

// Tab to the block list
Expand Down Expand Up @@ -250,7 +250,7 @@ describe( 'Inserting blocks', () => {
);

// Insert a paragraph block.
await page.waitForSelector( '.block-editor-inserter__search-input' );
await page.waitForSelector( '.block-editor-inserter__search input' );

// Search for the paragraph block if it's not in the list of blocks shown.
if ( ! page.$( '.editor-block-list-item-paragraph' ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const addParagraphsAndColumnsDemo = async () => {
await page.keyboard.press( 'Enter' );
await page.click( ':focus [aria-label="Two columns; equal split"]' );
await page.click( ':focus .block-editor-button-block-appender' );
await page.waitForSelector( ':focus.block-editor-inserter__search-input' );
await page.waitForSelector( '.block-editor-inserter__search input:focus' );
await page.keyboard.type( 'Paragraph' );
await pressKeyTimes( 'Tab', 2 ); // Tab to paragraph result.
await page.keyboard.press( 'Enter' ); // Insert paragraph.
Expand All @@ -40,7 +40,7 @@ const addParagraphsAndColumnsDemo = async () => {
// is a temporary solution.
await page.focus( '.wp-block[data-type="core/column"]:nth-child(2)' );
await page.click( ':focus .block-editor-button-block-appender' );
await page.waitForSelector( ':focus.block-editor-inserter__search-input' );
await page.waitForSelector( '.block-editor-inserter__search input:focus' );
await page.keyboard.type( 'Paragraph' );
await pressKeyTimes( 'Tab', 2 ); // Tab to paragraph result.
await page.keyboard.press( 'Enter' ); // Insert paragraph.
Expand Down