mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-24 11:03:36 -05:00
fix(curriculum): warn user about spaces in registration form step 31 (#52044)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
@@ -42,7 +42,15 @@ assert.match(document.querySelector('fieldset:nth-child(3) + label > input + a')
|
||||
You should only wrap the `a` element around the text `terms and conditions`.
|
||||
|
||||
```js
|
||||
assert.equal(document.querySelector('fieldset:nth-child(3) + label > input + a')?.textContent, 'terms and conditions');
|
||||
assert.equal(document.querySelector('fieldset:nth-child(3) + label > input + a')?.textContent.trim(), 'terms and conditions');
|
||||
```
|
||||
|
||||
The text inside your anchor element has extra leading or trailing whitespace. The only spaces in the anchor text should be between the words `terms`, `and`, and `conditions`.
|
||||
|
||||
```js
|
||||
const nestedAnchor = document.querySelector('fieldset:nth-child(3) + label > input + a')?.textContent;
|
||||
const innerContent = nestedAnchor.innerHTML;
|
||||
assert.isNotTrue(/^\s+|\s+$/.test(innerContent));
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user