fix(curriculum): add test for href attribute in cat photo app (#60176)

Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com>
This commit is contained in:
Supravisor
2025-05-09 17:54:58 +12:00
committed by GitHub
parent 33cd29513e
commit 0dfda08a35

View File

@@ -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