From 71de2b773a56019decf9b04183cbf69c679bd3e1 Mon Sep 17 00:00:00 2001 From: Jonathan Coleman Date: Fri, 1 Jul 2016 04:12:13 -0400 Subject: [PATCH] modify test case for class to allow for unquoted string as class (#9408) * modify test case for class to allow for unquoted string as class * Add more tests to account for more than one image tag and to ensure that image has the correct src --- .../01-front-end-development-certification/html5-and-css.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/challenges/01-front-end-development-certification/html5-and-css.json b/challenges/01-front-end-development-certification/html5-and-css.json index fe481d3fa3..c8406bab73 100644 --- a/challenges/01-front-end-development-certification/html5-and-css.json +++ b/challenges/01-front-end-development-certification/html5-and-css.json @@ -1094,7 +1094,9 @@ "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], "tests": [ - "assert($(\"img\").hasClass(\"smaller-image\"), 'message: Your img element should have the class smaller-image.');", + "assert($(\"img\").length === 1, 'message: Your code should only have 1 img tag.');", + "assert($(\"img\").attr(\"src\") && $(\"img\").attr(\"src\") === \"https://bit.ly/fcc-relaxing-cat\", 'message: Your img should have a src attribute with a value of https://bit.ly/fcc-relaxing-cat.');", + "assert($('img').attr(\"class\") && $(\"img\").attr(\"class\").match(/(^|\\s)smaller-image($|\\s)/), 'message: Your img element should have the class smaller-image.');", "assert($(\"img\").width() === 100, 'message: Your image should be 100 pixels wide. Browser zoom should be at 100%.');" ], "type": "waypoint",