Browse Source

build-brick-and-break: change files naming & replace deprecated method waitFor in the test

pull/761/head
Marie Malarme 3 years ago committed by Clément
parent
commit
70f1705a34
  1. 4
      dom/build-brick-and-break_test.js
  2. 6
      subjects/build-brick-and-break/README.md
  3. 0
      subjects/build-brick-and-break/build-brick-and-break.html

4
dom/build-brick-and-break_test.js

@ -19,7 +19,7 @@ tests.push(async ({ page, eq }) => {
const divs = await page.$$eval('div', (nodes) => nodes.length)
console.log(`step ${repeat + 1}: ${divs} bricks`)
buildSteps.push(divs)
await page.waitFor(1000)
await page.waitForTimeout(1000)
repeat++
}
@ -42,7 +42,7 @@ const allBricksIds = [...Array(54).keys()].map((i) => `brick-${i + 1}`)
tests.push(async ({ page, eq, getBricksIds }) => {
// check that all the bricks are here and have the correct id
await page.waitFor(3000)
await page.waitForTimeout(3000)
const bricksIds = await getBricksIds()
eq(bricksIds, allBricksIds)
})

6
subjects/build-brick-and-break/README.md

@ -30,11 +30,11 @@ Today, your mission is to build a 3-column brick tower, maintain it and finally
- [dataset](https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/dataset) / [`data-*`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*)
- [`remove()`](https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove)
### Provided files
### Files
You have at your disposal the following file that you can download to test locally:
You only need to create & submit the JS file `build-brick-and-break.js` ; we're providing you the following file to download (click right and save link) & test locally:
- the HTML file [index.html](/public/subjects/build-brick-and-break/index.html) to open in the browser, which includes:
- the HTML file [build-brick-and-break.html](/public/subjects/build-brick-and-break/build-brick-and-break.html) to open in the browser, which includes:
- the JS script running some code, and which will also allow to run yours
- some CSS pre-styled classes: feel free to use those as they are, or modify them

0
subjects/build-brick-and-break/index.html → subjects/build-brick-and-break/build-brick-and-break.html

Loading…
Cancel
Save