From 4df630590644a3c4f5c09963f89c5a0181978257 Mon Sep 17 00:00:00 2001 From: nprimo Date: Tue, 14 Mar 2023 18:02:56 +0000 Subject: [PATCH] fix(fifty-shades-of-cold): fix test - change querySelector for first test --- dom/fifty-shades-of-cold_test.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dom/fifty-shades-of-cold_test.js b/dom/fifty-shades-of-cold_test.js index f26b9966e..74ffd4797 100644 --- a/dom/fifty-shades-of-cold_test.js +++ b/dom/fifty-shades-of-cold_test.js @@ -13,10 +13,13 @@ export const tests = [] tests.push(async ({ page, eq }) => { // check that the css is properly generated - const style = await page.$$eval('style', nodes => nodes[1].innerHTML) - const classes = style - .split('}') - .map(s => s.replace(/(\.|{|:|;|\s+)/g, '')) + const style = await page.$$eval('head style', nodes => + nodes.map(n => n.innerText), + ) + + const classes = style[0] + .split('\n') + .map(s => s.replace(/(\.|{|:|;|\s+|})/g, '')) .filter(Boolean) .sort()