Skip to content

Commit

Permalink
sorry Trevor!
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen authored Apr 16, 2024
1 parent 0ccc7a4 commit fed091f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/components/form/range/range.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,22 @@ describe('EuiRange', () => {
/>
);

expect(getByRole('slider')).toHaveAttribute('aria-valuetext', '20, (20kb)');
expect(getByRole('slider')).toHaveAttribute(
'aria-valuetext',
'20, (20kb)'
);
});

it('should not exist when the current value does not have a matching label', () => {
const { getByRole } = render(
<EuiRange {...props} showTicks ticks={ticksWithLabels} />
<EuiRange
{...props}
showTicks
ticks={[
{ value: 20, label: '20kb', accessibleLabel: 'twenty kilobytes' },
]}
value={10}
/>
);

expect(getByRole('slider')).not.toHaveAttribute('aria-valuetext');
Expand Down

0 comments on commit fed091f

Please sign in to comment.