Skip to content

Commit

Permalink
Use toBeDisabled instead of aria-disabled check (#58694)
Browse files Browse the repository at this point in the history
Co-authored-by: Mamaduka <[email protected]>
  • Loading branch information
jeryj and Mamaduka authored Feb 6, 2024
1 parent 3fb2976 commit 7705c03
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions test/e2e/specs/editor/various/navigable-toolbar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,20 +273,14 @@ test.describe( 'Block Toolbar', () => {
} );

// Make sure it's in an acvite state for now
await expect( blockToolbarMoveUpButton ).not.toHaveAttribute(
'aria-disabled',
'true'
);
await expect( blockToolbarMoveUpButton ).toBeEnabled();

await expect( blockToolbarMoveUpButton ).toBeFocused();
await pageUtils.pressKeys( 'Enter' );
await expect( blockToolbarMoveUpButton ).toBeFocused();
await pageUtils.pressKeys( 'Enter' );
await expect( blockToolbarMoveUpButton ).toBeFocused();
await expect( blockToolbarMoveUpButton ).toHaveAttribute(
'aria-disabled',
'true'
);
await expect( blockToolbarMoveUpButton ).toBeDisabled();

// Check to make sure focus returns to the Move Up button roving index after all of this
await pageUtils.pressKeys( 'Tab' );
Expand Down

0 comments on commit 7705c03

Please sign in to comment.