From eb775d45db6bd71fd05ecd5d703b29c219db177c Mon Sep 17 00:00:00 2001 From: Ilenia <26656284+ilenia-magoni@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:18:59 +0100 Subject: [PATCH] feat(curriculum): add test to check anchor text (#57375) --- .../671141d8e32fe934c26fa1be.md | 6 ++++++ .../workshop-cat-photo-app/671b6e873249bb35c9debfcf.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/671141d8e32fe934c26fa1be.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/671141d8e32fe934c26fa1be.md index 02212302970..e6320cdcca3 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/671141d8e32fe934c26fa1be.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/671141d8e32fe934c26fa1be.md @@ -17,6 +17,12 @@ You should use the existing anchor element, do not create a new one. assert.lengthOf(document.querySelectorAll('a'), 1); ``` +The text inside the anchor element should not change, it must be `cat photos`. + +```js +assert.strictEqual(document.querySelector('a').innerText, "cat photos"); +``` + You should have the words `See more ` before the anchor element. Make sure you include the space after the last word. ```js diff --git a/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/671b6e873249bb35c9debfcf.md b/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/671b6e873249bb35c9debfcf.md index d5097ae0cb5..691e30fb4f8 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/671b6e873249bb35c9debfcf.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-cat-photo-app/671b6e873249bb35c9debfcf.md @@ -17,6 +17,12 @@ You should use the existing anchor element, do not create a new one. assert.lengthOf(document.querySelectorAll('a'), 1); ``` +The text inside the anchor element should not change, it must be `cat photos`. + +```js +assert.strictEqual(document.querySelector('a').innerText, "cat photos"); +``` + You should have the words `See more ` before the anchor element. ```js