11import { render , screen } from '@testing-library/react' ;
22import { kebabCase } from 'case-anything' ;
33import { Icon , IconSize } from '../Icon' ;
4- import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check -icon' ;
4+ import RhMicronsCheckmarkIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-checkmark -icon' ;
55import styles from '@patternfly/react-styles/css/components/Icon/icon' ;
66
77test ( 'renders basic icon successfully' , ( ) => {
88 const { asFragment } = render (
99 < Icon >
10- < CheckIcon />
10+ < RhMicronsCheckmarkIcon />
1111 </ Icon >
1212 ) ;
1313 expect ( asFragment ( ) ) . toMatchSnapshot ( ) ;
@@ -16,7 +16,7 @@ test('renders basic icon successfully', () => {
1616test ( 'checks basic icon structure' , ( ) => {
1717 render (
1818 < Icon title = "icon" >
19- < CheckIcon />
19+ < RhMicronsCheckmarkIcon />
2020 </ Icon >
2121 ) ;
2222 const iconContainer = screen . getByTitle ( 'icon' ) ;
@@ -33,7 +33,7 @@ test('renders without children', () => {
3333test ( 'sets additional custom class successfully' , ( ) => {
3434 render (
3535 < Icon className = "test" title = "custom-icon" >
36- < CheckIcon />
36+ < RhMicronsCheckmarkIcon />
3737 </ Icon >
3838 ) ;
3939 const iconContainer = screen . getByTitle ( 'custom-icon' ) ;
@@ -61,7 +61,7 @@ Object.values([
6161 test ( `sets icon size modifier successfully - ${ size } ` , ( ) => {
6262 render (
6363 < Icon iconSize = { size as IconSize } title = { `content-${ size } -icon` } >
64- < CheckIcon />
64+ < RhMicronsCheckmarkIcon />
6565 </ Icon >
6666 ) ;
6767 const iconContainer = screen . getByTitle ( `content-${ size } -icon` ) . querySelector ( `.${ styles . iconContent } ` ) ;
@@ -74,7 +74,7 @@ Object.values([
7474 test ( `sets progress icon size modifier successfully - ${ size } ` , ( ) => {
7575 render (
7676 < Icon isInProgress progressIconSize = { size as IconSize } title = { `progress-content-${ size } -icon` } >
77- < CheckIcon />
77+ < RhMicronsCheckmarkIcon />
7878 </ Icon >
7979 ) ;
8080 const iconContainer = screen . getByTitle ( `progress-content-${ size } -icon` ) . querySelector ( `.${ styles . iconProgress } ` ) ;
@@ -87,7 +87,7 @@ Object.values([
8787 test ( `sets size modifier successfully - ${ size } ` , ( ) => {
8888 render (
8989 < Icon size = { size as IconSize } title = { `${ size } -icon` } >
90- < CheckIcon />
90+ < RhMicronsCheckmarkIcon />
9191 </ Icon >
9292 ) ;
9393 const iconContainer = screen . getByTitle ( `${ size } -icon` ) ;
@@ -101,7 +101,7 @@ Object.values([
101101test ( 'check icon without iconSize' , ( ) => {
102102 render (
103103 < Icon title = "no-icon-size" >
104- < CheckIcon />
104+ < RhMicronsCheckmarkIcon />
105105 </ Icon >
106106 ) ;
107107 const iconContainer = screen . getByTitle ( 'no-icon-size' ) . querySelector ( `.${ styles . iconContent } ` ) ;
@@ -111,7 +111,7 @@ test('check icon without iconSize', () => {
111111test ( 'check icon without progress icon size' , ( ) => {
112112 render (
113113 < Icon title = "no-progress-icon-size" >
114- < CheckIcon />
114+ < RhMicronsCheckmarkIcon />
115115 </ Icon >
116116 ) ;
117117 const iconContainer = screen . getByTitle ( 'no-progress-icon-size' ) . querySelector ( `.${ styles . iconProgress } ` ) ;
@@ -121,7 +121,7 @@ test('check icon without progress icon size', () => {
121121test ( 'check icon without size' , ( ) => {
122122 render (
123123 < Icon title = "no-size" >
124- < CheckIcon />
124+ < RhMicronsCheckmarkIcon />
125125 </ Icon >
126126 ) ;
127127 const iconContainer = screen . getByTitle ( 'no-size' ) ;
@@ -132,7 +132,7 @@ Object.values(['custom', 'info', 'success', 'warning', 'danger']).forEach((statu
132132 test ( `sets status modifier successfully - ${ status } ` , ( ) => {
133133 render (
134134 < Icon status = { status as 'custom' | 'info' | 'success' | 'warning' | 'danger' } title = { `${ status } -icon` } >
135- < CheckIcon />
135+ < RhMicronsCheckmarkIcon />
136136 </ Icon >
137137 ) ;
138138 const iconContent = screen . getByTitle ( `${ status } -icon` ) . querySelector ( `.${ styles . iconContent } ` ) ;
@@ -144,7 +144,7 @@ Object.values(['custom', 'info', 'success', 'warning', 'danger']).forEach((statu
144144test ( 'check icon without status' , ( ) => {
145145 render (
146146 < Icon title = "no-status" >
147- < CheckIcon />
147+ < RhMicronsCheckmarkIcon />
148148 </ Icon >
149149 ) ;
150150 const iconContent = screen . getByTitle ( 'no-status' ) . querySelector ( `.${ styles . iconContent } ` ) ;
@@ -154,7 +154,7 @@ test('check icon without status', () => {
154154test ( 'sets isInline successfully' , ( ) => {
155155 render (
156156 < Icon isInline title = "inline-icon" >
157- < CheckIcon />
157+ < RhMicronsCheckmarkIcon />
158158 </ Icon >
159159 ) ;
160160 const iconContainer = screen . getByTitle ( 'inline-icon' ) ;
@@ -165,7 +165,7 @@ test('sets isInline successfully', () => {
165165test ( 'check icon without isInline' , ( ) => {
166166 render (
167167 < Icon title = "no-inline" >
168- < CheckIcon />
168+ < RhMicronsCheckmarkIcon />
169169 </ Icon >
170170 ) ;
171171 const iconContainer = screen . getByTitle ( 'no-inline' ) ;
@@ -175,7 +175,7 @@ test('check icon without isInline', () => {
175175test ( 'sets isInProgress successfully' , ( ) => {
176176 render (
177177 < Icon isInProgress title = "progress-icon" >
178- < CheckIcon />
178+ < RhMicronsCheckmarkIcon />
179179 </ Icon >
180180 ) ;
181181 const iconContainer = screen . getByTitle ( 'progress-icon' ) ;
@@ -188,7 +188,7 @@ test('sets isInProgress successfully', () => {
188188test ( 'check icon without isInProgress' , ( ) => {
189189 render (
190190 < Icon title = "no-in-progress" >
191- < CheckIcon />
191+ < RhMicronsCheckmarkIcon />
192192 </ Icon >
193193 ) ;
194194 const iconContainer = screen . getByTitle ( 'no-in-progress' ) ;
@@ -198,7 +198,7 @@ test('check icon without isInProgress', () => {
198198test ( 'sets default progres aria-label successfully' , ( ) => {
199199 render (
200200 < Icon isInProgress defaultProgressArialabel = "test" title = "progress-icon" >
201- < CheckIcon />
201+ < RhMicronsCheckmarkIcon />
202202 </ Icon >
203203 ) ;
204204
@@ -207,8 +207,8 @@ test('sets default progres aria-label successfully', () => {
207207
208208test ( 'renders progress icon successfully' , ( ) => {
209209 const { asFragment } = render (
210- < Icon isInProgress progressIcon = { < CheckIcon /> } >
211- < CheckIcon />
210+ < Icon isInProgress progressIcon = { < RhMicronsCheckmarkIcon /> } >
211+ < RhMicronsCheckmarkIcon />
212212 </ Icon >
213213 ) ;
214214 expect ( asFragment ( ) ) . toMatchSnapshot ( ) ;
0 commit comments