From 338337079039932557b1b87bc391b0d766d469a0 Mon Sep 17 00:00:00 2001 From: Sam <51801821+samkim777@users.noreply.github.com> Date: Fri, 8 Sep 2023 09:58:43 -0700 Subject: [PATCH] fix(curriculum,tests): use computed styles for cat painting step 8 (#51479) --- .../646c5ace05e4be4211407935.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-intermediate-css-by-building-a-cat-painting/646c5ace05e4be4211407935.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-intermediate-css-by-building-a-cat-painting/646c5ace05e4be4211407935.md index 81eb5c83f27..323b4523f50 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-intermediate-css-by-building-a-cat-painting/646c5ace05e4be4211407935.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-intermediate-css-by-building-a-cat-painting/646c5ace05e4be4211407935.md @@ -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%)'); ```