Skip to content

Commit

Permalink
Fix tests and snapshots.
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Oct 15, 2020
1 parent 958944c commit 96782c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class BlockSwitcher extends Component {

const singleBlockLabel = isSmallScreen
? blockTitle
: `${ __( 'Change block type or style' ) } ( ${ blockTitle } )`;
: `${ __( 'Change block type or style' ) } ( ${ blockTitle } )`;

const blockSwitcherLabel =
1 === blocks.length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exports[`BlockSwitcher should render disabled block switcher with multi block of
showColors={true}
/>
}
title="Block icon"
title="Heading"
/>
</ToolbarGroup>
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ const tabThroughParagraphBlock = async ( paragraphText ) => {

const tabThroughBlockToolbar = async () => {
await page.keyboard.press( 'Tab' );
await expect( await getActiveLabel() ).toBe( 'Change block type or style' );
await expect( await getActiveLabel() ).toBe(
'Change block type or style ( Paragraph )'
);

await page.keyboard.press( 'ArrowRight' );
await expect( await getActiveLabel() ).toBe( 'Move up' );
Expand All @@ -64,13 +66,15 @@ const tabThroughBlockToolbar = async () => {
await expect( await getActiveLabel() ).toBe( 'Link' );

await page.keyboard.press( 'ArrowRight' );
await expect( await getActiveLabel() ).toBe( 'More rich text controls' );
await expect( await getActiveLabel() ).toBe( 'More formatting' );

await page.keyboard.press( 'ArrowRight' );
await expect( await getActiveLabel() ).toBe( 'More options' );

await page.keyboard.press( 'ArrowRight' );
await expect( await getActiveLabel() ).toBe( 'Change block type or style' );
await expect( await getActiveLabel() ).toBe(
'Change block type or style ( Paragraph )'
);
};

describe( 'Order of block keyboard navigation', () => {
Expand Down

0 comments on commit 96782c9

Please sign in to comment.