Skip to content

Commit

Permalink
fix: 15752 invalid tooltip on hovering the select component
Browse files Browse the repository at this point in the history
  • Loading branch information
mHuzefa committed Feb 27, 2024
1 parent 3284e32 commit 0ea8370
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/react/src/components/Select/__tests__/Select-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,16 @@ describe('Select', () => {
expect(container.firstChild.firstChild).toHaveClass(
`${prefix}--select--slug`
);
})

it('should show SelectItem text as title', () => {
render(
<Select id="select" labelText="Select" defaultValue="option-2">
<SelectItem text="Option 1" value="option-1" />
<SelectItem text="Option 2" value="option-2" />
</Select>
);
expect(screen.getByLabelText('Select').title).toEqual('Option 2');
});
});

Expand Down

0 comments on commit 0ea8370

Please sign in to comment.