fix(challenge): Improve example for "Applied Visual Design: Use the u Tag to Underline Text".

* Update instruction.
* Update `challengeSeed` for following challenges.
* Use strict equality for tests.
This commit is contained in:
Samuel Plumppu
2017-01-31 22:47:49 +01:00
parent ec359e7749
commit 0e994d55c8

View File

@ -407,7 +407,7 @@
"description": [
"To underline text, you can use the <code>u</code> tag. This is often used to signify that a section of text is important, or something to remember. With the <code>u</code> tag, the browser applies the CSS of <code>text-decoration: underline;</code> to the element.",
"<hr>",
"Wrap the <code>u</code> tag around the two anchor tags. It should not include the parent <code>div</code> that has the class of <code>cardLinks</code>.",
"Wrap the <code>u</code> tag around the text \"Ph.D. students\". It should not include the parent <code>div</code> that has the class of <code>cardText</code>.",
"<strong>Note</strong><br>Try to avoid using the <code>u</code> tag when it could be confused for a link. Anchor tags also have a default underlined formatting."
],
"challengeSeed": [
@ -451,9 +451,9 @@
"</div>"
],
"tests": [
"assert($('u').length == 1, 'message: Your code should add a <code>u</code> tag to the markup.');",
"assert($('u').children('a').length == 2, 'message: The <code>u</code> tag should wrap around and contain the two <code>a</code> tags.');",
"assert($('u').children('div').length == 0, 'message: The <code>u</code> tag should not wrap around the parent <code>div</code> tag.');"
"assert($('u').length === 1, 'message: Your code should add a <code>u</code> tag to the markup.');",
"assert($('u').text().indexOf('Ph.D. students') > -1, 'message: The <code>u</code> tag should wrap around the text \"Ph.D. students\".');",
"assert($('u').children('div').length === 0, 'message: The <code>u</code> tag should not wrap around the parent <code>div</code> tag.');"
],
"solutions": [],
"hints": [],
@ -517,13 +517,11 @@
" <div class=\"cardContent\">",
" <div class=\"cardText\">",
" <h4>Google</h4>",
" <p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at <strong>Stanford University</strong>.</p>",
" <p>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</p>",
" </div>",
" <div class=\"cardLinks\">",
" <u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </div>",
" </div>",
"</div>"
@ -594,13 +592,11 @@
" <div class=\"cardContent\">",
" <div class=\"cardText\">",
" <h4>Google</h4>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at <strong>Stanford University</strong>.</p></em>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</p></em>",
" </div>",
" <div class=\"cardLinks\">",
" <u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </div>",
" </div>",
"</div>"
@ -674,13 +670,11 @@
" <div class=\"cardText\">",
" <h4><del>Google</del>Alphabet</h4>",
" ",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at <strong>Stanford University</strong>.</p></em>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</p></em>",
" </div>",
" <div class=\"cardLinks\">",
" <u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </div>",
" </div>",
"</div>"
@ -758,13 +752,11 @@
" <div class=\"cardText\">",
" <h4>Alphabet</h4>",
" <hr>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at <strong>Stanford University</strong>.</p></em>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</p></em>",
" </div>",
" <div class=\"cardLinks\">",
" <u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </div>",
" </div>",
"</div>"
@ -839,13 +831,11 @@
" <div class=\"cardText\">",
" <h4>Alphabet</h4>",
" <hr>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at <strong>Stanford University</strong>.</p></em>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</p></em>",
" </div>",
" <div class=\"cardLinks\">",
" <u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </div>",
" </div>",
"</div>"
@ -924,13 +914,11 @@
" <div class=\"cardText\">",
" <h4>Alphabet</h4>",
" <hr>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at <strong>Stanford University</strong>.</p></em>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</p></em>",
" </div>",
" <div class=\"cardLinks\">",
" <u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </div>",
" </div>",
"</div>"
@ -1012,13 +1000,11 @@
" <div class=\"cardText\">",
" <h4>Alphabet</h4>",
" <hr>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at <strong>Stanford University</strong>.</p></em>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</p></em>",
" </div>",
" <div class=\"cardLinks\">",
" <u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </div>",
" </div>",
"</div>"
@ -1097,13 +1083,11 @@
" <div class=\"cardText\">",
" <h4>Alphabet</h4>",
" <hr>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at <strong>Stanford University</strong>.</p></em>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</p></em>",
" </div>",
" <div class=\"cardLinks\">",
" <u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </div>",
" </div>",
"</div>"
@ -1196,13 +1180,11 @@
" <div class=\"cardText\">",
" <h4>Alphabet</h4>",
" <hr>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at <strong>Stanford University</strong>.</p></em>",
" <em><p>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</p></em>",
" </div>",
" <div class=\"cardLinks\">",
" <u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </u>",
" <a href=\"https://en.wikipedia.org/wiki/Larry_Page\" class=\"links\">Larry Page</a><br><br>",
" <a href=\"https://en.wikipedia.org/wiki/Sergey_Brin\" class=\"links\">Sergey Brin</a>",
" </div>",
" </div>",
"</div>"