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:
a2937
2023-12-20 03:39:35 -05:00
committed by GitHub
parent ac09cc2df9
commit 130e330121

View File

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