mirror of https://github.com/01-edu/public.git
Update the-calling test to check all the elements of the body
This commit is contained in:
parent
d7419b4a64
commit
25774229aa
|
@ -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 = [
|
||||
|
|
Loading…
Reference in New Issue