File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,17 @@ import { ScreenshotPageObject } from "@cloudscape-design/browser-test-tools/page
99import { setupTest } from "../utils" ;
1010
1111const pagesMap = import . meta. glob ( "../../pages/**/*.page.tsx" , { as : "raw" } ) ;
12- const pages = Object . keys ( pagesMap )
12+ const allPages = Object . keys ( pagesMap )
1313 . map ( ( page ) => page . replace ( / \. p a g e \. t s x $ / , "" ) )
1414 . map ( ( page ) => "/#/" + path . relative ( "../../pages/" , page ) + "?screenshotMode=true" ) ;
1515
16- test . each ( pages ) ( "matches snapshot for %s" , ( route ) =>
16+ const rtlPages = allPages
17+ . filter ( ( page ) => page . includes ( "no-data-states" ) || page . includes ( "website-playground-examples" ) )
18+ . map ( ( page ) => page + "&direction=rtl" ) ;
19+
20+ test . each ( [ ...allPages , ...rtlPages ] ) ( "matches snapshot for %s" , ( route ) =>
1721 setupTest ( route , ScreenshotPageObject , async ( page ) => {
1822 const hasScreenshotArea = await page . isExisting ( ".screenshot-area" ) ;
19-
2023 if ( hasScreenshotArea ) {
2124 await page . waitForJsTimers ( 100 ) ;
2225 const pngString = await page . fullPageScreenshot ( ) ;
You can’t perform that action at this time.
0 commit comments