fix(curriculum) - Correct HTML Forms registration step 17 (#49645)

* Fix(curriculum) - Correct HTML Forms registration step 17

* Match start of html and ensure there is at least one space.

* Cleanup.

* Use assert.match instead of assert.equal.

* Make sure assert.match is used where it's applicable.
This commit is contained in:
a2937
2023-03-24 16:43:36 -04:00
committed by GitHub
parent 13b410e48b
commit 3c8320ff72
@@ -26,25 +26,29 @@ assert.equal(document.querySelectorAll('label input')?.length, 4);
You should add the first `input` after the `label` text `Enter Your First Name:`, and include a space after the colon.
```js
assert.equal(document.querySelectorAll('label')?.[0]?.innerHTML.trim(), 'Enter Your First Name: <input>');
const query = /^Enter Your First Name:\s+<input>/
assert.match(document.querySelectorAll('label')?.[0]?.innerHTML.trim(), query);
```
You should add the second `input` after the `label` text `Enter Your Last Name:`, and include a space after the colon.
```js
assert.equal(document.querySelectorAll('label')?.[1]?.innerHTML.trim(), 'Enter Your Last Name: <input>');
const query = /^Enter Your Last Name:\s+<input>/
assert.match(document.querySelectorAll('label')?.[1]?.innerHTML.trim(), query);
```
You should add the third `input` after the `label` text `Enter Your Email:`, and include a space after the colon.
```js
assert.equal(document.querySelectorAll('label')?.[2]?.innerHTML.trim(), 'Enter Your Email: <input>');
const query = /^Enter Your Email:\s+<input>/
assert.match(document.querySelectorAll('label')?.[2]?.innerHTML.trim(), query);
```
You should add the fourth `input` after the `label` text `Create a New Password:`, and include a space after the colon.
```js
assert.equal(document.querySelectorAll('label')?.[3]?.innerHTML.trim(), 'Create a New Password: <input>');
const query = /^Create a New Password:\s+<input>/
assert.match(document.querySelectorAll('label')?.[3]?.innerHTML.trim(), query);
```
# --seed--