From 1671519d0c81bfde2608ab62c6104cf36935b09f Mon Sep 17 00:00:00 2001 From: ramonjd Date: Fri, 15 Oct 2021 15:34:30 +1100 Subject: [PATCH] Updating e2e test selectors --- packages/e2e-tests/specs/editor/blocks/cover.test.js | 2 +- .../specs/editor/various/block-hierarchy-navigation.test.js | 6 +++--- packages/e2e-tests/specs/editor/various/list-view.test.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/e2e-tests/specs/editor/blocks/cover.test.js b/packages/e2e-tests/specs/editor/blocks/cover.test.js index cd737f77a3702..43457dad26b71 100644 --- a/packages/e2e-tests/specs/editor/blocks/cover.test.js +++ b/packages/e2e-tests/specs/editor/blocks/cover.test.js @@ -26,7 +26,7 @@ describe( 'Cover', () => { // Select the cover block.By default the child paragraph gets selected. await page.click( '.edit-post-header-toolbar__list-view-toggle' ); await page.click( - '.block-editor-list-view-block__contents-container button' + '.block-editor-list-view-block__contents-container a' ); const heightInput = ( diff --git a/packages/e2e-tests/specs/editor/various/block-hierarchy-navigation.test.js b/packages/e2e-tests/specs/editor/various/block-hierarchy-navigation.test.js index 0eae0977afcbc..fd4de7ba31d32 100644 --- a/packages/e2e-tests/specs/editor/various/block-hierarchy-navigation.test.js +++ b/packages/e2e-tests/specs/editor/various/block-hierarchy-navigation.test.js @@ -51,7 +51,7 @@ describe( 'Navigating the block hierarchy', () => { await page.click( '.edit-post-header-toolbar__list-view-toggle' ); const columnsBlockMenuItem = ( await page.$x( - "//button[contains(@class,'block-editor-list-view-block-select-button') and contains(text(), 'Columns')]" + "//a[contains(@class,'block-editor-list-view-block-select-button') and contains(text(), 'Columns')]" ) )[ 0 ]; await columnsBlockMenuItem.click(); @@ -75,7 +75,7 @@ describe( 'Navigating the block hierarchy', () => { // Navigate to the last column block. const lastColumnsBlockMenuItem = ( await page.$x( - "//button[contains(@class,'block-editor-list-view-block-select-button') and contains(text(), 'Column')]" + "//a[contains(@class,'block-editor-list-view-block-select-button') and contains(text(), 'Column')]" ) )[ 3 ]; await lastColumnsBlockMenuItem.click(); @@ -188,7 +188,7 @@ describe( 'Navigating the block hierarchy', () => { await page.click( '.edit-post-header-toolbar__list-view-toggle' ); const groupMenuItem = ( await page.$x( - "//button[contains(@class,'block-editor-list-view-block-select-button') and contains(text(), 'Group')]" + "//a[contains(@class,'block-editor-list-view-block-select-button') and contains(text(), 'Group')]" ) )[ 0 ]; await groupMenuItem.click(); diff --git a/packages/e2e-tests/specs/editor/various/list-view.test.js b/packages/e2e-tests/specs/editor/various/list-view.test.js index 24ffb70821075..85b27f2139fa3 100644 --- a/packages/e2e-tests/specs/editor/various/list-view.test.js +++ b/packages/e2e-tests/specs/editor/various/list-view.test.js @@ -42,12 +42,12 @@ describe( 'List view', () => { await pressKeyWithModifier( 'access', 'o' ); const paragraphBlock = await page.waitForXPath( - '//button[contains(., "Paragraph")][@draggable="true"]' + '//a[contains(., "Paragraph")][@draggable="true"]' ); // Drag above the heading block const headingBlock = await page.waitForXPath( - '//button[contains(., "Heading")][@draggable="true"]' + '//a[contains(., "Heading")][@draggable="true"]' ); await dragAndDrop( paragraphBlock, headingBlock, -5 );