From a1e853337bea92d3487b94c597e5f0323b4f00f0 Mon Sep 17 00:00:00 2001
From: lasjorg <28780271+lasjorg@users.noreply.github.com>
Date: Wed, 27 Mar 2019 05:35:38 +0100
Subject: [PATCH] fix(challenge): simplify and cleanup tests (#35535)
---
.../basic-css/change-the-color-of-text.english.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/change-the-color-of-text.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/change-the-color-of-text.english.md
index e13e494890..bfc855c673 100644
--- a/curriculum/challenges/english/01-responsive-web-design/basic-css/change-the-color-of-text.english.md
+++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/change-the-color-of-text.english.md
@@ -25,10 +25,12 @@ Change your h2
element's style so that its text color is red.
```yml
tests:
+ - text: Your h2
element should have a style
declaration.
+ testString: assert($("h2").attr('style'));
- text: Your h2
element should be red.
- testString: assert($("h2").css("color") === "rgb(255, 0, 0)", 'Your h2
element should be red.');
+ testString: assert($("h2").css("color") === "rgb(255, 0, 0)");
- text: Your style
declaration should end with a ;
.
- testString: assert(code.match(/
style
declaration should end with a ;
.');
+ testString: assert($("h2").attr('style') && $("h2").attr('style').endsWith(';'));
```