From f50cee119cb76dc6a8ccdda61f6c5a9ffa9dab16 Mon Sep 17 00:00:00 2001 From: LumenTeun Date: Mon, 15 Jun 2015 17:26:37 +0200 Subject: [PATCH 01/17] More 'Convert HTML Entities' test cases. Fixes #924 --- seed/challenges/basic-bonfires.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index df4b6bc16c..9858ca9b90 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/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 00c1cdef5b3fd0ea78e1ab9ad9ecb0555113b008 Mon Sep 17 00:00:00 2001 From: LumenTeun Date: Mon, 15 Jun 2015 17:43:52 +0200 Subject: [PATCH 02/17] Fixed Zipline jQuery.getJSON() links. Fixes #918 #919 --- seed/challenges/ziplines.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/seed/challenges/ziplines.json b/seed/challenges/ziplines.json index f61a96280e..4bf2d531db 100644 --- a/seed/challenges/ziplines.json +++ b/seed/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 0038c48875a830fd8778d0391b0641e1f8c3068f Mon Sep 17 00:00:00 2001 From: LumenTeun Date: Mon, 15 Jun 2015 18:06:09 +0200 Subject: [PATCH 03/17] Improves check for catphotoapp.com. Fixes #914 --- seed/challenges/basic-html5-and-css.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/basic-html5-and-css.json b/seed/challenges/basic-html5-and-css.json index 3e0532d81a..d050f4d6dc 100644 --- a/seed/challenges/basic-html5-and-css.json +++ b/seed/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 480c5dec0a6627a0e4507cb8fe7dadf51260f462 Mon Sep 17 00:00:00 2001 From: LumenTeun Date: Mon, 15 Jun 2015 18:14:55 +0200 Subject: [PATCH 04/17] Test for almost palindromes. #911 --- seed/challenges/basic-bonfires.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index df4b6bc16c..cad7cb5228 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/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 663492c58222995850bfef3f9a8ccc2b038e0506 Mon Sep 17 00:00:00 2001 From: LumenTeun Date: Mon, 15 Jun 2015 18:26:44 +0200 Subject: [PATCH 05/17] Check fix in 'Bootstrap Grid'. #907 --- seed/challenges/bootstrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json index eeac669f73..9f2b704153 100644 --- a/seed/challenges/bootstrap.json +++ b/seed/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(/