Skip to content

Commit

Permalink
[test] Skip flaky row pinning tests in JSDOM (#9511)
Browse files Browse the repository at this point in the history
  • Loading branch information
cherniavskii authored Jun 29, 2023
1 parent 8a413af commit 889af42
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/data/charts/styling/MuiColorTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Button from '@mui/material/Button';
import Box from '@mui/material/Box';
import Brightness4Icon from '@mui/icons-material/Brightness4';
import Brightness7Icon from '@mui/icons-material/Brightness7';
import globalChance from 'chance';
import { Chance } from 'chance';
import { ScatterChart } from '@mui/x-charts/ScatterChart';

import {
Expand All @@ -18,7 +18,7 @@ import {
cheerfulFiestaPalette,
} from '@mui/x-charts/colorPalettes';

const chance = globalChance();
const chance = new Chance(42);

function getGaussianSeriesData(mean, stdev = [0.3, 0.4], N = 50) {
return [...Array(N)].map((_, i) => {
Expand Down
4 changes: 2 additions & 2 deletions docs/data/charts/styling/MuiColorTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Button from '@mui/material/Button';
import Box from '@mui/material/Box';
import Brightness4Icon from '@mui/icons-material/Brightness4';
import Brightness7Icon from '@mui/icons-material/Brightness7';
import globalChance from 'chance';
import { Chance } from 'chance';
import { ScatterChart } from '@mui/x-charts/ScatterChart';
import { ScatterValueType } from '@mui/x-charts';
import {
Expand All @@ -18,7 +18,7 @@ import {
cheerfulFiestaPalette,
} from '@mui/x-charts/colorPalettes';

const chance = globalChance();
const chance = new Chance(42);

function getGaussianSeriesData(
mean: [number, number],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,11 @@ describe('<DataGridPro /> - Row pinning', () => {
expect(getRowById(1)!).to.have.class(className);
});

it('should support cell editing', async () => {
it('should support cell editing', async function test() {
if (isJSDOM) {
// flaky in JSDOM
this.skip();
}
const processRowUpdate = spy((row) => ({ ...row, currencyPair: 'USD-GBP' }));
const columns: GridColDef[] = [{ field: 'id' }, { field: 'name', editable: true }];
render(
Expand Down Expand Up @@ -800,7 +804,11 @@ describe('<DataGridPro /> - Row pinning', () => {
expect(processRowUpdate.lastCall.args[0]).to.deep.equal({ id: 3, name: 'Marcus' });
});

it('should support row editing', async () => {
it('should support row editing', async function test() {
if (isJSDOM) {
// flaky in JSDOM
this.skip();
}
const processRowUpdate = spy((row) => ({ ...row, currencyPair: 'USD-GBP' }));
const columns: GridColDef[] = [{ field: 'id' }, { field: 'name', editable: true }];
render(
Expand Down

0 comments on commit 889af42

Please sign in to comment.