Skip to content

Commit 10d8fc6

Browse files
authored
fix(curriculum): specific assert methods now used in registration form workshop (freeCodeCamp#59890)
1 parent 5a1cb8e commit 10d8fc6

File tree

10 files changed

+33
-33
lines changed

10 files changed

+33
-33
lines changed

curriculum/challenges/english/25-front-end-development/workshop-registration-form/60f803d5241e6a0433a523a1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dashedName: step-11
99

1010
In the previous lecture videos, you learned how to work with `rem` units. Remember that `rem` unit stands for root `em`, and is relative to the font size of the `html` element.
1111

12-
As `label` elements are inline by default, they are all displayed side by side on the same line, making their text hard to read.
12+
As `label` elements are inline by default, they are all displayed side by side on the same line, making their text hard to read.
1313

1414
To make them appear on separate lines, add `display: block` to the `label` element, and add a `margin` of `0.5rem 0`, to separate them from each other.
1515

curriculum/challenges/english/25-front-end-development/workshop-registration-form/60f8604682407e0d017bbf7f.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ dashedName: step-21
1010
Within each corresponding `label` element, and immediately after the `input` element, add a space and add the following text:
1111

1212
```md
13-
Personal
14-
Business
13+
Personal
14+
Business
1515
```
1616

1717
# --hints--

curriculum/challenges/english/25-front-end-development/workshop-registration-form/60fab8367d35de04e5cb7929.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ You should add `I accept the terms and conditions` text to the `label` following
2121
assert.equal(document.querySelector('fieldset:nth-child(3) + label')?.innerText.trim(), 'I accept the terms and conditions');
2222
```
2323
24-
You should use an `a` element to link to the terms and conditions.
24+
You should use an `a` element to link to the terms and conditions.
2525
2626
```js
2727
assert.exists(document.querySelector('fieldset:nth-child(3) + label a'));
2828
```
2929
30-
You should put the new text immediately after the `input` element in the `label`.
30+
You should put the new text immediately after the `input` element in the `label`.
3131
3232
```js
3333
assert.exists(document.querySelector('fieldset:nth-child(3) + label > input + a'));

curriculum/challenges/english/25-front-end-development/workshop-registration-form/60fadfa2b540b70dcfa8b771.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ Start, by giving the `input` elements in the second `fieldset` a class of `inlin
1616
You should give the first `input` a class of `inline`.
1717

1818
```js
19-
assert(document.querySelectorAll('fieldset:nth-child(2) input')?.[0]?.classList?.contains('inline'));
19+
assert.isTrue(document.querySelectorAll('fieldset:nth-child(2) input')?.[0]?.classList?.contains('inline'));
2020
```
2121
2222
You should give the second `input` a class of `inline`.
2323
2424
```js
25-
assert(document.querySelectorAll('fieldset:nth-child(2) input')?.[1]?.classList?.contains('inline'));
25+
assert.isTrue(document.querySelectorAll('fieldset:nth-child(2) input')?.[1]?.classList?.contains('inline'));
2626
```
2727
2828
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-registration-form/60ffefd6479a3d084fb77cbc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ dashedName: step-59
77

88
# --description--
99

10-
Make the `input` for the terms and conditions `inline` by adding the appropriate class in the HTML.
10+
Make the `input` for the terms and conditions `inline` by adding the appropriate class in the HTML.
1111

1212

1313
# --hints--
1414

1515
You should give the `input` a class of `inline`.
1616

1717
```js
18-
assert(document.querySelector('fieldset:nth-child(3) + label > input')?.classList?.contains('inline'));
18+
assert.isTrue(document.querySelector('fieldset:nth-child(3) + label > input')?.classList?.contains('inline'));
1919
```
2020
2121
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-registration-form/62b30924c5e4ef0daba23b5e.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ In the previous lecture videos, you learned how to work with the `last-of-type`
1515
p:last-of-type { }
1616
```
1717

18-
That will select the last `p` element.
18+
That will select the last `p` element.
1919

2020
Create a new selector that targets the last `fieldset` element and set its `border-bottom` to `none`.
2121

@@ -31,7 +31,7 @@ Your `fieldset:last-of-type` should have `border-bottom` set as `none`.
3131

3232
```js
3333
const borderBottom = new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type')?.borderBottom;
34-
assert(borderBottom === 'none' || borderBottom === 'medium none' || borderBottom === 'medium');
34+
assert.oneOf(borderBottom, ['none', 'medium none', 'medium']);
3535
```
3636
3737
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-registration-form/62ff8b9dab5ac88e4d3d43a3.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,49 +16,49 @@ Use `first-name`, `last-name`, `email`, and `new-password` as values for the res
1616
The first `input` element should have an `id` of `first-name`.
1717

1818
```js
19-
assert(document.querySelectorAll('input')?.[0]?.matches('#first-name'))
19+
assert.isTrue(document.querySelectorAll('input')?.[0]?.matches('#first-name'))
2020
```
2121
2222
The second `input` element should have an `id` of `last-name`.
2323
2424
```js
25-
assert(document.querySelectorAll('input')?.[1]?.matches('#last-name'))
25+
assert.isTrue(document.querySelectorAll('input')?.[1]?.matches('#last-name'))
2626
```
2727
2828
The third `input` element should have an `id` of `email`.
2929
3030
```js
31-
assert(document.querySelectorAll('input')?.[2]?.matches('#email'))
31+
assert.isTrue(document.querySelectorAll('input')?.[2]?.matches('#email'))
3232
```
3333
3434
The fourth `input` element should have an `id` of `new-password`.
3535
3636
```js
37-
assert(document.querySelectorAll('input')?.[3]?.matches('#new-password'))
37+
assert.isTrue(document.querySelectorAll('input')?.[3]?.matches('#new-password'))
3838
```
3939
4040
The first `label` element should have a `for` attribute with a value of `first-name`.
4141
4242
```js
43-
assert(document.querySelectorAll('label')?.[0]?.matches('label[for="first-name"]'))
43+
assert.isTrue(document.querySelectorAll('label')?.[0]?.matches('label[for="first-name"]'))
4444
```
4545
4646
The second `label` element should have a `for` attribute with a value of `last-name`.
4747
4848
```js
49-
assert(document.querySelectorAll('label')?.[1]?.matches('label[for="last-name"]'))
49+
assert.isTrue(document.querySelectorAll('label')?.[1]?.matches('label[for="last-name"]'))
5050
```
5151
5252
The third `label` element should have a `for` attribute with a value of `email`.
5353
5454
```js
55-
assert(document.querySelectorAll('label')?.[2]?.matches('label[for="email"]'))
55+
assert.isTrue(document.querySelectorAll('label')?.[2]?.matches('label[for="email"]'))
5656
```
5757
5858
The fourth `label` element should have a `for` attribute with a value of `new-password`.
5959
6060
```js
61-
assert(document.querySelectorAll('label')?.[3]?.matches('label[for="new-password"]'))
61+
assert.isTrue(document.querySelectorAll('label')?.[3]?.matches('label[for="new-password"]'))
6262
```
6363
6464
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-registration-form/62ff8e998d3e7eae14d6ae3b.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ assert.equal(document.querySelector('fieldset:nth-child(3) + label > input')?.re
4242
The `input` element should have an `id` of `terms-and-conditions`.
4343
4444
```js
45-
assert(document.querySelector('fieldset:nth-child(3) + label > input')?.matches('#terms-and-conditions'))
45+
assert.isTrue(document.querySelector('fieldset:nth-child(3) + label > input')?.matches('#terms-and-conditions'))
4646
```
4747
4848
The `label` element should have a `for` attribute with a value of `terms-and-conditions`.
4949
5050
```js
51-
assert(document.querySelector('fieldset:nth-child(3) + label')?.matches('label[for="terms-and-conditions"]'))
51+
assert.isTrue(document.querySelector('fieldset:nth-child(3) + label')?.matches('label[for="terms-and-conditions"]'))
5252
```
5353
5454
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-registration-form/62ff919a7b5612c0670923a5.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,49 +16,49 @@ Use `profile-picture`, `age`, `referrer`, and `bio` as values for the respective
1616
The first `input` element should have an `id` of `profile-picture`.
1717

1818
```js
19-
assert(document.querySelectorAll('fieldset:nth-of-type(3) input')?.[0]?.matches('#profile-picture'))
19+
assert.isTrue(document.querySelectorAll('fieldset:nth-of-type(3) input')?.[0]?.matches('#profile-picture'))
2020
```
2121
2222
The second `input` element should have an `id` of `age`.
2323
2424
```js
25-
assert(document.querySelectorAll('fieldset:nth-of-type(3) input')?.[1]?.matches('#age'))
25+
assert.isTrue(document.querySelectorAll('fieldset:nth-of-type(3) input')?.[1]?.matches('#age'))
2626
```
2727
2828
The `select` element should have an `id` of `referrer`.
2929
3030
```js
31-
assert(document.querySelector('fieldset:nth-of-type(3) select')?.matches('#referrer'))
31+
assert.isTrue(document.querySelector('fieldset:nth-of-type(3) select')?.matches('#referrer'))
3232
```
3333
3434
The `textarea` element should have an `id` of `bio`.
3535
3636
```js
37-
assert(document.querySelector('fieldset:nth-of-type(3) textarea')?.matches('#bio'))
37+
assert.isTrue(document.querySelector('fieldset:nth-of-type(3) textarea')?.matches('#bio'))
3838
```
3939
4040
The first `label` element should have a `for` attribute with a value of `profile-picture`.
4141
4242
```js
43-
assert(document.querySelectorAll('fieldset:nth-of-type(3) label')?.[0]?.matches('label[for="profile-picture"]'))
43+
assert.isTrue(document.querySelectorAll('fieldset:nth-of-type(3) label')?.[0]?.matches('label[for="profile-picture"]'))
4444
```
4545
4646
The second `label` element should have a `for` attribute with a value of `age`.
4747
4848
```js
49-
assert(document.querySelectorAll('fieldset:nth-of-type(3) label')?.[1]?.matches('label[for="age"]'))
49+
assert.isTrue(document.querySelectorAll('fieldset:nth-of-type(3) label')?.[1]?.matches('label[for="age"]'))
5050
```
5151
5252
The third `label` element should have a `for` attribute with a value of `referrer`.
5353
5454
```js
55-
assert(document.querySelectorAll('fieldset:nth-of-type(3) label')?.[2]?.matches('label[for="referrer"]'))
55+
assert.isTrue(document.querySelectorAll('fieldset:nth-of-type(3) label')?.[2]?.matches('label[for="referrer"]'))
5656
```
5757
5858
The fourth `label` element should have a `for` attribute with a value of `bio`.
5959
6060
```js
61-
assert(document.querySelectorAll('fieldset:nth-of-type(3) label')?.[3]?.matches('label[for="bio"]'))
61+
assert.isTrue(document.querySelectorAll('fieldset:nth-of-type(3) label')?.[3]?.matches('label[for="bio"]'))
6262
```
6363
6464
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-registration-form/65045fa2267ce52da6a73676.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@ Use `personal-account`, and `business-account` as values for the respective `id`
1616
The first `input` element should have an `id` of `personal-account`.
1717

1818
```js
19-
assert(document.querySelectorAll('fieldset:nth-of-type(2) input')?.[0]?.matches('#personal-account'))
19+
assert.isTrue(document.querySelectorAll('fieldset:nth-of-type(2) input')?.[0]?.matches('#personal-account'))
2020
```
2121
2222
The second `input` element should have an `id` of `business-account`.
2323
2424
```js
25-
assert(document.querySelectorAll('fieldset:nth-of-type(2) input')?.[1]?.matches('#business-account'))
25+
assert.isTrue(document.querySelectorAll('fieldset:nth-of-type(2) input')?.[1]?.matches('#business-account'))
2626
```
2727
2828
The first `label` element should have a `for` attribute with a value of `personal-account`.
2929
3030
```js
31-
assert(document.querySelectorAll('fieldset:nth-of-type(2) label')?.[0]?.matches('label[for="personal-account"]'))
31+
assert.isTrue(document.querySelectorAll('fieldset:nth-of-type(2) label')?.[0]?.matches('label[for="personal-account"]'))
3232
```
3333
3434
The second `label` element should have a `for` attribute with a value of `business-account`.
3535
3636
```js
37-
assert(document.querySelectorAll('fieldset:nth-of-type(2) label')?.[1]?.matches('label[for="business-account"]'))
37+
assert.isTrue(document.querySelectorAll('fieldset:nth-of-type(2) label')?.[1]?.matches('label[for="business-account"]'))
3838
```
3939
4040

0 commit comments

Comments
 (0)