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
This commit is contained in:
Jonathan Coleman
2016-07-01 04:12:13 -04:00
committed by Jonathan
parent a878e9172f
commit 71de2b773a

View File

@ -1094,7 +1094,9 @@
"<p class=\"red-text\">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>"
],
"tests": [
"assert($(\"img\").hasClass(\"smaller-image\"), 'message: Your <code>img</code> element should have the class <code>smaller-image</code>.');",
"assert($(\"img\").length === 1, 'message: Your code should only have 1 <code>img</code> tag.');",
"assert($(\"img\").attr(\"src\") && $(\"img\").attr(\"src\") === \"https://bit.ly/fcc-relaxing-cat\", 'message: Your <code>img</code> should have a <code>src</code> attribute with a value of <code>https://bit.ly/fcc-relaxing-cat</code>.');",
"assert($('img').attr(\"class\") && $(\"img\").attr(\"class\").match(/(^|\\s)smaller-image($|\\s)/), 'message: Your <code>img</code> element should have the class <code>smaller-image</code>.');",
"assert($(\"img\").width() === 100, 'message: Your image should be 100 pixels wide. Browser zoom should be at 100%.');"
],
"type": "waypoint",