Skip to content

Commit

Permalink
Fix grid related issues in safari
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Oct 1, 2020
1 parent 4e8de65 commit 9d539bc
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions packages/material-ui/src/ImageList/ImageList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,25 @@ describe('<ImageList />', () => {
});

describe('prop: gap', () => {
it('should render with modified grid-template-columns style', () => {
it('should render with modified grid-template-columns style', function test() {
if (/jsdom/.test(window.navigator.userAgent)) {
this.skip();
}

const { getByTestId } = render(
<ImageList data-testid="test-root" gap={8}>
{children}
</ImageList>,
);

expect(getByTestId('test-root').style.gap).to.equal('8px');
expect(window.getComputedStyle(getByTestId('test-root'))).to.include({
rowGap: '8px',
columnGap: '8px',
});
});

it('should render with modified column-gap style', function test() {
if (!/jsdom/.test(window.navigator.userAgent)) {
if (/jsdom/.test(window.navigator.userAgent)) {
this.skip();
}

Expand All @@ -210,7 +217,10 @@ describe('<ImageList />', () => {
</ImageList>,
);

expect(getByTestId('test-root').style['column-gap']).to.equal('8px');
expect(window.getComputedStyle(getByTestId('test-root'))).to.have.property(
'columnGap',
'8px',
);
});
});
});
Expand Down

0 comments on commit 9d539bc

Please sign in to comment.