From 0dfda08a35f1b3554e2ed2f998767a229111123a Mon Sep 17 00:00:00 2001 From: Supravisor <153783117+Supravisor@users.noreply.github.com> Date: Fri, 9 May 2025 17:54:58 +1200 Subject: [PATCH] fix(curriculum): add test for href attribute in cat photo app (#60176) Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com> --- .../5dfa30b9eacea3f48c6300ad.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa30b9eacea3f48c6300ad.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa30b9eacea3f48c6300ad.md index 32ae9ffd925..22cf3de6c64 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa30b9eacea3f48c6300ad.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa30b9eacea3f48c6300ad.md @@ -70,6 +70,21 @@ assert( ); ``` +Your anchor (`a`) element does not have an `href` attribute. Check that there is a space after the opening tag's name and/or there are spaces before all attribute names. + +```js +assert.isTrue(document.querySelectorAll('a')[2]?.hasAttribute('href')); +``` + +Your anchor (`a`) element should link to `https://freecatphotoapp.com`. You have either omitted the URL or have a typo. + +```js +assert.equal( + document.querySelectorAll('a')[2]?.getAttribute('href').trim(), + 'https://freecatphotoapp.com' +); +``` + Your `img` element should be nested within the anchor (`a`) element. The entire `img` element should be inside the opening and closing tags of the anchor (`a`) element. ```js