From 70f1705a348a3ae722b677436d77cea60d60acbb Mon Sep 17 00:00:00 2001 From: Marie Malarme Date: Thu, 4 Mar 2021 19:40:18 +0000 Subject: [PATCH] build-brick-and-break: change files naming & replace deprecated method waitFor in the test --- dom/build-brick-and-break_test.js | 4 ++-- subjects/build-brick-and-break/README.md | 6 +++--- .../{index.html => build-brick-and-break.html} | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename subjects/build-brick-and-break/{index.html => build-brick-and-break.html} (100%) diff --git a/dom/build-brick-and-break_test.js b/dom/build-brick-and-break_test.js index b2e7e603..4669fe5d 100644 --- a/dom/build-brick-and-break_test.js +++ b/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) }) diff --git a/subjects/build-brick-and-break/README.md b/subjects/build-brick-and-break/README.md index 11dbf588..205b2bb0 100644 --- a/subjects/build-brick-and-break/README.md +++ b/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 diff --git a/subjects/build-brick-and-break/index.html b/subjects/build-brick-and-break/build-brick-and-break.html similarity index 100% rename from subjects/build-brick-and-break/index.html rename to subjects/build-brick-and-break/build-brick-and-break.html