Skip to content

Commit 09da8e5

Browse files
authored
[code-infra] Fix nightly react@17 and react@18 jobs (#49879)
1 parent 1f57274 commit 09da8e5

3 files changed

Lines changed: 15 additions & 11 deletions

File tree

‎packages/mui-material/src/ButtonBase/ButtonBase.test.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ describe('<ButtonBase />', () => {
245245
});
246246
expect(onBlur.callCount).to.equal(1);
247247

248-
fireEvent.mouseLeave(button);
248+
await user.unhover(button);
249249
expect(onMouseLeave.callCount).to.equal(1);
250250
});
251251

‎test/regressions/demoMeta.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ export const REACT_FLOOR_RULES: ReactFloorRule[] = [
224224
{ test: 'docs/data/material/components/autocomplete/InfiniteLoading', minReactMajor: 18 },
225225
{ test: 'docs/data/material/components/lists/VirtualizedList', minReactMajor: 18 },
226226
{ test: 'test/regressions/fixtures/AppSearch/*', minReactMajor: 18 },
227+
{ test: 'test/regressions/fixtures/Autocomplete/Virtualize', minReactMajor: 18 },
227228
];
228229

229230
// Accordion docs demos + a11y fixtures enrolled for axe assertions (the cluster:

‎test/regressions/index.test.js‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -460,16 +460,19 @@ async function main() {
460460
});
461461
});
462462

463-
test('should style virtualized listbox correctly', async ({ pooled }) => {
464-
const { page } = pooled;
465-
const testcase = await renderFixture(page, '/regression-Autocomplete/Virtualize');
466-
await page.getByRole('combobox').click();
467-
await takeScreenshot(page, { testcase, route: '/regression-Autocomplete/Virtualize2' });
468-
await page.hover('[role="option"]');
469-
await takeScreenshot(page, { testcase, route: '/regression-Autocomplete/Virtualize3' });
470-
await page.click('[role="option"]');
471-
await takeScreenshot(page, { testcase, route: '/regression-Autocomplete/Virtualize4' });
472-
});
463+
test.skipIf(reactMajor < getMinReactMajor('/regression-Autocomplete/Virtualize'))(
464+
'should style virtualized listbox correctly',
465+
async ({ pooled }) => {
466+
const { page } = pooled;
467+
const testcase = await renderFixture(page, '/regression-Autocomplete/Virtualize');
468+
await page.getByRole('combobox').click();
469+
await takeScreenshot(page, { testcase, route: '/regression-Autocomplete/Virtualize2' });
470+
await page.hover('[role="option"]');
471+
await takeScreenshot(page, { testcase, route: '/regression-Autocomplete/Virtualize3' });
472+
await page.click('[role="option"]');
473+
await takeScreenshot(page, { testcase, route: '/regression-Autocomplete/Virtualize4' });
474+
},
475+
);
473476
});
474477

475478
describe('Switch', () => {

0 commit comments

Comments
 (0)