@@ -2,6 +2,7 @@ import React from 'react';
22import { mountWithApp } from 'tests/utilities' ;
33import { GlobeMinor } from '@shopify/polaris-icons' ;
44
5+ // eslint-disable-next-line import/no-deprecated
56import { VisuallyHidden } from '../../VisuallyHidden' ;
67import { Icon } from '../../Icon' ;
78import { Badge } from '../Badge' ;
@@ -14,11 +15,13 @@ describe('<Badge />', () => {
1415
1516 it ( 'accepts a status prop and renders a visually hidden label' , ( ) => {
1617 const badge = mountWithApp ( < Badge status = "success" /> ) ;
18+ // eslint-disable-next-line import/no-deprecated
1719 expect ( badge ) . toContainReactComponent ( VisuallyHidden ) ;
1820 } ) ;
1921
2022 it ( 'accepts a progress prop and renders a visually hidden label' , ( ) => {
2123 const badge = mountWithApp ( < Badge progress = "incomplete" /> ) ;
24+ // eslint-disable-next-line import/no-deprecated
2225 expect ( badge ) . toContainReactComponent ( VisuallyHidden ) ;
2326 } ) ;
2427
@@ -27,6 +30,7 @@ describe('<Badge />', () => {
2730 < Badge progress = "incomplete" status = "attention" /> ,
2831 ) ;
2932
33+ // eslint-disable-next-line import/no-deprecated
3034 expect ( badge ) . toContainReactComponentTimes ( VisuallyHidden , 1 , {
3135 children : 'Attention Incomplete' ,
3236 } ) ;
@@ -87,6 +91,7 @@ describe('<Badge />', () => {
8791 /> ,
8892 ) ;
8993
94+ // eslint-disable-next-line import/no-deprecated
9095 expect ( badge ) . toContainReactComponent ( VisuallyHidden , {
9196 children : mockAccessibilityLabel ,
9297 } ) ;
@@ -102,6 +107,7 @@ describe('<Badge />', () => {
102107 /> ,
103108 ) ;
104109
110+ // eslint-disable-next-line import/no-deprecated
105111 expect ( badge ) . not . toContainReactComponent ( VisuallyHidden , {
106112 children : 'Attention Incomplete' ,
107113 } ) ;
@@ -112,24 +118,28 @@ describe('<Badge />', () => {
112118 < Badge status = "attention" progress = "incomplete" /> ,
113119 ) ;
114120
121+ // eslint-disable-next-line import/no-deprecated
115122 expect ( badge ) . toContainReactComponent ( VisuallyHidden , {
116123 children : 'Attention Incomplete' ,
117124 } ) ;
118125
119126 badge = mountWithApp ( < Badge progress = "incomplete" /> ) ;
120127
128+ // eslint-disable-next-line import/no-deprecated
121129 expect ( badge ) . toContainReactComponent ( VisuallyHidden , {
122130 children : 'Incomplete' ,
123131 } ) ;
124132
125133 badge = mountWithApp ( < Badge status = "attention" /> ) ;
126134
135+ // eslint-disable-next-line import/no-deprecated
127136 expect ( badge ) . toContainReactComponent ( VisuallyHidden , {
128137 children : 'Attention' ,
129138 } ) ;
130139
131140 badge = mountWithApp ( < Badge /> ) ;
132141
142+ // eslint-disable-next-line import/no-deprecated
133143 expect ( badge ) . not . toContainReactComponent ( VisuallyHidden ) ;
134144 } ) ;
135145} ) ;
@@ -140,24 +150,28 @@ describe('<Badge.Pip />', () => {
140150 < Badge . Pip status = "attention" progress = "incomplete" /> ,
141151 ) ;
142152
153+ // eslint-disable-next-line import/no-deprecated
143154 expect ( badge ) . toContainReactComponent ( VisuallyHidden , {
144155 children : 'Attention Incomplete' ,
145156 } ) ;
146157
147158 badge = mountWithApp ( < Badge . Pip progress = "partiallyComplete" /> ) ;
148159
160+ // eslint-disable-next-line import/no-deprecated
149161 expect ( badge ) . toContainReactComponent ( VisuallyHidden , {
150162 children : 'Partially complete' ,
151163 } ) ;
152164
153165 badge = mountWithApp ( < Badge . Pip status = "attention" /> ) ;
154166
167+ // eslint-disable-next-line import/no-deprecated
155168 expect ( badge ) . toContainReactComponent ( VisuallyHidden , {
156169 children : 'Attention Complete' ,
157170 } ) ;
158171
159172 badge = mountWithApp ( < Badge . Pip /> ) ;
160173
174+ // eslint-disable-next-line import/no-deprecated
161175 expect ( badge ) . toContainReactComponent ( VisuallyHidden , {
162176 children : 'Complete' ,
163177 } ) ;
0 commit comments