File tree 1 file changed +14
-4
lines changed
packages/material-ui/src/ImageList
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -189,18 +189,25 @@ describe('<ImageList />', () => {
189
189
} ) ;
190
190
191
191
describe ( 'prop: gap' , ( ) => {
192
- it ( 'should render with modified grid-template-columns style' , ( ) => {
192
+ it ( 'should render with modified grid-template-columns style' , function test ( ) {
193
+ if ( / j s d o m / . test ( window . navigator . userAgent ) ) {
194
+ this . skip ( ) ;
195
+ }
196
+
193
197
const { getByTestId } = render (
194
198
< ImageList data-testid = "test-root" gap = { 8 } >
195
199
{ children }
196
200
</ ImageList > ,
197
201
) ;
198
202
199
- expect ( getByTestId ( 'test-root' ) . style . gap ) . to . equal ( '8px' ) ;
203
+ expect ( window . getComputedStyle ( getByTestId ( 'test-root' ) ) ) . to . include ( {
204
+ rowGap : '8px' ,
205
+ columnGap : '8px' ,
206
+ } ) ;
200
207
} ) ;
201
208
202
209
it ( 'should render with modified column-gap style' , function test ( ) {
203
- if ( ! / j s d o m / . test ( window . navigator . userAgent ) ) {
210
+ if ( / j s d o m / . test ( window . navigator . userAgent ) ) {
204
211
this . skip ( ) ;
205
212
}
206
213
@@ -210,7 +217,10 @@ describe('<ImageList />', () => {
210
217
</ ImageList > ,
211
218
) ;
212
219
213
- expect ( getByTestId ( 'test-root' ) . style [ 'column-gap' ] ) . to . equal ( '8px' ) ;
220
+ expect ( window . getComputedStyle ( getByTestId ( 'test-root' ) ) ) . to . have . property (
221
+ 'columnGap' ,
222
+ '8px' ,
223
+ ) ;
214
224
} ) ;
215
225
} ) ;
216
226
} ) ;
You can’t perform that action at this time.
0 commit comments