diff --git a/integration-tests/artifacts/__tests__/index.js b/integration-tests/artifacts/__tests__/index.js index 94fdad3d220e6..099643ae9d09a 100644 --- a/integration-tests/artifacts/__tests__/index.js +++ b/integration-tests/artifacts/__tests__/index.js @@ -169,7 +169,11 @@ function assertHTMLCorrectness(runNumber) { ? `component---src-templates-deps-page-query-js` : `component---src-templates-deps-page-query-alternative-js` + const expectedBackground = + runNumber < 6 ? `white` : runNumber === 6 ? `yellow` : `green` + let pageDataContent + let htmlContent beforeAll(() => { pageDataContent = fs.readJsonSync( path.join( @@ -180,12 +184,8 @@ function assertHTMLCorrectness(runNumber) { `page-data.json` ) ) - }) - it(`html built is using correct template (${ - runNumber <= 1 ? `default` : `alternative` - })`, () => { - const htmlContent = fs.readFileSync( + htmlContent = fs.readFileSync( path.join( process.cwd(), `public`, @@ -194,7 +194,20 @@ function assertHTMLCorrectness(runNumber) { ), `utf-8` ) + }) + it(`correct css is inlined in html file (${expectedBackground})`, () => { + expect(htmlContent).toMatch( + new RegExp( + `