mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): use assert methods in Cat Painting step 44-45 (#60261)
This commit is contained in:
+4
-4
@@ -16,25 +16,25 @@ Using a class selector, give your `.cat-right-eye` element a width of `30px` and
|
||||
You should have a `.cat-right-eye` selector.
|
||||
|
||||
```js
|
||||
assert(new __helpers.CSSHelp(document).getStyle('.cat-right-eye'))
|
||||
assert.exists(new __helpers.CSSHelp(document).getStyle('.cat-right-eye'))
|
||||
```
|
||||
|
||||
Your `.cat-right-eye` selector should have a `width` set to `30px`.
|
||||
|
||||
```js
|
||||
assert(new __helpers.CSSHelp(document).getStyle('.cat-right-eye')?.width === '30px')
|
||||
assert.equal(new __helpers.CSSHelp(document).getStyle('.cat-right-eye')?.width, '30px')
|
||||
```
|
||||
|
||||
Your `.cat-right-eye` selector should have a `height` set to `40px`.
|
||||
|
||||
```js
|
||||
assert(new __helpers.CSSHelp(document).getStyle('.cat-right-eye')?.height === '40px')
|
||||
assert.equal(new __helpers.CSSHelp(document).getStyle('.cat-right-eye')?.height, '40px')
|
||||
```
|
||||
|
||||
Your `.cat-right-eye` selector should have a `background-color` set to `#000`.
|
||||
|
||||
```js
|
||||
assert(new __helpers.CSSHelp(document).getStyle('.cat-right-eye')?.backgroundColor === 'rgb(0, 0, 0)')
|
||||
assert.equal(new __helpers.CSSHelp(document).getStyle('.cat-right-eye')?.backgroundColor, 'rgb(0, 0, 0)')
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
+3
-3
@@ -14,19 +14,19 @@ Move the right eye into position with a `position` property of `absolute`, a `to
|
||||
Your `.cat-right-eye` selector should have a `position` property set to `absolute`.
|
||||
|
||||
```js
|
||||
assert(new __helpers.CSSHelp(document).getStyle('.cat-right-eye')?.position === 'absolute')
|
||||
assert.equal(new __helpers.CSSHelp(document).getStyle('.cat-right-eye')?.position, 'absolute')
|
||||
```
|
||||
|
||||
Your `.cat-right-eye` selector should have a `top` property set to `54px`.
|
||||
|
||||
```js
|
||||
assert(new __helpers.CSSHelp(document).getStyle('.cat-right-eye')?.top === '54px')
|
||||
assert.equal(new __helpers.CSSHelp(document).getStyle('.cat-right-eye')?.top, '54px')
|
||||
```
|
||||
|
||||
Your `.cat-right-eye` selector should have a `left` property set to `134px`.
|
||||
|
||||
```js
|
||||
assert(new __helpers.CSSHelp(document).getStyle('.cat-right-eye')?.left === '134px')
|
||||
assert.equal(new __helpers.CSSHelp(document).getStyle('.cat-right-eye')?.left, '134px')
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user