You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/components/form-components/Slider/Slider.test.tsx

33 lines
651 B

import { render } from '@/react-tools/test-utils';
import { Slider, Props } from './Slider';
function renderDefault({
min = 0,
max = 10,
step = 1,
value = min,
onChange = () => {},
dataCy = 'someView-coolSlider',
visibleTooltip = true,
}: Partial<Props> = {}) {
return render(
<Slider
min={min}
max={max}
step={step}
onChange={onChange}
value={value}
visibleTooltip={visibleTooltip}
dataCy={dataCy}
/>
);
}
test('should display a Slider component', async () => {
const { getByRole } = renderDefault({});
const handle = getByRole('slider');
expect(handle).toBeTruthy();
});