Skip to content

Commit

Permalink
Revert "Fix unit test"
Browse files Browse the repository at this point in the history
This reverts commit ed03d97.
  • Loading branch information
mirka committed Jul 2, 2024
1 parent 74c34ef commit 5f92fdc
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,19 @@ describe( 'BlockSwitcher', () => {
expect( items[ 1 ] ).toHaveTextContent( headingBlockType.title );
} );

test( 'should render accessibly disabled block switcher when we have a single selected block without styles and we cannot remove it', () => {
test( 'should render disabled block switcher when we have a single selected block without styles and we cannot remove it', () => {
useSelect.mockImplementation( () => ( {
blocks: [ headingBlock1 ],
icon: copy,
hasBlockStyles: false,
canRemove: false,
} ) );
render( <BlockSwitcher clientIds={ [ headingBlock1.clientId ] } /> );
const blockSwitcher = screen.getByRole( 'button', {
name: 'Block Name',
} );
expect( blockSwitcher ).toBeEnabled();
expect( blockSwitcher ).toHaveAttribute( 'aria-disabled', 'true' );
expect(
screen.getByRole( 'button', {
name: 'Block Name',
} )
).toBeDisabled();
} );

test( 'should render message for no available transforms', async () => {
Expand Down

0 comments on commit 5f92fdc

Please sign in to comment.