Skip to content

Commit

Permalink
Button: Update test assertion to match test name (#54260)
Browse files Browse the repository at this point in the history
* Button: Update test assertion to match test name

* Restore replaced assertion for button

* Update assertions after changes to tooltip in #54312
  • Loading branch information
brookewp authored Sep 12, 2023
1 parent d27d9d5 commit 5331fb6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/components/src/button/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ describe( 'Button', () => {
} );

it( 'should populate tooltip with description content for buttons with visible labels (buttons with children)', async () => {
const user = userEvent.setup();

render(
<Button
label="Label"
Expand All @@ -258,6 +260,16 @@ describe( 'Button', () => {
description: 'Description text',
} )
).toBeVisible();

await user.tab();

expect(
screen.getByRole( 'tooltip', {
name: 'Description text',
} )
).toBeVisible();

await cleanupTooltip( user );
} );

it( 'should allow tooltip disable', async () => {
Expand Down

0 comments on commit 5331fb6

Please sign in to comment.