Skip to content

Commit

Permalink
Update test/e2e/specs/editor/various/block-switcher-test.spec.js
Browse files Browse the repository at this point in the history
Co-authored-by: Kai Hao <kevin830726@gmail.com>
  • Loading branch information
ntsekouras and kevin940726 committed May 11, 2023
1 parent 5625984 commit 44108f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/e2e/specs/editor/various/block-switcher-test.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ test.describe( 'Block Switcher', () => {
);
// Transform to `Stack` variation.
await editor.clickBlockToolbarButton( 'Stack' );
const variations = page.getByRole( 'menu', { name: 'Stack' } )
.getByRole( 'group', { name: 'variations' } );
await expect(
page.locator( 'role=menuitem[name="Stack"i]' )
variations.getByRole( 'menuitem', { name: 'Stack' } )
).toBeHidden();
await page.click( 'role=menuitem[name="Row"i]' );
await variations.getByRole( 'menuitem', { name: 'Row' } ).click();
expect( await editor.getEditedPostContent() ).toBe(
`<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group"><!-- wp:paragraph -->
Expand Down

0 comments on commit 44108f7

Please sign in to comment.