fix(curriculum): use assert methods in Cat Painting step 44-45 (#60261)

This commit is contained in:
Yuvraj Singh
2025-05-12 13:44:01 +05:30
committed by GitHub
parent faa6dd7db8
commit 9528b31bae
2 changed files with 7 additions and 7 deletions
@@ -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--
@@ -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--