Skip to content

Commit 7f830a1

Browse files
chore(curriculum): update ferris workshop tests (freeCodeCamp#57154)
Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com>
1 parent 3f62648 commit 7f830a1

28 files changed

+95
-99
lines changed

curriculum/challenges/english/25-front-end-development/workshop-ferris-wheel/6140c7e645d8e905819f1dd4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ assert.match(code, /<link/);
2121
You should have one `link` element.
2222

2323
```js
24-
assert.strictEqual(document.querySelectorAll('link').length, 1);
24+
assert.lengthOf(document.querySelectorAll('link'), 1);
2525
```
2626

2727
Your `link` element should be within your `head` element.

curriculum/challenges/english/25-front-end-development/workshop-ferris-wheel/6140c9d35015ae0ba0c250e8.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,41 +17,41 @@ You should create a new `div` within your `body` element.
1717

1818
```js
1919
const divs = [...document.querySelector('body')?.children].filter(child => child?.localName === 'div');
20-
assert(divs?.length === 1);
20+
assert.lengthOf(divs, 1);
2121
```
2222
2323
Your `div` within your `body` element should have a `class` of `wheel`.
2424
2525
```js
26-
assert(document.querySelector('body div')?.classList?.contains('wheel'));
26+
assert.isTrue(document.querySelector('body div')?.classList?.contains('wheel'));
2727
```
2828
2929
Your `.wheel` element should have six `span` elements within.
3030
3131
```js
32-
assert(document.querySelectorAll('.wheel span')?.length === 6);
32+
assert.lengthOf(document.querySelectorAll('.wheel span'), 6);
3333
```
3434
3535
Your six `span` elements within the `.wheel` element should have a `class` of `line`.
3636
3737
```js
3838
const spans = [...document.querySelectorAll('.wheel span')];
39-
assert(spans?.every(span => span?.classList?.contains('line')));
40-
assert(document.querySelectorAll('.line')?.length === 6);
39+
assert.isTrue(spans?.every(span => span?.classList?.contains('line')));
40+
assert.lengthOf(document.querySelectorAll('.line'), 6);
4141
```
4242
4343
Your `.wheel` element should have six `div` elements within.
4444
4545
```js
46-
assert(document.querySelectorAll('.wheel div')?.length === 6);
46+
assert.lengthOf(document.querySelectorAll('.wheel div'), 6);
4747
```
4848
4949
Your six `div` elements within the `.wheel` element should have a `class` of `cabin`.
5050
5151
```js
5252
const divs = [...document.querySelectorAll('.wheel div')];
53-
assert(divs?.every(div => div?.classList?.contains('cabin')));
54-
assert(document.querySelectorAll('.cabin')?.length === 6);
53+
assert.isTrue(divs?.every(div => div?.classList?.contains('cabin')));
54+
assert.lengthOf(document.querySelectorAll('.cabin'), 6);
5555
```
5656
5757
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-ferris-wheel/6140cbeec34e970dfe75e710.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@ Create a selector for your `.wheel` element. Start by setting the `border` to `2
1414
You should have a `.wheel` selector.
1515

1616
```js
17-
assert(new __helpers.CSSHelp(document).getStyle('.wheel'));
17+
assert.exists(new __helpers.CSSHelp(document).getStyle('.wheel'));
1818
```
1919

2020
Your `.wheel` selector should have a `border` property set to `2px solid black`.
2121

2222
```js
23-
assert(new __helpers.CSSHelp(document).getStyle('.wheel')?.border === '2px solid black');
23+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.wheel')?.border, '2px solid black');
2424
```
2525
2626
Your `.wheel` selector should have a `border-radius` property set to `50%`.
2727
2828
```js
29-
assert(new __helpers.CSSHelp(document).getStyle('.wheel')?.borderRadius === '50%');
29+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.wheel')?.borderRadius, '50%');
3030
```
3131
3232
Your `.wheel` selector should have a `margin-left` property set to `50px`.
3333
3434
```js
35-
assert(new __helpers.CSSHelp(document).getStyle('.wheel')?.marginLeft === '50px');
35+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.wheel')?.marginLeft, '50px');
3636
```
3737
3838
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-ferris-wheel/6140cd32d018ed0f600eefce.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ Set the `position` property of the `.wheel` selector to `absolute`. Set the `hei
1414
Your `.wheel` selector should have a `position` property set to `absolute`.
1515

1616
```js
17-
assert(new __helpers.CSSHelp(document).getStyle('.wheel')?.position === 'absolute');
17+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.wheel')?.position, 'absolute');
1818
```
1919
2020
Your `.wheel` selector should have a `height` property set to `55vw`.
2121
2222
```js
23-
assert(new __helpers.CSSHelp(document).getStyle('.wheel')?.height === '55vw');
23+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.wheel')?.height, '55vw');
2424
```
2525
2626
Your `.wheel` selector should have a `width` property set to `55vw`.
2727
2828
```js
29-
assert(new __helpers.CSSHelp(document).getStyle('.wheel')?.width === '55vw');
29+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.wheel')?.width, '55vw');
3030
```
3131
3232
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-ferris-wheel/6140cdebd39d6a101e747529.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@ Create a selector for your `.line` elements. Start by setting the `background-co
1414
You should have a `.line` selector.
1515

1616
```js
17-
assert(new __helpers.CSSHelp(document).getStyle('.line'));
17+
assert.exists(new __helpers.CSSHelp(document).getStyle('.line'));
1818
```
1919

2020
Your `.line` selector should have a `background-color` property set to `black`.
2121

2222
```js
23-
assert(new __helpers.CSSHelp(document).getStyle('.line')?.backgroundColor === "black");
23+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.line')?.backgroundColor, "black");
2424
```
2525
2626
Your `.line` selector should have a `width` property set to `50%`.
2727
2828
```js
29-
assert(new __helpers.CSSHelp(document).getStyle('.line')?.width === "50%");
29+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.line')?.width, "50%");
3030
```
3131
3232
Your `.line` selector should have a `height` property set to `2px`.
3333
3434
```js
35-
assert(new __helpers.CSSHelp(document).getStyle('.line')?.height === "2px");
35+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.line')?.height, "2px");
3636
```
3737
3838
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-ferris-wheel/6140cfc08ca9c5128c3e6478.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ Set the `.line` selector's `position` property to `absolute`, the `left` propert
1414
Your `.line` selector should have a `position` property set to `absolute`.
1515

1616
```js
17-
assert(new __helpers.CSSHelp(document).getStyle('.line')?.position === 'absolute');
17+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.line')?.position, 'absolute');
1818
```
1919
2020
Your `.line` selector should have a `left` property set to `50%`.
2121
2222
```js
23-
assert(new __helpers.CSSHelp(document).getStyle('.line')?.left === '50%');
23+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.line')?.left, '50%');
2424
```
2525
2626
Your `.line` selector should have a `top` property set to `50%`.
2727
2828
```js
29-
assert(new __helpers.CSSHelp(document).getStyle('.line')?.top === '50%');
29+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.line')?.top, '50%');
3030
```
3131
3232
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-ferris-wheel/6140d0069049f5139d78da40.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Your `.line` selector should have a `transform-origin` property set to `0% 0%`.
1717

1818
```js
1919
const transformOrigin = new __helpers.CSSHelp(document).getStyle('.line')?.transformOrigin;
20-
assert(transformOrigin === '0% 0%' || transformOrigin === '0% 0% 0px');
20+
assert.oneOf(transformOrigin, ['0% 0%', '0% 0% 0px']);
2121
```
2222
2323
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-ferris-wheel/6140d10d50636e14695013b2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ Remember that the `transform` property allows you to manipulate the shape of an
1616
You should create a `.line:nth-of-type(2)` selector.
1717

1818
```js
19-
assert(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(2)'));
19+
assert.exists(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(2)'));
2020
```
2121

2222
Your `.line:nth-of-type(2)` selector should have a `transform` property set to `rotate(60deg)`.
2323

2424
```js
25-
assert(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(2)')?.transform === 'rotate(60deg)');
25+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(2)')?.transform, 'rotate(60deg)');
2626
```
2727
2828
# --seed--

curriculum/challenges/english/25-front-end-development/workshop-ferris-wheel/6140d1a351e88f159ed54fca.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,49 +16,49 @@ Set the `transform` property for the third `.line` to `rotate(120deg)`, the four
1616
You should create a `.line:nth-of-type(3)` selector.
1717

1818
```js
19-
assert(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(3)'));
19+
assert.exists(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(3)'));
2020
```
2121

2222
Your `.line:nth-of-type(3)` selector should have a `transform` property set to `rotate(120deg)`.
2323

2424
```js
25-
assert(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(3)')?.transform === 'rotate(120deg)');
25+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(3)')?.transform, 'rotate(120deg)');
2626
```
2727
2828
You should create a `.line:nth-of-type(4)` selector.
2929
3030
```js
31-
assert(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(4)'));
31+
assert.exists(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(4)'));
3232
```
3333
3434
Your `.line:nth-of-type(4)` selector should have a `transform` property set to `rotate(180deg)`.
3535
3636
```js
37-
assert(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(4)')?.transform === 'rotate(180deg)');
37+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(4)')?.transform, 'rotate(180deg)');
3838
```
3939
4040
You should create a `.line:nth-of-type(5)` selector.
4141
4242
```js
43-
assert(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(5)'));
43+
assert.exists(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(5)'));
4444
```
4545
4646
Your `.line:nth-of-type(5)` selector should have a `transform` property set to `rotate(240deg)`.
4747
4848
```js
49-
assert(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(5)')?.transform === 'rotate(240deg)');
49+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(5)')?.transform, 'rotate(240deg)');
5050
```
5151
5252
You should create a `.line:nth-of-type(6)` selector.
5353
5454
```js
55-
assert(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(6)'));
55+
assert.exists(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(6)'));
5656
```
5757
5858
Your `.line:nth-of-type(6)` selector should have a `transform` property set to `rotate(300deg)`.
5959
6060
```js
61-
assert(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(6)')?.transform === 'rotate(300deg)');
61+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(6)')?.transform, 'rotate(300deg)');
6262
```
6363
6464

curriculum/challenges/english/25-front-end-development/workshop-ferris-wheel/6140d263016325162fd076fe.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@ Create a `.cabin` selector. Set the `background-color` to `red`, the `width` to
1414
You should have a `.cabin` selector.
1515

1616
```js
17-
assert(new __helpers.CSSHelp(document).getStyle('.cabin'));
17+
assert.exists(new __helpers.CSSHelp(document).getStyle('.cabin'));
1818
```
1919

2020
Your `.cabin` selector should have a `background-color` property set to `red`.
2121

2222
```js
23-
assert(new __helpers.CSSHelp(document).getStyle('.cabin')?.backgroundColor === 'red');
23+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.cabin')?.backgroundColor, 'red');
2424
```
2525
2626
Your `.cabin` selector should have a `width` property set to `20%`.
2727
2828
```js
29-
assert(new __helpers.CSSHelp(document).getStyle('.cabin')?.width === '20%');
29+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.cabin')?.width, '20%');
3030
```
3131
3232
Your `.cabin` selector should have a `height` property set to `20%`.
3333
3434
```js
35-
assert(new __helpers.CSSHelp(document).getStyle('.cabin')?.height === '20%');
35+
assert.strictEqual(new __helpers.CSSHelp(document).getStyle('.cabin')?.height, '20%');
3636
```
3737
3838
# --seed--

0 commit comments

Comments
 (0)