From 29115628887249b585882adb1b8709a548fe4b14 Mon Sep 17 00:00:00 2001 From: LumenTeun Date: Mon, 15 Jun 2015 17:26:37 +0200 Subject: [PATCH 1/6] More 'Convert HTML Entities' test cases. Fixes #924 --- challenges/basic-bonfires.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index df4b6bc16c..9858ca9b90 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -1104,6 +1104,10 @@ ], "tests": [ "assert.strictEqual(convert('Dolce & Gabbana'), 'Dolce & Gabbana', 'should escape characters');", + "assert.strictEqual(convert('Hamburgers < Pizza < Tacos'), 'Hamburgers < Pizza < Tacos', 'should escape characters');", + "assert.strictEqual(convert('Sixty > twelve'), 'Sixty > twelve', 'should escape characters');", + "assert.strictEqual(convert('Stuff in \"quotation marks\"'), 'Stuff in "quotation marks"', 'should escape characters');", + "assert.strictEqual(convert(\"Shindler's List\"), 'Shindler's List', 'should escape characters');", "assert.strictEqual(convert('abc'), 'abc', 'should handle strings with nothing to escape');" ], "MDNlinks": [ From 466395eb74736f7092d1e9abba768b0df0cec2b5 Mon Sep 17 00:00:00 2001 From: LumenTeun Date: Mon, 15 Jun 2015 17:43:52 +0200 Subject: [PATCH 2/6] Fixed Zipline jQuery.getJSON() links. Fixes #918 #919 --- challenges/ziplines.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/challenges/ziplines.json b/challenges/ziplines.json index f61a96280e..4bf2d531db 100644 --- a/challenges/ziplines.json +++ b/challenges/ziplines.json @@ -56,7 +56,7 @@ "Hint: Here's an example call to Twitch.tv's JSON API: https://api.twitch.tv/kraken/streams/freecodecamp.", "Hint: The relevant documentation about this API call is here: https://github.com/justintv/Twitch-API/blob/master/v3_resources/streams.md#get-streamschannel.", "Hint: Here's an array of the Twitch.tv usernames of people who regularly stream coding: [\"freecodecamp\", \"storbeck\", \"terakilobyte\", \"habathcx\",\"RobotCaleb\",\"comster404\",\"brunofin\",\"thomasballinger\",\"noobs2ninjas\",\"beohoff\"]", - "Remember to use RSAP if you get stuck. Try using jQuery's $.getJSON() to consume APIs.", + "Remember to use RSAP if you get stuck. Try using jQuery's $.getJSON() to consume APIs.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

Click here then add your link to your tweet's text" ], @@ -87,7 +87,7 @@ "Here are the user stories you must enable, and optional bonus user stories:", "User Story: As a user, I can click a button to show me a new random quote.", "Bonus User Story: As a user, I can press a button to tweet out a quote.", - "Remember to use RSAP if you get stuck. Try using jQuery's $.getJSON() to consume APIs.", + "Remember to use RSAP if you get stuck. Try using jQuery's $.getJSON() to consume APIs.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

Click here then add your link to your tweet's text" ], @@ -120,7 +120,7 @@ "Bonus User Story: As a user, I can see an icon depending on the temperature..", "Bonus User Story: As a user, I see a different background image depending on the temperature (e.g. snowy mountain, hot desert).", "Bonus User Story: As a user, I can push a button to toggle between Fahrenheit and Celsius.", - "Remember to use RSAP if you get stuck. Try using jQuery's $.getJSON() to consume APIs.", + "Remember to use RSAP if you get stuck. Try using jQuery's $.getJSON() to consume APIs.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

Click here then add your link to your tweet's text" ], @@ -154,7 +154,7 @@ "User Story: As a user, I can click a link to go directly to the post's discussion page.", "Bonus User Story: As a user, I can see how many upvotes each story has.", "Hint: Here's the Camper News Hot Stories API endpoint: http://www.freecodecamp.com/stories/hotStories.", - "Remember to use RSAP if you get stuck. Try using jQuery's $.getJSON() to consume APIs.", + "Remember to use RSAP if you get stuck. Try using jQuery's $.getJSON() to consume APIs.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

Click here then add your link to your tweet's text" ], @@ -187,7 +187,7 @@ "Bonus User Story:As a user, I can click a button to see a random Wikipedia entry.", "Bonus User Story:As a user, when I type in the search box, I can see a dropdown menu with autocomplete options for matching Wikipedia entries.", "Hint: Here's an entry on using Wikipedia's API: http://www.mediawiki.org/wiki/API:Main_page.", - "Remember to use RSAP if you get stuck. Try using jQuery's $.getJSON() to consume APIs.", + "Remember to use RSAP if you get stuck. Try using jQuery's $.getJSON() to consume APIs.", "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

Click here then add your link to your tweet's text" ], From 8ae797d582722c71f1cf1eef4c6606274a231986 Mon Sep 17 00:00:00 2001 From: LumenTeun Date: Mon, 15 Jun 2015 18:06:09 +0200 Subject: [PATCH 3/6] Improves check for catphotoapp.com. Fixes #914 --- challenges/basic-html5-and-css.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/basic-html5-and-css.json b/challenges/basic-html5-and-css.json index 3e0532d81a..d050f4d6dc 100644 --- a/challenges/basic-html5-and-css.json +++ b/challenges/basic-html5-and-css.json @@ -1005,7 +1005,7 @@ ], "tests": [ "assert((/cat photos/gi).test($('a').text()), 'Your a element should have the anchor text of \"cat photos\"')", - "assert($('a').filter(function(index) { return /com/gi.test($('a').attr('href')); }).length > 0, 'You need an a element that links to http://catphotoapp.com.')", + "assert(/http:\\/\\/catphotoapp\\.com/gi.test($('a').attr('href')), 'You need an a element that links to http://catphotoapp.com.')", "assert(editor.match(/<\\/a>/g) && editor.match(/<\\/a>/g).length === editor.match(/a element has a closing tag.')" ], "challengeSeed": [ From 667a37cac7b014dcf2f5b37c26276a4b5b95c7c6 Mon Sep 17 00:00:00 2001 From: LumenTeun Date: Mon, 15 Jun 2015 18:14:55 +0200 Subject: [PATCH 4/6] Test for almost palindromes. #911 --- challenges/basic-bonfires.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index df4b6bc16c..cad7cb5228 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -180,7 +180,8 @@ "assert.deepEqual(palindrome(\"not a palindrome\"), false);", "assert.deepEqual(palindrome(\"A man, a plan, a canal. Panama\"), true);", "assert.deepEqual(palindrome(\"never odd or even\"), true);", - "assert.deepEqual(palindrome(\"nope\"), false);" + "assert.deepEqual(palindrome(\"nope\"), false);", + "assert.deepEqual(palindrome(\"almostomla\"), false);" ], "challengeSeed": [ "function palindrome(str) {", From 4b349ff7619b8413f8a11da7ece745bd8057fa98 Mon Sep 17 00:00:00 2001 From: LumenTeun Date: Mon, 15 Jun 2015 18:26:44 +0200 Subject: [PATCH 5/6] Check fix in 'Bootstrap Grid'. #907 --- challenges/bootstrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/bootstrap.json b/challenges/bootstrap.json index eeac669f73..9f2b704153 100644 --- a/challenges/bootstrap.json +++ b/challenges/bootstrap.json @@ -626,7 +626,7 @@ "The \"row\" class is applied to a div, and the buttons themselves can be wrapped within it." ], "tests": [ - "assert($('div.row:has(button)'), 'Your buttons should all be wrapped within the same div element with the class \"row\".')", + "assert($('div.row:has(button)').length > 0, 'Your buttons should all be wrapped within the same div element with the class \"row\".')", "assert($('div.col-xs-4:has(button)').length > 2, 'Each of your Bootstrap buttons should be wrapped within its own a div element with the class \"col-xs-4\".')", "assert(editor.match(/<\\/button>/g) && editor.match(/