Skip to content

Commit bc77276

Browse files
committed
Add regression test for double outline
Reported in #26493 (comment)
1 parent 41aae13 commit bc77276

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import * as React from 'react';
2+
import Rating from '@material-ui/core/Rating';
3+
4+
export default function FocusVisibleRating() {
5+
return <Rating name="no-value-precise" precision={0.5} value={null} />;
6+
}

test/regressions/index.test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,17 @@ async function main() {
100100
await page.keyboard.press('ArrowLeft');
101101
await takeScreenshot({ testcase, route: '/regression-Rating/FocusVisibleRating3' });
102102
});
103+
104+
it('should handle focus-visible with precise ratings correctly', async () => {
105+
const index = routes.findIndex(
106+
(route) => route === '/regression-Rating/PreciseFocusVisibleRating',
107+
);
108+
const testcase = await renderFixture(index);
109+
await page.keyboard.press('Tab');
110+
await takeScreenshot({ testcase, route: '/regression-Rating/PreciseFocusVisibleRating2' });
111+
await page.keyboard.press('ArrowRight');
112+
await takeScreenshot({ testcase, route: '/regression-Rating/PreciseFocusVisibleRating3' });
113+
});
103114
});
104115

105116
describe('DateTimePicker', () => {

0 commit comments

Comments
 (0)