fix(curriculum):update cat painting steps 66,67,69,70 to use specific asserts (#60835)

This commit is contained in:
Livingstone Asabahebwa
2025-06-12 19:15:59 +03:00
committed by GitHub
parent f7d736213a
commit db71360fda
4 changed files with 14 additions and 14 deletions
@@ -14,31 +14,31 @@ Inside the `.cat-whiskers-right` element, create 3 `div` elements with the class
You should not change the existing `div` element with class `cat-whiskers-right`.
```js
assert(document.querySelectorAll('div.cat-whiskers-right').length === 1)
assert.lengthOf(document.querySelectorAll('div.cat-whiskers-right'), 1);
```
You should create three `div` elements inside your `.cat-whiskers-right` element.
```js
assert(document.querySelectorAll('.cat-whiskers-right div').length === 3)
assert.lengthOf(document.querySelectorAll('.cat-whiskers-right div'), 3);
```
The first `div` element inside the `.cat-whiskers-right` element should have the class `cat-whisker-right-top`.
```js
assert(document.querySelectorAll('.cat-whiskers-right div')[0].classList.contains('cat-whisker-right-top'))
assert.isTrue(document.querySelectorAll('.cat-whiskers-right div')[0].classList.contains('cat-whisker-right-top'));
```
The second `div` element inside the `.cat-whiskers-right` element should have the class `cat-whisker-right-middle`.
```js
assert(document.querySelectorAll('.cat-whiskers-right div')[1].classList.contains('cat-whisker-right-middle'))
assert.isTrue(document.querySelectorAll('.cat-whiskers-right div')[1].classList.contains('cat-whisker-right-middle'));
```
The third `div` element inside the `.cat-whiskers-right` element should have the class `cat-whisker-right-bottom`.
```js
assert(document.querySelectorAll('.cat-whiskers-right div')[2].classList.contains('cat-whisker-right-bottom'))
assert.isTrue(document.querySelectorAll('.cat-whiskers-right div')[2].classList.contains('cat-whisker-right-bottom'));
```
# --seed--
@@ -14,25 +14,25 @@ Use a descendant selector to target the three `div` elements inside your `.cat-w
You should have a `.cat-whiskers-left div` selector.
```js
assert(new __helpers.CSSHelp(document).getStyle('.cat-whiskers-left div'))
assert.exists(new __helpers.CSSHelp(document).getStyle('.cat-whiskers-left div'));
```
Your `.cat-whiskers-left div` selector should have a `width` set to `40px`.
```js
assert(new __helpers.CSSHelp(document).getStyle('.cat-whiskers-left div')?.width === '40px')
assert.equal(new __helpers.CSSHelp(document).getStyle('.cat-whiskers-left div')?.width, '40px');
```
Your `.cat-whiskers-left div` selector should have a `height` set to `1px`.
```js
assert(new __helpers.CSSHelp(document).getStyle('.cat-whiskers-left div')?.height === '1px')
assert.equal(new __helpers.CSSHelp(document).getStyle('.cat-whiskers-left div')?.height, '1px');
```
Your `.cat-whiskers-left div` selector should have a `background-color` set to `#000`.
```js
assert(new __helpers.CSSHelp(document).getStyle('.cat-whiskers-left div')?.backgroundColor === 'rgb(0, 0, 0)')
assert.equal(new __helpers.CSSHelp(document).getStyle('.cat-whiskers-left div')?.backgroundColor, 'rgb(0, 0, 0)');
```
# --seed--
@@ -14,25 +14,25 @@ Using a class selector, move the `.cat-whisker-left-top` element into place with
You should have a `.cat-whisker-left-top` selector.
```js
assert(new __helpers.CSSHelp(document).getStyle('.cat-whisker-left-top'))
assert.exists(new __helpers.CSSHelp(document).getStyle('.cat-whisker-left-top'));
```
Your `.cat-whisker-left-top` selector should have a `position` property set to `absolute`.
```js
assert(new __helpers.CSSHelp(document).getStyle('.cat-whisker-left-top')?.position === 'absolute')
assert.equal(new __helpers.CSSHelp(document).getStyle('.cat-whisker-left-top')?.position, 'absolute');
```
Your `.cat-whisker-left-top` selector should have a `top` property set to `120px`.
```js
assert(new __helpers.CSSHelp(document).getStyle('.cat-whisker-left-top')?.top === '120px')
assert.equal(new __helpers.CSSHelp(document).getStyle('.cat-whisker-left-top')?.top, '120px');
```
Your `.cat-whisker-left-top` selector should have a `left` property set to `52px`.
```js
assert(new __helpers.CSSHelp(document).getStyle('.cat-whisker-left-top')?.left === '52px')
assert.equal(new __helpers.CSSHelp(document).getStyle('.cat-whisker-left-top')?.left, '52px');
```
# --seed--
@@ -14,7 +14,7 @@ Rotate the left top whisker at `10` degrees.
Your `.cat-whisker-left-top` selector should have a `transform` property set to `rotate(10deg)`.
```js
assert(new __helpers.CSSHelp(document).getStyle('.cat-whisker-left-top')?.transform === 'rotate(10deg)')
assert.equal(new __helpers.CSSHelp(document).getStyle('.cat-whisker-left-top')?.transform, 'rotate(10deg)');
```
# --seed--