Skip to content

Commit

Permalink
Merge branch 'try-pattern-inserter-2' of https://github.com/WordPress…
Browse files Browse the repository at this point in the history
…/gutenberg into try-pattern-inserter-2
  • Loading branch information
richtabor committed May 9, 2024
2 parents 07029cb + 12d8e9a commit b5fadf5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/e2e/specs/site-editor/zoom-out.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,25 @@ test.describe( 'Zoom Out', () => {

await expect( zoomOutButton ).toBeFocused();
} );

test( 'Clicking on inserter while on zoom-out should open the patterns tab on the inserter', async ( {
page,
} ) => {
const zoomOutButton = page.getByRole( 'button', {
name: 'Zoom-out View',
exact: true,
} );

await zoomOutButton.click();
await expect( page.getByLabel( 'Add pattern' ) ).toHaveCount( 3 );
await page.getByLabel( 'Add pattern' ).first().click();
await expect( page.getByLabel( 'Add pattern' ) ).toHaveCount( 2 );

await expect(
page
.locator( '#tabs-2-allPatterns-view div' )
.filter( { hasText: 'All' } )
.nth( 1 )
).toBeVisible();
} );
} );

0 comments on commit b5fadf5

Please sign in to comment.