Skip to content

Commit

Permalink
update the toolbar tests to account for moving the collapse button
Browse files Browse the repository at this point in the history
  • Loading branch information
draganescu committed Jul 5, 2023
1 parent 31ede3c commit 5989fa7
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions test/e2e/specs/editor/various/shortcut-focus-toolbar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ test.describe( 'Focus toolbar shortcut (alt + F10)', () => {
await editor.insertBlock( { name: 'core/paragraph' } );
await toolbarUtils.moveToToolbarShortcut();
await expect(
toolbarUtils.blockToolbarShowDocumentButton
toolbarUtils.blockToolbarParagraphButton
).toBeFocused();
await expect(
toolbarUtils.documentToolbarTooltip
).not.toBeVisible();

// Test: Focus the block toolbar from paragraph block with content
await editor.insertBlock( { name: 'core/paragraph' } );
Expand All @@ -113,11 +110,8 @@ test.describe( 'Focus toolbar shortcut (alt + F10)', () => {
);
await toolbarUtils.moveToToolbarShortcut();
await expect(
toolbarUtils.blockToolbarShowDocumentButton
toolbarUtils.blockToolbarParagraphButton
).toBeFocused();
await expect(
toolbarUtils.documentToolbarTooltip
).not.toBeVisible();
} );

test( 'Focuses the correct toolbar in select mode', async ( {
Expand All @@ -135,11 +129,8 @@ test.describe( 'Focus toolbar shortcut (alt + F10)', () => {
await toolbarUtils.useSelectMode();
await toolbarUtils.moveToToolbarShortcut();
await expect(
toolbarUtils.blockToolbarShowDocumentButton
toolbarUtils.blockToolbarParagraphButton
).toBeFocused();
await expect(
toolbarUtils.documentToolbarTooltip
).not.toBeVisible();

// Test: Focus the block toolbar from paragraph in select mode
await editor.insertBlock( { name: 'core/paragraph' } );
Expand All @@ -149,11 +140,8 @@ test.describe( 'Focus toolbar shortcut (alt + F10)', () => {
await toolbarUtils.useSelectMode();
await toolbarUtils.moveToToolbarShortcut();
await expect(
toolbarUtils.blockToolbarShowDocumentButton
toolbarUtils.blockToolbarParagraphButton
).toBeFocused();
await expect(
toolbarUtils.documentToolbarTooltip
).not.toBeVisible();
} );
} );

Expand Down

0 comments on commit 5989fa7

Please sign in to comment.