From 25774229aac32d812d93b165c5d0133857cd4f2b Mon Sep 17 00:00:00 2001 From: Marie Malarme Date: Tue, 2 Mar 2021 17:48:55 +0000 Subject: [PATCH] Update the-calling test to check all the elements of the body --- dom/skeleton_test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dom/skeleton_test.js b/dom/skeleton_test.js index d588e96c..c84560f7 100644 --- a/dom/skeleton_test.js +++ b/dom/skeleton_test.js @@ -10,13 +10,13 @@ tests.push(async ({ page, eq }) => { eq(isValidTitle, true) // check the 3 sections have been created with the correct 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, })), ) - eq(expectedSections, sections) + eq(expectedSections, elements) }) const expectedSections = [