fix: update hint and test for cat photo app challenge (#46770)
parent
4bfa15857c
commit
36dd3e2f00
|
@ -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'
|
||||
);
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue