fix: update hint and test for cat photo app challenge (#46770)

pull/46773/head
Lance 2022-07-06 01:46:33 -05:00 committed by GitHub
parent 4bfa15857c
commit 36dd3e2f00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -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'
);
```