@@ -4,37 +4,44 @@ import { configs, test } from '@utils/test/playwright';
44configs ( ) . forEach ( ( { config, screenshot, title } ) => {
55 test . describe ( title ( 'breadcrumbs: basic' ) , ( ) => {
66 test ( 'should not have visual regressions' , async ( { page } ) => {
7- await page . setContent ( `
7+ await page . setContent (
8+ `
89 <ion-breadcrumbs>
910 <ion-breadcrumb>First</ion-breadcrumb>
1011 <ion-breadcrumb>Second</ion-breadcrumb>
1112 <ion-breadcrumb>Third</ion-breadcrumb>
1213 <ion-breadcrumb>Fourth</ion-breadcrumb>
1314 </ion-breadcrumbs>
14- ` , config ) ;
15+ ` ,
16+ config
17+ ) ;
1518
1619 const breadcrumbs = page . locator ( 'ion-breadcrumbs' ) ;
1720
1821 await expect ( breadcrumbs ) . toHaveScreenshot ( screenshot ( `breadcrumbs-basic` ) ) ;
1922 } ) ;
2023
2124 test ( 'should not have visual regressions with links' , async ( { page } ) => {
22- await page . setContent ( `
25+ await page . setContent (
26+ `
2327 <ion-breadcrumbs>
2428 <ion-breadcrumb href="#">First</ion-breadcrumb>
2529 <ion-breadcrumb href="#">Second</ion-breadcrumb>
2630 <ion-breadcrumb href="#">Third</ion-breadcrumb>
2731 <ion-breadcrumb>Fourth</ion-breadcrumb>
2832 </ion-breadcrumbs>
29- ` , config ) ;
33+ ` ,
34+ config
35+ ) ;
3036
3137 const breadcrumbs = page . locator ( 'ion-breadcrumbs' ) ;
3238
3339 await expect ( breadcrumbs ) . toHaveScreenshot ( screenshot ( `breadcrumbs-links` ) ) ;
3440 } ) ;
3541
3642 test ( 'should not have visual regressions with custom separators' , async ( { page } ) => {
37- await page . setContent ( `
43+ await page . setContent (
44+ `
3845 <ion-breadcrumbs>
3946 <ion-breadcrumb>
4047 First
@@ -52,15 +59,18 @@ configs().forEach(({ config, screenshot, title }) => {
5259 Fourth
5360 </ion-breadcrumb>
5461 </ion-breadcrumbs>
55- ` , config ) ;
62+ ` ,
63+ config
64+ ) ;
5665
5766 const breadcrumbs = page . locator ( 'ion-breadcrumbs' ) ;
5867
5968 await expect ( breadcrumbs ) . toHaveScreenshot ( screenshot ( `breadcrumbs-custom-separators` ) ) ;
6069 } ) ;
6170
6271 test ( 'should not have visual regressions with slotted start icons' , async ( { page } ) => {
63- await page . setContent ( `
72+ await page . setContent (
73+ `
6474 <ion-breadcrumbs>
6575 <ion-breadcrumb>
6676 <ion-icon slot="start" name="home"></ion-icon>
@@ -79,15 +89,18 @@ configs().forEach(({ config, screenshot, title }) => {
7989 Fourth
8090 </ion-breadcrumb>
8191 </ion-breadcrumbs>
82- ` , config ) ;
92+ ` ,
93+ config
94+ ) ;
8395
8496 const breadcrumbs = page . locator ( 'ion-breadcrumbs' ) ;
8597
8698 await expect ( breadcrumbs ) . toHaveScreenshot ( screenshot ( `breadcrumbs-slotted-start-icons` ) ) ;
8799 } ) ;
88100
89101 test ( 'should not have visual regressions with slotted end icons' , async ( { page } ) => {
90- await page . setContent ( `
102+ await page . setContent (
103+ `
91104 <ion-breadcrumbs>
92105 <ion-breadcrumb>
93106 First
@@ -106,15 +119,18 @@ configs().forEach(({ config, screenshot, title }) => {
106119 <ion-icon slot="end" name="document"></ion-icon>
107120 </ion-breadcrumb>
108121 </ion-breadcrumbs>
109- ` , config ) ;
122+ ` ,
123+ config
124+ ) ;
110125
111126 const breadcrumbs = page . locator ( 'ion-breadcrumbs' ) ;
112127
113128 await expect ( breadcrumbs ) . toHaveScreenshot ( screenshot ( `breadcrumbs-slotted-end-icons` ) ) ;
114129 } ) ;
115130
116131 test ( 'should not have visual regressions in a toolbar' , async ( { page } ) => {
117- await page . setContent ( `
132+ await page . setContent (
133+ `
118134 <ion-toolbar>
119135 <ion-breadcrumbs>
120136 <ion-breadcrumb>First</ion-breadcrumb>
@@ -123,7 +139,9 @@ configs().forEach(({ config, screenshot, title }) => {
123139 <ion-breadcrumb>Fourth</ion-breadcrumb>
124140 </ion-breadcrumbs>
125141 </ion-toolbar>
126- ` , config ) ;
142+ ` ,
143+ config
144+ ) ;
127145
128146 const breadcrumbs = page . locator ( 'ion-breadcrumbs' ) ;
129147
@@ -138,43 +156,52 @@ configs().forEach(({ config, screenshot, title }) => {
138156configs ( { directions : [ 'ltr' ] } ) . forEach ( ( { config, screenshot, title } ) => {
139157 test . describe ( title ( 'breadcrumbs: states' ) , ( ) => {
140158 test ( 'should not have visual regressions when focused' , async ( { page } ) => {
141- await page . setContent ( `
159+ await page . setContent (
160+ `
142161 <ion-breadcrumbs>
143162 <ion-breadcrumb href="#">First</ion-breadcrumb>
144163 <ion-breadcrumb href="#">Second</ion-breadcrumb>
145164 <ion-breadcrumb href="#" class="ion-focused">Third</ion-breadcrumb>
146165 <ion-breadcrumb>Fourth</ion-breadcrumb>
147166 </ion-breadcrumbs>
148- ` , config ) ;
167+ ` ,
168+ config
169+ ) ;
149170
150171 const breadcrumbs = page . locator ( 'ion-breadcrumbs' ) ;
151172 await expect ( breadcrumbs ) . toHaveScreenshot ( screenshot ( `breadcrumbs-focused` ) ) ;
152173 } ) ;
153174
154175 test ( 'should not have visual regressions when all breadcrumbs are disabled' , async ( { page } ) => {
155- await page . setContent ( `
176+ await page . setContent (
177+ `
156178 <ion-breadcrumbs>
157179 <ion-breadcrumb disabled>First</ion-breadcrumb>
158180 <ion-breadcrumb disabled>Second</ion-breadcrumb>
159181 <ion-breadcrumb disabled>Third</ion-breadcrumb>
160182 <ion-breadcrumb disabled>Fourth</ion-breadcrumb>
161183 </ion-breadcrumbs>
162- ` , config ) ;
184+ ` ,
185+ config
186+ ) ;
163187
164188 const breadcrumbs = page . locator ( 'ion-breadcrumbs' ) ;
165189
166190 await expect ( breadcrumbs ) . toHaveScreenshot ( screenshot ( `breadcrumbs-all-disabled` ) ) ;
167191 } ) ;
168192
169193 test ( 'should not have visual regressions when one breadcrumb is disabled' , async ( { page } ) => {
170- await page . setContent ( `
194+ await page . setContent (
195+ `
171196 <ion-breadcrumbs>
172197 <ion-breadcrumb>First</ion-breadcrumb>
173198 <ion-breadcrumb disabled>Second</ion-breadcrumb>
174199 <ion-breadcrumb>Third</ion-breadcrumb>
175200 <ion-breadcrumb>Fourth</ion-breadcrumb>
176201 </ion-breadcrumbs>
177- ` , config ) ;
202+ ` ,
203+ config
204+ ) ;
178205
179206 const breadcrumbs = page . locator ( 'ion-breadcrumbs' ) ;
180207
0 commit comments