mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-28 21:00:56 +08:00
fix(curriculum): allow for new lines in element text in Design a Movie Review Page (#60933)
This commit is contained in:
parent
7091c5b0ed
commit
88e685ddca
@ -36,7 +36,7 @@ Inside the `main` element, you should have an `h1` element containing the movie
|
||||
|
||||
```js
|
||||
const h1 = document.querySelector("main > h1");
|
||||
assert.isAbove(h1?.innerText.length, 0);
|
||||
assert.isAbove(h1?.innerText.trim().length, 0);
|
||||
```
|
||||
|
||||
Below the `h1` element, you should have an `img` element with a descriptive `alt` attribute.
|
||||
@ -52,7 +52,7 @@ You should have a `p` element after the image that contains the movie descriptio
|
||||
```js
|
||||
const description = document.querySelector("main img + p");
|
||||
assert.isNotNull(description);
|
||||
assert.isNotEmpty(description.innerText);
|
||||
assert.isNotEmpty(description.innerText.trim());
|
||||
```
|
||||
|
||||
You should have another `p` element that contains the rating.
|
||||
@ -122,7 +122,7 @@ Your `h2` should have the text `Cast Members`.
|
||||
|
||||
```js
|
||||
const h2 = document.querySelector("h2");
|
||||
assert.equal(h2?.textContent, "Cast Members");
|
||||
assert.equal(h2?.textContent.trim(), "Cast Members");
|
||||
```
|
||||
|
||||
You should have a `ul` element after the `h2`.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user