Skip to content

Commit

Permalink
Fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed May 31, 2024
1 parent 20cd981 commit 7e94d0c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
12 changes: 9 additions & 3 deletions test/e2e/specs/site-editor/block-removal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ test.describe( 'Site editor block removal prompt', () => {
.click();

// Select and try to remove Query Loop block
const listView = page.getByRole( 'region', { name: 'List View' } );
const listView = page.getByRole( 'region', {
name: 'Document Overview',
} );
await listView.getByRole( 'link', { name: 'Query Loop' } ).click();
await page.keyboard.press( 'Backspace' );

Expand All @@ -52,7 +54,9 @@ test.describe( 'Site editor block removal prompt', () => {
.click();

// Select and open child blocks of Query Loop block
const listView = page.getByRole( 'region', { name: 'List View' } );
const listView = page.getByRole( 'region', {
name: 'Document Overview',
} );
await listView.getByRole( 'link', { name: 'Query Loop' } ).click();
await page.keyboard.press( 'ArrowRight' );

Expand All @@ -79,7 +83,9 @@ test.describe( 'Site editor block removal prompt', () => {
.click();

// Select Query Loop list item
const listView = page.getByRole( 'region', { name: 'List View' } );
const listView = page.getByRole( 'region', {
name: 'Document Overview',
} );
await listView.getByRole( 'link', { name: 'Query Loop' } ).click();

// Reveal its inner blocks in the list view
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/specs/site-editor/list-view.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test.describe( 'Site Editor List View', () => {
editor,
} ) => {
await expect(
page.locator( 'role=region[name="List View"i]' )
page.locator( 'role=region[name="Document Overview"i]' )
).toBeHidden();

// Turn on block list view by default.
Expand All @@ -37,7 +37,7 @@ test.describe( 'Site Editor List View', () => {
await page.reload();

await expect(
page.locator( 'role=region[name="List View"i]' )
page.locator( 'role=region[name="Document Overview"i]' )
).toBeVisible();

// The preferences cleanup.
Expand Down Expand Up @@ -121,7 +121,7 @@ test.describe( 'Site Editor List View', () => {
await pageUtils.pressKeys( 'shift+Tab' );
await expect(
page
.getByRole( 'region', { name: 'List View' } )
.getByRole( 'region', { name: 'Document Overview' } )
.getByRole( 'button', {
name: 'Close',
} )
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/specs/site-editor/navigation-editor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test.describe( 'Editing Navigation Menus', () => {

const listView = page
.getByRole( 'region', {
name: 'List View',
name: 'Document Overview',
} )
.getByRole( 'treegrid', {
name: 'Block navigation structure',
Expand Down Expand Up @@ -99,7 +99,7 @@ test.describe( 'Editing Navigation Menus', () => {

// Check the standard tabs are not present.
await expect(
sidebar.getByRole( 'tab', { name: 'List View' } )
sidebar.getByRole( 'tab', { name: 'Document Overview' } )
).toBeHidden();
await expect(
sidebar.getByRole( 'tab', { name: 'Settings' } )
Expand Down

0 comments on commit 7e94d0c

Please sign in to comment.