fix(curriculum,tests): use computed styles for cat painting step 8 (#51479)

This commit is contained in:
Sam
2023-09-08 09:58:43 -07:00
committed by GitHub
parent a90ab12672
commit 3383370790
@@ -28,13 +28,17 @@ assert.match(code, /background:\s*linear-gradient\(/)
Your `linear-gradient` function should set the first color to be `#5e5e5e` at `85%`.
```js
assert.match(code, /background:\s*linear-gradient\(#5e5e5e\s+85%/)
const gradientBackgroundImage = new __helpers.CSSHelp(document).getStyle('.cat-head')?.getPropVal('background-image', true);
const firstGradient = gradientBackgroundImage.split(/\s*rgb\s*/)[1];
assert.equal(firstGradient,'(94,94,94)85%,');
```
Your `linear-gradient` function should set the second color to be `#45454f` at `100%`.
```js
assert.match(code, /background:\s*linear-gradient\(#5e5e5e\s+85%,\s+#45454f\s+100%\);?/)
const gradientBackgroundImage = new __helpers.CSSHelp(document).getStyle('.cat-head')?.getPropVal('background-image', true);
const secondGradient = gradientBackgroundImage.split(/\s*rgb\s*/)[2];
assert.equal(secondGradient,'(69,69,79)100%)');
```