diff --git a/challenges/01-responsive-web-design/applied-visual-design.json b/challenges/01-responsive-web-design/applied-visual-design.json index c01f499a62e..245c94bfd65 100644 --- a/challenges/01-responsive-web-design/applied-visual-design.json +++ b/challenges/01-responsive-web-design/applied-visual-design.json @@ -1387,9 +1387,9 @@ "
" ], "tests": [ - "assert(code.match(/.orange\\s*\\{\\s*background-color:\\s*(#FF7D00|#ff7d00);?\\s*\\}/g), 'message: Thediv element with class orange should have a background-color of orange.');",
- "assert(code.match(/.cyan\\s*\\{\\s*background-color:\\s*(#00FFFF|#00ffff);?\\s*\\}/g), 'message: The div element with class cyan should have a background-color of cyan.');",
- "assert(code.match(/.raspberry\\s*\\{\\s*background-color:\\s*(#FF007D|#ff007d);?\\s*\\}/g), 'message: The div element with class raspberry should have a background-color of raspberry.');"
+ "assert($('.orange').css('background-color') == 'rgb(255, 125, 0)', 'message: The div element with class orange should have a background-color of orange.');",
+ "assert($('.cyan').css('background-color') == 'rgb(0, 255, 255)', 'message: The div element with class cyan should have a background-color of cyan.');",
+ "assert($('.raspberry').css('background-color') == 'rgb(255, 0, 125)', 'message: The div element with class raspberry should have a background-color of raspberry.');"
],
"solutions": [],
"hints": [],
diff --git a/challenges/01-responsive-web-design/basic-css.json b/challenges/01-responsive-web-design/basic-css.json
index c0f09e5062f..859c66073e1 100644
--- a/challenges/01-responsive-web-design/basic-css.json
+++ b/challenges/01-responsive-web-design/basic-css.json
@@ -88,7 +88,7 @@
""
],
"tests": [
- "assert(code.match(/h2 element should be red.');",
+ "assert($(\"h2\").css(\"color\") === \"rgb(255, 0, 0)\", 'message: Your h2 element should be red.');",
"assert(code.match(/style declaration should end with a ; .');"
],
"type": "waypoint",
diff --git a/challenges/01-responsive-web-design/responsive-web-design.json b/challenges/01-responsive-web-design/responsive-web-design.json
index 2f338794af7..02b04920e93 100644
--- a/challenges/01-responsive-web-design/responsive-web-design.json
+++ b/challenges/01-responsive-web-design/responsive-web-design.json
@@ -97,7 +97,7 @@
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus quis tempus massa. Aenean erat nisl, gravida vel vestibulum cursus, interdum sit amet lectus. Sed sit amet quam nibh. Suspendisse quis tincidunt nulla. In hac habitasse platea dictumst. Ut sit amet pretium nisl. Vivamus vel mi sem. Aenean sit amet consectetur sem. Suspendisse pretium, purus et gravida consequat, nunc ligula ultricies diam, at aliquet velit libero a dui.
" ], "tests": [ - "assert(code.match(/p\\s*\\{\\s*font-size:\\s*10px;\\s*\\}/g), 'message: Yourp element should have the font-size of 10px when the device height is less than or equal to 800px.');",
+ "assert($('p').css('font-size') == '10px', 'message: Your p element should have the font-size of 10px when the device height is less than or equal to 800px.');",
"assert(code.match(/@media \\(max-height:\\s*?800px\\)/g), 'message: Declare a @media query for devices with a height less than or equal to 800px.');"
],
"type": "waypoint",