From d753240d2051d8c1528f372f37a81e7d22802e79 Mon Sep 17 00:00:00 2001 From: Marie Malarme Date: Tue, 2 Mar 2021 17:50:05 +0000 Subject: [PATCH] Update the-calling test to check all the elements of the body --- dom/the-calling_test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dom/the-calling_test.js b/dom/the-calling_test.js index 7e6f1377..bd96f49e 100644 --- a/dom/the-calling_test.js +++ b/dom/the-calling_test.js @@ -2,14 +2,14 @@ export const tests = [] tests.push(async ({ page, eq }) => { // check the 3 sections have the correct id and no text - const sections = await page.$$eval('section', (nodes) => - nodes.map((node) => ({ + const elements = await page.$$eval('body', (nodes) => + [...nodes[0].children].map((node) => ({ tag: node.tagName.toLowerCase(), text: node.textContent, id: node.id, })), ) - eq(expectedSections, sections) + eq(expectedSections, elements) }) const expectedSections = [