Fix: deleted undesired files, modified instructions, modified tests

This commit is contained in:
oumaimafisaoui 2024-07-08 13:59:43 +01:00 committed by Oumaima Fisaoui
parent d4635b3f6a
commit 0f76115885
4 changed files with 19 additions and 8 deletions

View File

@ -6,6 +6,19 @@ tests.push(async ({ page, eq }) => {
if (!title.length) throw Error('missing title') if (!title.length) throw Error('missing title')
}) })
tests.push(async ({ page, eq }) => {
// check that the title tag is set with text from the given list
const title = await page.$eval('title', (node) => node.textContent)
if (title !== 'invisibility' && title !== 'light-speed' && title !== 'super-strength' && title !== 'advanced-healing' && title !== 'mind-link') {
throw Error('wrong title, pick one of the list')
}
// invisibility
// light-speed
// super-strength
// advanced-healing
// mind-link
})
tests.push(async ({ page, eq }) => { tests.push(async ({ page, eq }) => {
// check the face // check the face
@ -19,7 +32,7 @@ tests.push(async ({ page, eq }) => {
}) })
tests.push(async ({ page, eq }) => { tests.push(async ({ page, eq }) => {
// check the lower-body, my favorite part // check the lower-body
return eq.$('section:nth-child(3)', { textContent: 'lower-body' }) return eq.$('section:nth-child(3)', { textContent: 'lower-body' })
}) })

Binary file not shown.

Binary file not shown.

View File

@ -8,14 +8,13 @@ To craft your robot friend, you first need to build its skeleton, and that's whe
> For the whole quest, the principle is to iterate over your code: when you finish an exercise, copy-paste your code to use it in the next one. > For the whole quest, the principle is to iterate over your code: when you finish an exercise, copy-paste your code to use it in the next one.
> Contrary to what you will see in the videos, you don't have to run a server on your machine to use the html css javascript thanks to the integrated code editor that takes care of all that. > Contrary to what you will see in the videos, you don't have to run a server on your machine to use the HTML, CSS and JavaScript thanks to the integrated code editor that takes care of all that.
> We've left the videos for the other educational content they provide. > We've left the videos for the other educational content they provide.
### Files naming ### Files naming
- for the HTML files: `name-of-the-exercise.html` - for the HTML files: `name-of-the-exercise.html`
- for the CSS files: when you have to link one, it's named like so: `name-of-the-exercise.css` - for the CSS files: when you have to link one, it's named like so: `name-of-the-exercise.css`
- for the JS files, when you have to link one, it's named like so: `name-of-the-exercise.js`
### Resources ### Resources
@ -25,7 +24,7 @@ We provide you with some content to get started smoothly, check it out!
- Video [Basic set up of an HTML page](https://www.youtube.com/watch?v=QtKoO7tT-Gg&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=1) - Video [Basic set up of an HTML page](https://www.youtube.com/watch?v=QtKoO7tT-Gg&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=1)
- Video [Different HTML tags overview](https://www.youtube.com/watch?v=Al-Jzpib8VY&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=2) - Video [Different HTML tags overview](https://www.youtube.com/watch?v=Al-Jzpib8VY&list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF&index=2)
Those videos are accompanying you step by step in each exercise, but if you want to check right away all the notions covered in the quest, you can watch the whole playlist [Web - HTML, CSS & DOM JS](https://www.youtube.com/playlist?list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF). Those videos are accompanying you step by step in each exercise, but if you want to check right away all the notions covered in the quest, you can watch the whole playlist throughout your next exercices[Web - HTML, CSS & DOM JavaScript](https://www.youtube.com/playlist?list=PLHyAJ_GrRtf979iZZ1N3qYMfsPj9PCCrF).
> Your working environment may not be exactly the same as what you see in the videos or documentation, just try to adapt your work according to your research and discoveries. > Your working environment may not be exactly the same as what you see in the videos or documentation, just try to adapt your work according to your research and discoveries.
> Don't be afraid to try! > Don't be afraid to try!
@ -36,8 +35,8 @@ Ready? Let's code!
> The first step to achieve in your quest is to craft the shape of your robot ; for that, 2 things needs to be done: > The first step to achieve in your quest is to craft the shape of your robot ; for that, 2 things needs to be done:
> >
> - Custumize the( [`<head>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head) tag) > - Customize the( [`<head>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head) tag)
> - Custumize the ([`<title>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title) tag) > - Customize the ([`<title>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title) tag)
To create any project, some things need to be declared in the HTML file - those are not visible elements in your page, but things cannot work without them. To create any project, some things need to be declared in the HTML file - those are not visible elements in your page, but things cannot work without them.
@ -55,8 +54,7 @@ Choose a power that you will give to your robot from the following list and put
This section contains the content of your webpage , in our case the lower body of your buddy. Define the skeleton of your robot by organizing it into three main sections: the face, the upper body, and the lower body. Inside the <body> tag of your HTML file, create three divisions using <section> tags, and place the following text content inside each one: face, upper-body, lower-body. This section contains the content of your webpage , in our case the lower body of your buddy. Define the skeleton of your robot by organizing it into three main sections: the face, the upper body, and the lower body. Inside the <body> tag of your HTML file, create three divisions using <section> tags, and place the following text content inside each one: face, upper-body, lower-body.
> Don't forget to press Render again to refresh the display page when you modify your code. > Don't forget to press Render again to refresh the display page when you modify your code.
> You can also see javascript code in the console at the bottom of the page, as in the previous quest.
### Code examples ### Code examples