Skip to content

Commit

Permalink
Adds e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
creativecoder committed Jun 19, 2024
1 parent 57f39e3 commit 1fde55e
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/e2e/specs/site-editor/style-book.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,21 @@ test.describe( 'Style Book', () => {
'style book should be visible'
).toBeVisible();
} );

test( 'should allow opening the command menu from the header when open', async ( {
page,
} ) => {
// Open the command menu from the header.
await page
.getByRole( 'heading', {
name: 'Style Book',
} )
.click();

await expect(
page.getByLabel( 'Search commands and settings' )
).toBeVisible();
} );
} );

class StyleBook {
Expand Down
26 changes: 26 additions & 0 deletions test/e2e/specs/site-editor/user-global-styles-revisions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,32 @@ test.describe( 'Style Revisions', () => {
).toBeVisible();
} );

test( 'should allow opening the command menu from the header when open', async ( {
page,
editor,
userGlobalStylesRevisions,
} ) => {
await editor.canvas.locator( 'body' ).click();
await userGlobalStylesRevisions.openStylesPanel();
await page
.getByRole( 'button', {
name: 'Revisions',
exact: true,
} )
.click();

// Open the command menu from the header.
await page
.getByRole( 'heading', {
name: 'Style Revisions',
} )
.click();

await expect(
page.getByLabel( 'Search commands and settings' )
).toBeVisible();
} );

test( 'should paginate', async ( {
page,
editor,
Expand Down

0 comments on commit 1fde55e

Please sign in to comment.