Skip to content

Commit

Permalink
Add regression test for double outline
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jun 9, 2021
1 parent 41aae13 commit bc77276
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/regressions/fixtures/Rating/PreciseFocusVisibleRating.js
@@ -0,0 +1,6 @@
import * as React from 'react';
import Rating from '@material-ui/core/Rating';

export default function FocusVisibleRating() {
return <Rating name="no-value-precise" precision={0.5} value={null} />;
}
11 changes: 11 additions & 0 deletions test/regressions/index.test.js
Expand Up @@ -100,6 +100,17 @@ async function main() {
await page.keyboard.press('ArrowLeft');
await takeScreenshot({ testcase, route: '/regression-Rating/FocusVisibleRating3' });
});

it('should handle focus-visible with precise ratings correctly', async () => {
const index = routes.findIndex(
(route) => route === '/regression-Rating/PreciseFocusVisibleRating',
);
const testcase = await renderFixture(index);
await page.keyboard.press('Tab');
await takeScreenshot({ testcase, route: '/regression-Rating/PreciseFocusVisibleRating2' });
await page.keyboard.press('ArrowRight');
await takeScreenshot({ testcase, route: '/regression-Rating/PreciseFocusVisibleRating3' });
});
});

describe('DateTimePicker', () => {
Expand Down

0 comments on commit bc77276

Please sign in to comment.