Skip to content

Commit

Permalink
Rafactor to use role selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Oct 25, 2022
1 parent d79d87b commit 7da8efa
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/e2e/specs/editor/blocks/gallery.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,14 @@ test.describe( 'Gallery', () => {
await editor.insertBlock( { name: 'core/gallery' } );
await page.click( 'role=button[name="Media Library"i]' );

await expect( page.locator( '.media-frame' ) ).toBeVisible();
await expect( page.locator( '.media-frame-title h1' ) ).toContainText(
'Create gallery'
const mediaLibrary = page.locator(
'role=dialog[name="Create gallery"i]'
);

await expect( mediaLibrary ).toBeVisible();
await expect(
page.locator( '.media-toolbar-primary button' )
).toContainText( 'Create a new gallery' );
mediaLibrary.locator( 'role=button[name="Create a new gallery"i]' )
).toBeVisible();
} );
} );

Expand Down

0 comments on commit 7da8efa

Please sign in to comment.