mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-24 11:03:17 -04:00
fix: step 30 registration form add test against wrong code (#47017)
* fix: add test against wrong code * feat: add mention of option elements
This commit is contained in:
@@ -7,7 +7,7 @@ dashedName: step-30
|
||||
|
||||
# --description--
|
||||
|
||||
Nest the `select` element within a `label` element with the text `How did you hear about us?`. The text should come before the `select` element.
|
||||
Nest the select element (with its option elements) within a `label` element with the text `How did you hear about us?`. The text should come before the `select` element.
|
||||
|
||||
# --hints--
|
||||
|
||||
@@ -29,6 +29,12 @@ You should place the text before the `select` element.
|
||||
assert.match(document.querySelector('fieldset:nth-child(3) > label:nth-child(3)')?.innerHTML?.trim().replace(/[\t\n]+/g, ''), /^How did you hear about us\?/);
|
||||
```
|
||||
|
||||
You should have 5 `option` elements inside the `select` element.
|
||||
|
||||
```js
|
||||
assert.equal(document.querySelectorAll('fieldset > label > select > option')?.length, 5);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
Reference in New Issue
Block a user