From 3f88f7ead5815b9ff66bbf08d8c6086ee1687f61 Mon Sep 17 00:00:00 2001 From: Oumaimafisaoui Date: Tue, 16 Jul 2024 17:09:53 +0100 Subject: [PATCH 1/5] feat/test(DPxAI): Added the subject and modified naming for the test of Quest00/Ex01 and modified the .gitignore file --- .gitignore | 1 + dom/{the-calling_test.js => call-it_test.js} | 0 subjects/DPxAI/call_it/README.md | 41 ++++++++++++++++++++ 3 files changed, 42 insertions(+) rename dom/{the-calling_test.js => call-it_test.js} (100%) create mode 100644 subjects/DPxAI/call_it/README.md diff --git a/.gitignore b/.gitignore index 6ab1d6dfb4..beddb3fc4a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules rust/**/target/ js/soluss +**/.DS_Store diff --git a/dom/the-calling_test.js b/dom/call-it_test.js similarity index 100% rename from dom/the-calling_test.js rename to dom/call-it_test.js diff --git a/subjects/DPxAI/call_it/README.md b/subjects/DPxAI/call_it/README.md new file mode 100644 index 0000000000..06bd18778f --- /dev/null +++ b/subjects/DPxAI/call_it/README.md @@ -0,0 +1,41 @@ +## Call it + +> Brainpower mode + +### Context + +Congrats! You created the very first base for your entity and you witnessed its appearance in the Digital +World - your browser.. However, it is still a tiny seed of the marvelous thing it could become. Be patient; +there's still a bit of work to do. + +### Directions + +First of all, instead of writing down what things are _(you're not writing down on your hand the word 'hand', +are you?)_, we're going to identify them semantically with the very practical [id +attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attri butes/id). This `id` has to be a **unique** +identifier on your webpage, allowing you to target your element when needed. You can compare it to your name and +surname; this is what identifies you to other people, and if someone's calling you by your name, you answer. + +### Instructions + +So let's identify the 3 elements we have so far: in each section, remove the text content from inside the tag +and set it as the value of the `id` attribute of the corresponding `section` text. + +**Run your code in the editor preview:** \ +you don't see _anything_? Don't freak out! \ +Inspect the HTML that has been created with your +[browser inspector tool](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools), +and if you done it correctly, you should see the 3 sections inside the `body` with the `id` attribute set in +your HTML structure. + +### Code examples + +To set the `id` of a `div` tag to `"my-lil-div"`: + +```html +
+``` + +### Notions + +- [`id` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) From c7f2ee3a6759bcf73ffc8f7351c43b6b072011a0 Mon Sep 17 00:00:00 2001 From: Oumaimafisaoui Date: Tue, 16 Jul 2024 20:19:27 +0100 Subject: [PATCH 2/5] test(DPxAI:Quest00/Ex01): Fixing the naming in test to be snake_case --- dom/{call-it_test.js => call_it_test.html} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename dom/{call-it_test.js => call_it_test.html} (100%) diff --git a/dom/call-it_test.js b/dom/call_it_test.html similarity index 100% rename from dom/call-it_test.js rename to dom/call_it_test.html From 7e7d4530f107be0c428da3484cf3fd4b847153de Mon Sep 17 00:00:00 2001 From: Oumaimafisaoui Date: Tue, 16 Jul 2024 20:22:20 +0100 Subject: [PATCH 3/5] test(DPxAI:Quest00/Ex01): Fixing the naming in test to be snake_case and changing the folders names to be in kebab-case --- subjects/DPxAI/{call_it => call-it}/README.md | 0 subjects/DPxAI/{the_skeleton => the-skeleton}/README.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename subjects/DPxAI/{call_it => call-it}/README.md (100%) rename subjects/DPxAI/{the_skeleton => the-skeleton}/README.md (100%) diff --git a/subjects/DPxAI/call_it/README.md b/subjects/DPxAI/call-it/README.md similarity index 100% rename from subjects/DPxAI/call_it/README.md rename to subjects/DPxAI/call-it/README.md diff --git a/subjects/DPxAI/the_skeleton/README.md b/subjects/DPxAI/the-skeleton/README.md similarity index 100% rename from subjects/DPxAI/the_skeleton/README.md rename to subjects/DPxAI/the-skeleton/README.md From 5c616515981fb560079d7e2776f09de033ac50b6 Mon Sep 17 00:00:00 2001 From: Oumaimafisaoui Date: Tue, 16 Jul 2024 20:46:34 +0100 Subject: [PATCH 4/5] test(DPxAI:Quest00/Ex01): Duplicating the tests instead of overriding the existing ones: the-skelton and call-it --- dom/{call_it_test.html => call-it_test.js} | 0 dom/skeleton_test.js | 25 +++++++++++ dom/the-calling_test.js | 19 +++++++++ ..._skeleton_test.js => the-skeleton_test.js} | 0 subjects/DPxAI/call_it/README.md | 41 +++++++++++++++++++ 5 files changed, 85 insertions(+) rename dom/{call_it_test.html => call-it_test.js} (100%) create mode 100644 dom/skeleton_test.js create mode 100644 dom/the-calling_test.js rename dom/{the_skeleton_test.js => the-skeleton_test.js} (100%) create mode 100644 subjects/DPxAI/call_it/README.md diff --git a/dom/call_it_test.html b/dom/call-it_test.js similarity index 100% rename from dom/call_it_test.html rename to dom/call-it_test.js diff --git a/dom/skeleton_test.js b/dom/skeleton_test.js new file mode 100644 index 0000000000..832ee03939 --- /dev/null +++ b/dom/skeleton_test.js @@ -0,0 +1,25 @@ +export const tests = [] + +tests.push(async ({ page, eq }) => { + // check that the title tag is present & is set with some text + const title = await page.$eval('title', (node) => node.textContent) + if (!title.length) throw Error('missing title') +}) + +tests.push(async ({ page, eq }) => { + // check the face + + return eq.$('section:nth-child(1)', { textContent: 'face' }) +}) + +tests.push(async ({ page, eq }) => { + // check the upper-body + + return eq.$('section:nth-child(2)', { textContent: 'upper-body' }) +}) + +tests.push(async ({ page, eq }) => { + // check the lower-body, my favorite part + + return eq.$('section:nth-child(3)', { textContent: 'lower-body' }) +}) diff --git a/dom/the-calling_test.js b/dom/the-calling_test.js new file mode 100644 index 0000000000..e6aaea82ed --- /dev/null +++ b/dom/the-calling_test.js @@ -0,0 +1,19 @@ +export const tests = [] + +tests.push(async ({ page, eq }) => { + // check the face + + return eq.$('section#face', { textContent: '' }) +}) + +tests.push(async ({ page, eq }) => { + // check the upper-body + + return eq.$('section#upper-body', { textContent: '' }) +}) + +tests.push(async ({ page, eq }) => { + // check the lower-body, my favorite part + + return eq.$('section#lower-body', { textContent: '' }) +}) diff --git a/dom/the_skeleton_test.js b/dom/the-skeleton_test.js similarity index 100% rename from dom/the_skeleton_test.js rename to dom/the-skeleton_test.js diff --git a/subjects/DPxAI/call_it/README.md b/subjects/DPxAI/call_it/README.md new file mode 100644 index 0000000000..06bd18778f --- /dev/null +++ b/subjects/DPxAI/call_it/README.md @@ -0,0 +1,41 @@ +## Call it + +> Brainpower mode + +### Context + +Congrats! You created the very first base for your entity and you witnessed its appearance in the Digital +World - your browser.. However, it is still a tiny seed of the marvelous thing it could become. Be patient; +there's still a bit of work to do. + +### Directions + +First of all, instead of writing down what things are _(you're not writing down on your hand the word 'hand', +are you?)_, we're going to identify them semantically with the very practical [id +attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attri butes/id). This `id` has to be a **unique** +identifier on your webpage, allowing you to target your element when needed. You can compare it to your name and +surname; this is what identifies you to other people, and if someone's calling you by your name, you answer. + +### Instructions + +So let's identify the 3 elements we have so far: in each section, remove the text content from inside the tag +and set it as the value of the `id` attribute of the corresponding `section` text. + +**Run your code in the editor preview:** \ +you don't see _anything_? Don't freak out! \ +Inspect the HTML that has been created with your +[browser inspector tool](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools), +and if you done it correctly, you should see the 3 sections inside the `body` with the `id` attribute set in +your HTML structure. + +### Code examples + +To set the `id` of a `div` tag to `"my-lil-div"`: + +```html +
+``` + +### Notions + +- [`id` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) From 08ff6c7fb7abf5e41c1b87c8847a8e87d25734fe Mon Sep 17 00:00:00 2001 From: oumaimafisaoui Date: Sun, 21 Jul 2024 17:15:02 +0100 Subject: [PATCH 5/5] Chore(DPxAI): Deleted call_it folder --- subjects/DPxAI/call_it/README.md | 41 -------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 subjects/DPxAI/call_it/README.md diff --git a/subjects/DPxAI/call_it/README.md b/subjects/DPxAI/call_it/README.md deleted file mode 100644 index 06bd18778f..0000000000 --- a/subjects/DPxAI/call_it/README.md +++ /dev/null @@ -1,41 +0,0 @@ -## Call it - -> Brainpower mode - -### Context - -Congrats! You created the very first base for your entity and you witnessed its appearance in the Digital -World - your browser.. However, it is still a tiny seed of the marvelous thing it could become. Be patient; -there's still a bit of work to do. - -### Directions - -First of all, instead of writing down what things are _(you're not writing down on your hand the word 'hand', -are you?)_, we're going to identify them semantically with the very practical [id -attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attri butes/id). This `id` has to be a **unique** -identifier on your webpage, allowing you to target your element when needed. You can compare it to your name and -surname; this is what identifies you to other people, and if someone's calling you by your name, you answer. - -### Instructions - -So let's identify the 3 elements we have so far: in each section, remove the text content from inside the tag -and set it as the value of the `id` attribute of the corresponding `section` text. - -**Run your code in the editor preview:** \ -you don't see _anything_? Don't freak out! \ -Inspect the HTML that has been created with your -[browser inspector tool](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools), -and if you done it correctly, you should see the 3 sections inside the `body` with the `id` attribute set in -your HTML structure. - -### Code examples - -To set the `id` of a `div` tag to `"my-lil-div"`: - -```html -
-``` - -### Notions - -- [`id` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id)