From 2dd222a441d043c294be05f4af9b477be81d3d4f Mon Sep 17 00:00:00 2001 From: Brett Guillory Date: Sat, 13 Jun 2015 20:54:43 -0500 Subject: [PATCH 01/54] Fixed a word --- seed_data/challenges/basic-bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed_data/challenges/basic-bonfires.json b/seed_data/challenges/basic-bonfires.json index 3773c4da22..67e3ef965e 100644 --- a/seed_data/challenges/basic-bonfires.json +++ b/seed_data/challenges/basic-bonfires.json @@ -832,7 +832,7 @@ "difficulty": "2.03", "description": [ "Perform a search and replace on the sentence using the arguments provided and return the new sentence.", - "First argument is the sentence the perform the search and replace on.", + "First argument is the sentence to perform the search and replace on.", "Second argument is the word that you will be replacing (before).", "Third argument is what you will be replacing the second argument with (after).", "NOTE: Preserve the case of the original word when you are replacing it. For example if you mean to replace the word 'Book' with the word 'dog', it should be replaced as 'Dog'", From e9aa4b27a78ccc3e490743c876dee82bcc5e7acc Mon Sep 17 00:00:00 2001 From: Brett Guillory Date: Sat, 13 Jun 2015 23:28:33 -0500 Subject: [PATCH 02/54] Added missing MDN Link This bonfire "Missing letters"seems to be missing an important MDN link to "String.fromCharCode()", which is needed to get the missing character to return for the test. Since the missing character is obviously not in the string supplied, you cannot get the character code for it from the string. --- seed_data/challenges/basic-bonfires.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seed_data/challenges/basic-bonfires.json b/seed_data/challenges/basic-bonfires.json index 3773c4da22..e65268b535 100644 --- a/seed_data/challenges/basic-bonfires.json +++ b/seed_data/challenges/basic-bonfires.json @@ -966,7 +966,8 @@ "expect(fearNotLetter('yz')).to.be.undefined;" ], "MDNlinks": [ - "String.charCodeAt()" + "String.charCodeAt()", + "String.fromCharCode()" ], "challengeType": 5, "nameCn": "", From f50cee119cb76dc6a8ccdda61f6c5a9ffa9dab16 Mon Sep 17 00:00:00 2001 From: LumenTeun Date: Mon, 15 Jun 2015 17:26:37 +0200 Subject: [PATCH 03/54] 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 04/54] 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 05/54] 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 06/54] 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 07/54] 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(/