From 5609a1303e1e5e96ac6e31bf8ab9d441ce1d5537 Mon Sep 17 00:00:00 2001 From: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Date: Thu, 19 Dec 2019 02:26:50 -0800 Subject: [PATCH] fix: corrected tests for 3 challenges (#37948) --- .../change-animation-timing-with-keywords.english.md | 4 ++-- .../learn-how-bezier-curves-work.english.md | 2 +- .../use-a-bezier-curve-to-move-a-graphic.english.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/change-animation-timing-with-keywords.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/change-animation-timing-with-keywords.english.md index 6aba6c40ff..2f1ea2b9f5 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/change-animation-timing-with-keywords.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/change-animation-timing-with-keywords.english.md @@ -23,9 +23,9 @@ For the elements with id of ball1 and ball2, add an animation-timing-function property for the element with the id ball1 should be linear. - testString: assert($('#ball1').css('animation-timing-function') == 'linear'); + testString: const ball1Animation = $('#ball1').css('animation-timing-function').replace(/\s/g, '');assert(ball1Animation == 'linear' || ball1Animation == 'cubic-bezier(0,0,1,1)'); - text: The value of the animation-timing-function property for the element with the id ball2 should be ease-out. - testString: assert($('#ball2').css('animation-timing-function') == 'ease-out'); + testString: const ball2Animation = $('#ball2').css('animation-timing-function').replace(/\s/g, ''); assert(ball2Animation == 'ease-out' || ball2Animation == 'cubic-bezier(0,0,0.58,1)'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/learn-how-bezier-curves-work.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/learn-how-bezier-curves-work.english.md index 730db137db..15e8da813f 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/learn-how-bezier-curves-work.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/learn-how-bezier-curves-work.english.md @@ -28,7 +28,7 @@ tests: - text: The value of the animation-timing-function property for the element with the id ball1 should be the linear-equivalent cubic-bezier function. testString: assert($('#ball1').css('animation-timing-function') == 'cubic-bezier(0.25, 0.25, 0.75, 0.75)'); - text: The value of the animation-timing-function property for the element with the id ball2 should not change. - testString: assert($('#ball2').css('animation-timing-function') == 'ease-out'); + testString: const ball2Animation = $('#ball2').css('animation-timing-function').replace(/\s/g, ''); assert(ball2Animation == 'ease-out' || ball2Animation == 'cubic-bezier(0,0,0.58,1)'); ``` diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/use-a-bezier-curve-to-move-a-graphic.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/use-a-bezier-curve-to-move-a-graphic.english.md index fc8ce014c6..9f4460f38f 100644 --- a/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/use-a-bezier-curve-to-move-a-graphic.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/applied-visual-design/use-a-bezier-curve-to-move-a-graphic.english.md @@ -29,7 +29,7 @@ tests: - text: The element with the id red should no longer have the animation-timing-function property of linear. testString: assert($('#red').css('animation-timing-function') !== 'linear'); - text: The value of the animation-timing-function property for the element with the id blue should not change. - testString: assert($('#blue').css('animation-timing-function') == 'ease-out'); + testString: const blueBallAnimation = $('#blue').css('animation-timing-function').replace(/\s/g, ''); assert(blueBallAnimation == 'ease-out' || blueBallAnimation == 'cubic-bezier(0,0,0.58,1)'); ```