From 36dd3e2f00af0374b13cc312667224a8e55c0d12 Mon Sep 17 00:00:00 2001 From: Lance <9701609+texas2010@users.noreply.github.com> Date: Wed, 6 Jul 2022 01:46:33 -0500 Subject: [PATCH] fix: update hint and test for cat photo app challenge (#46770) --- .../5dfa22d1b521be39a3de7be0.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md index 945c4d32f1e..695463b2e43 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md @@ -23,13 +23,21 @@ Your anchor (`a`) element should be nested within the `p` element. assert($('p > a').length); ``` +The link's href value should be `https://freecatphotoapp.com`. You have either omitted the href value or have a typo. + +```js +const nestedAnchor = $('p > a')[0]; +assert( + nestedAnchor.getAttribute('href') === 'https://freecatphotoapp.com' +); +``` + The link's text should be `cat photos`. You have either omitted the text or have a typo. ```js const nestedAnchor = $('p > a')[0]; assert( - nestedAnchor.getAttribute('href') === 'https://freecatphotoapp.com' && - nestedAnchor.innerText.toLowerCase().replace(/\s+/g, ' ') === 'cat photos' + nestedAnchor.innerText.toLowerCase().replace(/\s+/g, ' ') === 'cat photos' ); ```