Skip to content

Commit

Permalink
Remaining code review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
joshkel committed Jan 21, 2025
1 parent 1f5ad06 commit d8f1689
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/mui-material/src/Slider/Slider.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ describe('<Slider />', () => {

it('stops at the max value with custom marks', () => {
const handleChange = stub();
const { getByRole } = render(
render(
<Slider
marks={[{ value: 10 }, { value: 20 }, { value: 30 }]}
step={null}
Expand All @@ -1207,7 +1207,7 @@ describe('<Slider />', () => {
/>,
);

const slider = getByRole('slider');
const slider = screen.getByRole('slider');
expect(slider).to.have.attribute('aria-valuenow', '30');

act(() => {
Expand All @@ -1220,18 +1220,18 @@ describe('<Slider />', () => {
expect(slider).to.have.attribute('aria-valuenow', '30');
});

it(`stops at the min value with custom marks`, () => {
const handleChange = stub().callsFake((_event, value) => value);
const { getByRole } = render(
it('stops at the min value with custom marks', () => {
const handleChange = stub();
render(
<Slider
marks={[10, 20, 30].map((value) => ({ value }))}
marks={[{ value: 10 }, { value: 20 }, { value: 30 }]}
step={null}
value={10}
onChange={handleChange}
/>,
);

const slider = getByRole('slider');
const slider = screen.getByRole('slider');
expect(slider).to.have.attribute('aria-valuenow', '10');

act(() => {
Expand Down

0 comments on commit d8f1689

Please sign in to comment.