mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix: allow space in cafe css project step 32 (#52556)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
+6
-3
@@ -16,19 +16,22 @@ Add the class name `flavor` to the `French Vanilla` `p` element.
|
||||
You should add the `flavor` class to your `p` element.
|
||||
|
||||
```js
|
||||
assert(code.match(/<p\s*class\s*=\s*('|")flavor\1\s*>/i));
|
||||
const el = document.querySelector("p.flavor");
|
||||
assert.exists(el);
|
||||
```
|
||||
|
||||
You should only have one element with the `flavor` class.
|
||||
|
||||
```js
|
||||
assert($('.flavor').length === 1);
|
||||
const elements = document.querySelectorAll('.flavor');
|
||||
assert.lengthOf(elements, 1);
|
||||
```
|
||||
|
||||
Your `flavor` class should be on the `p` element with the text `French Vanilla`.
|
||||
|
||||
```js
|
||||
assert($('.flavor')[0].innerText.match(/French Vanilla/i));
|
||||
const el = document.querySelector(".flavor");
|
||||
assert.equal(el.innerText, "French Vanilla");
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user