@@ -33,6 +33,11 @@ test('resize 1024px => 296px => 183px', async () => {
3333 expect ( child1ClassName ) . toEqual ( '' ) ;
3434 expect ( child2BoundingBox ) . toEqual ( { x : 908.046875 , y : 13 , width : 102.953125 , height : 72 } ) ;
3535 expect ( child2ClassName ) . toEqual ( '' ) ;
36+
37+ expect ( await page . screenshot ( ) ) . toMatchImageSnapshot ( {
38+ failureThreshold : 0.1 ,
39+ failureThresholdType : 'percent'
40+ } ) ;
3641 }
3742
3843 {
@@ -55,6 +60,11 @@ test('resize 1024px => 296px => 183px', async () => {
5560 expect ( child1ClassName ) . toEqual ( nextIsWrappedClassName ) ;
5661 expect ( child2BoundingBox ) . toEqual ( { x : 13 , y : 95 , width : 270 , height : 72 } ) ;
5762 expect ( child2ClassName ) . toEqual ( '' ) ;
63+
64+ expect ( await page . screenshot ( ) ) . toMatchImageSnapshot ( {
65+ failureThreshold : 0.1 ,
66+ failureThresholdType : 'percent'
67+ } ) ;
5868 }
5969
6070 {
@@ -77,5 +87,10 @@ test('resize 1024px => 296px => 183px', async () => {
7787 expect ( child1ClassName ) . toEqual ( nextIsWrappedClassName ) ;
7888 expect ( child2BoundingBox ) . toEqual ( { x : 13 , y : 177 , width : 157 , height : 72 } ) ;
7989 expect ( child2ClassName ) . toEqual ( '' ) ;
90+
91+ expect ( await page . screenshot ( ) ) . toMatchImageSnapshot ( {
92+ failureThreshold : 0.1 ,
93+ failureThresholdType : 'percent'
94+ } ) ;
8095 }
8196} ) ;
0 commit comments