fix: step 65 don't accept wrong syntax (#47018)

pull/46956/head^2
Ilenia 2022-07-27 23:38:32 +02:00 committed by GitHub
parent fc17b83f2c
commit ea25aeb293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 7 deletions

View File

@ -14,31 +14,33 @@ Inside the `footer`, add a `p` element. Then, nest an anchor (`a`) element in th
You should not modify the existing `footer` element.
```js
assert($('footer').length === 1);
assert(document.querySelectorAll("footer").length === 1);
```
Your new `p` element should be nested within your `footer` element.
Your new `p` element should be nested within your `footer` element. You should have exactly one `p` element.
```js
assert($('footer').children('p').length === 1);
assert(document.querySelectorAll("footer > p").length === 1);
assert(document.querySelectorAll("footer p").length === 1);
```
Your new `a` element should be nested within your new `p` element.
Your new `a` element should be nested within your new `p` element. You should have exactly one `a` element.
```js
assert($('footer').children('p').children('a').length === 1);
assert(document.querySelectorAll("footer > p > a").length === 1);
assert(document.querySelectorAll("footer a").length === 1);
```
Your new `a` element should have the text `Visit our website`.
```js
assert($('footer').find('a')[0].innerText.match(/Visit our website/i));
assert(document.querySelector("footer > p > a")?.innerText === "Visit our website");
```
Your new `a` element should link to `https://www.freecodecamp.org`. Remember that `a` elements use the `href` attribute to create a link.
```js
assert($('footer').find('a').attr('href') === 'https://www.freecodecamp.org');
assert(document.querySelector("footer > p > a")?.href === "https://www.freecodecamp.org/");
```
# --seed--
@ -97,6 +99,7 @@ assert($('footer').find('a').attr('href') === 'https://www.freecodecamp.org');
</main>
--fcc-editable-region--
<footer>
</footer>
--fcc-editable-region--
</div>