@@ -19,18 +19,18 @@ export const setContent = async (page: Page, html: string, testInfo: TestInfo, o
1919
2020 let mode : Mode ;
2121 let direction : Direction ;
22- let themeName : Theme ;
22+ let theme : Theme ;
2323 let palette : Palette ;
2424
2525 if ( options == undefined ) {
2626 mode = testInfo . project . metadata . mode ;
2727 direction = testInfo . project . metadata . rtl ? 'rtl' : 'ltr' ;
28- themeName = testInfo . project . metadata . theme ;
28+ theme = testInfo . project . metadata . theme ;
2929 palette = testInfo . project . metadata . palette ;
3030 } else {
3131 mode = options . mode ;
3232 direction = options . direction ;
33- themeName = options . theme ;
33+ theme = options . theme ;
3434 palette = options . palette ;
3535 }
3636
@@ -40,7 +40,7 @@ export const setContent = async (page: Page, html: string, testInfo: TestInfo, o
4040 // config passes in the importIonicFromCDN option. This is useful
4141 // when testing with the CDN version of Ionic.
4242 let ionicCSSImports =
43- themeName === 'ionic'
43+ theme === 'ionic'
4444 ? `
4545 <link href="${ baseUrl } /css/ionic/bundle.ionic.css" rel="stylesheet" />
4646 <link href="${ baseUrl } /css/utils.bundle.css" rel="stylesheet" />
@@ -54,7 +54,7 @@ export const setContent = async (page: Page, html: string, testInfo: TestInfo, o
5454
5555 if ( options ?. importIonicFromCDN ) {
5656 ionicCSSImports =
57- themeName === 'ionic'
57+ theme === 'ionic'
5858 ? `
5959 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ionic/core/css/ionic/bundle.ionic.css" />
6060 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ionic/core/css/utils.bundle.css" />
@@ -77,13 +77,14 @@ export const setContent = async (page: Page, html: string, testInfo: TestInfo, o
7777 <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
7878 ${ ionicCSSImports }
7979 <link href="${ baseUrl } /scripts/testing/styles.css" rel="stylesheet" />
80+ ${ palette !== 'light' ? `<link href="${ baseUrl } /css/palettes/${ palette } .always.css" rel="stylesheet" />` : '' }
8081 <script src="${ baseUrl } /scripts/testing/scripts.js"></script>
8182 ${ ionicJSImports }
8283 <script>
8384 window.Ionic = {
8485 config: {
8586 mode: '${ mode } ',
86- theme: '${ themeName } ',
87+ theme: '${ theme } ',
8788 }
8889 }
8990 </script>
@@ -106,7 +107,7 @@ export const setContent = async (page: Page, html: string, testInfo: TestInfo, o
106107
107108 testInfo . annotations . push ( {
108109 type : 'theme' ,
109- description : themeName ,
110+ description : theme ,
110111 } ) ;
111112
112113 if ( baseUrl ) {
0 commit comments