Skip to content

Commit

Permalink
LOOM-1535: take out overlapping test
Browse files Browse the repository at this point in the history
  • Loading branch information
Parisistan committed Aug 8, 2024
1 parent 4d419ca commit c113ff1
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions packages/bpk-component-slider/src/form-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,39 +66,6 @@ describe('BpkSlider form test', () => {
});
});

it('should emit change event when slider value is changed', async () => {
const handleChange = jest.fn();
const Wrap = () => {
const [sliderValue, setSliderValue] = useState<number[]>([0]);
return (
<form data-testid="form">
<BpkSlider
id="slider"
min={0}
max={100}
name="slider"
ariaLabel={['slider']}
ariaValuetext={['min', 'max']}
value={sliderValue}
onChange={(value) => {
handleChange(value);
setSliderValue(Array.isArray(value) ? value : [value]);

}}
/>
</form>
);
};
render(<Wrap />);

const sliderThumb = screen.getByLabelText('slider');
expect(sliderThumb).toBeInTheDocument();

await sliderThumb.focus();
await userEvent.keyboard('{ArrowRight}');
expect(handleChange).toHaveBeenCalledTimes(1);
});

it('should emit change event when both sides of slider value are changed', async () => {
const handleChange = jest.fn();
const Wrap = () => {
Expand Down

0 comments on commit c113ff1

Please sign in to comment.