@@ -8,7 +8,23 @@ const siteUrl = "http://localhost:3000"
88const sitemapPath = "./build/sitemap.xml"
99const stylesheetPath = "./tests/playwright-argos/screenshot.css"
1010const stylesheet = fs . readFileSync ( stylesheetPath ) . toString ( )
11- const ignoredPathnames = [ "/docs/reference/api" ]
11+ const ignoredPathnames = [
12+ // Thes files are too large to screenshot
13+ "/docs/reference/api" ,
14+ "/docs/hydra/reference/api" ,
15+ "/docs/kratos/reference/api" ,
16+ "/docs/keto/reference/api" ,
17+ "/docs/oathkeeper/reference/api" ,
18+ // the configuration pages are lazily loaded and the screenshot is sometimes taken before they are loaded
19+ "/docs/kratos/reference/configuration-editor" ,
20+ "/docs/hydra/reference/configuration-editor" ,
21+ "/docs/keto/reference/configuration-editor" ,
22+ "/docs/oathkeeper/reference/configuration-editor" ,
23+ "/docs/kratos/reference/configuration" ,
24+ "/docs/hydra/reference/configuration" ,
25+ "/docs/keto/reference/configuration" ,
26+ "/docs/oathkeeper/reference/configuration" ,
27+ ]
1228
1329// Wait for hydration, requires Docusaurus v2.4.3+
1430// Docusaurus adds a <html data-has-hydrated="true"> once hydrated
@@ -29,12 +45,7 @@ function screenshotPathname(pathname: string) {
2945
3046test . describe ( "Docusaurus site screenshots" , ( ) => {
3147 const pathnames = extractSitemapPathnames ( sitemapPath )
32-
33- for ( const p of pathnames ) {
34- if ( ignoredPathnames . includes ( p ) ) {
35- console . log ( `Ignoring ${ p } ` )
36- } else {
37- screenshotPathname ( p )
38- }
39- }
48+ pathnames
49+ . filter ( ( p ) => ! ignoredPathnames . includes ( p ) )
50+ . forEach ( screenshotPathname )
4051} )
0 commit comments