fix: fix registration form instructions and tests (#52413)

This commit is contained in:
evankart
2023-11-28 13:57:24 -08:00
committed by GitHub
parent fb1a5ab16f
commit 7817eb0d36

View File

@@ -7,7 +7,7 @@ dashedName: step-31
# --description--
Add `I accept the terms and conditions` text to the newly added label, then link the text `terms and conditions` to the following location:
Add the text `I accept the terms and conditions` immediately after the `input` element in the newly added label. Then link the text `terms and conditions` to the following location:
```md
https://www.freecodecamp.org/news/terms-of-service/
@@ -21,7 +21,13 @@ You should add `I accept the terms and conditions` text to the label following t
assert.equal(document.querySelector('fieldset:nth-child(3) + label')?.innerText.trim(), 'I accept the terms and conditions');
```
You should use an `a` element to link to the terms and conditions.
You should use an `a` element to link to the terms and conditions.
```js
assert.exists(document.querySelector('fieldset:nth-child(3) + label a'));
```
You should put the new text immediately after the `input` element in the `label`.
```js
assert.exists(document.querySelector('fieldset:nth-child(3) + label > input + a'));