From 2acf8b727c020e63bd6fda9c24e3c564a0013d54 Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Fri, 14 Aug 2015 12:31:58 +0530 Subject: [PATCH 001/301] Bonfire: Where art thou test case update Added further test cases to check for adhering to the instructions in bonfire properly. --- 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 6f1cf7b9d4..d027bfa3ae 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -582,7 +582,8 @@ ], "tests": [ "assert.deepEqual(where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' }), [{ first: 'Tybalt', last: 'Capulet' }], 'should return an array of objects');", - "assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'should return with multiples');" + "assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'should return with multiples');", + "assert.deepEqual(where([{ 'a': 5 }, { 'a': 5 }, { 'a': 5, 'b': 10 }], { 'a': 5, 'b': 10 }), [{ 'a': 5, 'b': 10 }], 'should return a single object in array');" ], "MDNlinks": [ "Global Object", From 817276ab9623c1f92abbf94353f41fafdbb8a7ff Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Mon, 17 Aug 2015 02:18:27 +0530 Subject: [PATCH 002/301] Added test cases for Bonfire: Where do I belong Checks for proper positioning of element based on proper sorting order. --- seed/challenges/basic-bonfires.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index 6f1cf7b9d4..1712f90492 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -664,7 +664,11 @@ ], "tests": [ "expect(where([10, 20, 30, 40, 50], 35)).to.equal(3);", - "expect(where([10, 20, 30, 40, 50], 30)).to.equal(2);" + "expect(where([10, 20, 30, 40, 50], 30)).to.equal(2);", + "expect(where([40, 60], 50)).to.equal(1);", + "expect(where([5, 3, 20, 3], 3)).to.equal(0);", + "expect(where([2, 20, 10], 1)).to.equal(0);", + "expect(where([2, 5, 10], 15)).to.equal(3);" ], "type": "bonfire", "challengeType": 5, From b4afc3430a0c364242fc1399fcf2e64b1bf53e52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADnez?= Date: Sun, 16 Aug 2015 21:11:36 +0000 Subject: [PATCH 003/301] Fixed #1090 --- seed/challenges/html5-and-css.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json index 4d4ae95cad..e25c317578 100644 --- a/seed/challenges/html5-and-css.json +++ b/seed/challenges/html5-and-css.json @@ -867,8 +867,8 @@ "tests": [ "assert($(\"img\").hasClass(\"smaller-image\"), 'Your img element should have the class smaller-image.')", "assert($(\"img\").hasClass(\"thick-green-border\"), 'Your img element should have the class thick-green-border.')", - "assert($(\"img\").hasClass(\"thick-green-border\") && parseInt($(\"img\").css(\"border-top-width\")), 'Give your image a border width of 10px.')", - "assert(new RegExp(\"solid\", \"gi\").test(editor), 'Give your image a border style of solid.')", + "assert($(\"img\").hasClass(\"thick-green-border\") && parseInt($(\"img\").css(\"border-top-width\"), 10) === 10, 'Give your image a border width of 10px.')", + "assert($(\"img\").css(\"border-right-style\") === \"solid\", 'Give your image a border style of solid.')", "assert($(\"img\").css(\"border-left-color\") === \"rgb(0, 128, 0)\", 'The border around your img element should be green.')" ], "challengeSeed": [ From 6f7495e6cbbbfb432a6062bd48074fad70a9ea6d Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Mon, 17 Aug 2015 18:27:33 +0530 Subject: [PATCH 004/301] Added additional test case --- seed/challenges/basic-bonfires.json | 1 + 1 file changed, 1 insertion(+) diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index d027bfa3ae..845b55a1c8 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -583,6 +583,7 @@ "tests": [ "assert.deepEqual(where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' }), [{ first: 'Tybalt', last: 'Capulet' }], 'should return an array of objects');", "assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'should return with multiples');", + "assert.deepEqual(where([{ 'a': 1, 'b': 2 }, { 'a': 1 }, { 'a': 1, 'b': 2, 'c': 2 }], { 'a': 1, 'b': 2 }), [{ 'a': 1, 'b': 2 }, { 'a': 1, 'b': 2, 'c': 2 }], 'should return two objects in array');", "assert.deepEqual(where([{ 'a': 5 }, { 'a': 5 }, { 'a': 5, 'b': 10 }], { 'a': 5, 'b': 10 }), [{ 'a': 5, 'b': 10 }], 'should return a single object in array');" ], "MDNlinks": [ From 2fade59319e08b26941261ecbbbd7206b0fe23e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Mart=C3=ADnez?= Date: Mon, 17 Aug 2015 16:01:51 +0000 Subject: [PATCH 005/301] Changed test case for Waypoint: target elements by id --- seed/challenges/jquery.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/jquery.json b/seed/challenges/jquery.json index f2dfcb08e1..cd059066b1 100644 --- a/seed/challenges/jquery.json +++ b/seed/challenges/jquery.json @@ -161,7 +161,7 @@ ], "tests": [ "assert($(\"#target3\").hasClass(\"animated\"), 'Select the buttonelement with the id of target3 and use the jQuery addClass() function to give it the class of animated.');", - "assert($(\"#target3\").hasClass(\"fadeOut\") || $(\"#target3\").hasClass(\"fadeout\"), 'Target the element with the id target3 and use the jQuery addClass() function to give it the class fadeOut.')", + "assert(($(\"#target3\").hasClass(\"fadeOut\") || $(\"#target3\").hasClass(\"fadeout\")) && editor.match(/\\$\\(.#target3.\\)/g), 'Target the element with the id target3 and use the jQuery addClass() function to give it the class fadeOut.');", "assert(!editor.match(/class.*animated/g), 'Only use jQuery to add these classes to the element.')" ], "challengeSeed": [ From 666a0a2cf3636b7b38004b1b4d8e9a0f359c0c27 Mon Sep 17 00:00:00 2001 From: Matt Trifilo Date: Tue, 18 Aug 2015 00:43:28 -0500 Subject: [PATCH 006/301] Fixed: issue #2014 I changed "#button" to "button" in the example to target all buttons, and I changed the single quotes to double quotes in the description for consistency. --- seed/challenges/jquery.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/jquery.json b/seed/challenges/jquery.json index d6a6fa0fb0..166ff7f431 100644 --- a/seed/challenges/jquery.json +++ b/seed/challenges/jquery.json @@ -415,7 +415,7 @@ "You can also change the non-CSS properties of HTML elements with jQuery. For example, you can disable buttons.", "When you disable a button, it will become grayed-out and can no longer be clicked.", "jQuery has a function called .prop() that allows you to adjust the properties of elements.", - "Here's how you would disable all buttons: $('#button').prop('disabled', true);", + "Here's how you would disable all buttons: $("button").prop("disabled", true);", "Disable only the target1 button." ], "tests": [ From 8e705b14ecd649f62eae6d862bf97b3f2783efcd Mon Sep 17 00:00:00 2001 From: Ionut Costica Date: Wed, 19 Aug 2015 15:43:39 +0300 Subject: [PATCH 007/301] Fix for Issue #2179, #2141, #2077, #1999 Fixes #2179, #2141, #2077, #1999 --- seed/challenges/basic-javascript.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index 1096e02868..de249f003a 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -16,9 +16,9 @@ "Try creating one of each." ], "tests":[ - "assert(editor.getValue().match(/(\\/\\/)...../g), 'Create a \\/\\/ style comment that contains at least five letters');", - "assert(editor.getValue().match(/(\\/\\*)...../g), 'Create a \/\\* \\*\/ style comment that contains at least five letters.');", - "assert(editor.getValue().match(/(\\*\\/)/g), 'Make sure that you close the comment with a \\*\/');" + "assert(editor.getValue().match(/(\\/\\/)...../g), 'Create a // style comment that contains at least five letters');", + "assert(editor.getValue().match(/(\\/\\*)[\\w\\W]{5,}(?=\\*\\/)/gm), 'Create a /* */ style comment that contains at least five letters.');", + "assert(editor.getValue().match(/(\\*\\/)/g), 'Make sure that you close the comment with a */');" ], "challengeSeed":[ ], From 45bcd32c9c12fa073e40d8fa78e35c57f4af3bd8 Mon Sep 17 00:00:00 2001 From: Matt Trifilo Date: Wed, 19 Aug 2015 22:48:25 -0500 Subject: [PATCH 008/301] Edited Pull Request #2018 Escaped the double quotation marks on line 418. --- seed/challenges/jquery.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/jquery.json b/seed/challenges/jquery.json index 166ff7f431..3bc98205b4 100644 --- a/seed/challenges/jquery.json +++ b/seed/challenges/jquery.json @@ -415,7 +415,7 @@ "You can also change the non-CSS properties of HTML elements with jQuery. For example, you can disable buttons.", "When you disable a button, it will become grayed-out and can no longer be clicked.", "jQuery has a function called .prop() that allows you to adjust the properties of elements.", - "Here's how you would disable all buttons: $("button").prop("disabled", true);", + "Here's how you would disable all buttons: $(\"button\").prop(\"disabled\", true);", "Disable only the target1 button." ], "tests": [ From 23139ff45fbe0a936fff2d8d9e927b1fb3bce5c4 Mon Sep 17 00:00:00 2001 From: Mark Surnin Date: Thu, 20 Aug 2015 12:01:38 +0500 Subject: [PATCH 009/301] Added a test for factorial(0) to be equal to 1. --- 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 6f1cf7b9d4..84f92e15dd 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -90,7 +90,8 @@ "expect(factorialize(5)).to.be.a(\"Number\");", "expect(factorialize(5)).to.equal(120);", "expect(factorialize(10)).to.equal(3628800);", - "expect(factorialize(20)).to.equal(2432902008176640000);" + "expect(factorialize(20)).to.equal(2432902008176640000);", + "expect(factorialize(0)).to.equal(1);" ], "difficulty": "1.02", "description": [ From 636e16d5221fb59414875a89dffcdd4417a47cd3 Mon Sep 17 00:00:00 2001 From: Ionut Costica Date: Fri, 21 Aug 2015 15:18:40 +0300 Subject: [PATCH 010/301] [Waypoint: Remove Classes from an element with jQuery] usually expected to not validate if using removeClass() without parameters Added extra test to the waypoint to check if `.removeClass` was used with the `"btn-default"` parameter as most people expect to have to do (and are confused when the code validates before they've finished writing their function, as seen by the myriad of issues opened about it). Closes #2302 Closes #2402 Closes #2301 Closes #2197 Closes #2160 Closes #1923 Closes #1898 --- seed/challenges/jquery.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seed/challenges/jquery.json b/seed/challenges/jquery.json index aecaf645a6..99a8984a85 100644 --- a/seed/challenges/jquery.json +++ b/seed/challenges/jquery.json @@ -314,7 +314,8 @@ ], "tests": [ "assert($(\".btn-default\").length === 0, 'Remove the btn-default class from all of your button elements.')", - "assert(editor.match(/btn btn-default/g), 'Only use jQuery to remove this class from the element.')" + "assert(editor.match(/btn btn-default/g), 'Only use jQuery to remove this class from the element.')", + "assert(editor.match(/\\.[\\v\\s]*removeClass[\\s\\v]*\\([\\s\\v]*('|\")\\s*btn-default\\s*('|\")[\\s\\v]*\\)/gm), 'Only remove the btn-default class.'" ], "challengeSeed": [ "fccss", From 24dbee7257b5de16aeb256743a8018f00aefcaab Mon Sep 17 00:00:00 2001 From: Arsen Melikyan Date: Fri, 21 Aug 2015 18:38:43 +0400 Subject: [PATCH 011/301] fixed missing URL scheme #1063 --- seed/challenges/html5-and-css.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json index e5e376317d..10d1302ef9 100644 --- a/seed/challenges/html5-and-css.json +++ b/seed/challenges/html5-and-css.json @@ -750,7 +750,7 @@ "difficulty": 1.17, "description": [ "You can add images to your website by using the img element, and point to a specific image's URL using the src attribute.", - "An example of this would be <img src=\"www.your-image-source.com/your-image.jpg\">. Note that in most cases, img elements are self-closing.", + "An example of this would be <img src=\"http://www.your-image-source.com/your-image.jpg\">. Note that in most cases, img elements are self-closing.", "Try it with this image: https://bit.ly/fcc-relaxing-cat." ], "tests": [ From 0132a1afcae227ea80934ae61e64e0c7d2c81bc5 Mon Sep 17 00:00:00 2001 From: Jakob Dahl Date: Fri, 21 Aug 2015 17:45:30 +0200 Subject: [PATCH 012/301] 2324 for id attributes to be under relevant parents --- seed/challenges/bootstrap.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/seed/challenges/bootstrap.json b/seed/challenges/bootstrap.json index da7a510236..a447d6bffa 100644 --- a/seed/challenges/bootstrap.json +++ b/seed/challenges/bootstrap.json @@ -1949,8 +1949,8 @@ "Give the well on the left the id of left-well. Give the well on the right the id of right-well." ], "tests": [ - "assert($(\"#left-well\") && $(\"#left-well\").length > 0, 'Give your left well the id of left-well.')", - "assert($(\"#right-well\") && $(\"#right-well\").length > 0, 'Give your right well the id of right-well.')" + "assert($(\".col-xs-6\").children(\"#left-well\") && $(\".col-xs-6\").children(\"#left-well\").length > 0, 'Give your left well the id of left-well.')", + "assert($(\".col-xs-6\").children(\"#right-well\") && $(\".col-xs-6\").children(\"#right-well\").length > 0, 'Give your right well the id of right-well.')" ], "challengeSeed": [ "
", @@ -2046,12 +2046,12 @@ "Give each of your buttons a unique id like, starting with target1 and ending with target6." ], "tests": [ - "assert($(\"#target1\") && $(\"#target1\").length > 0, 'One button element should have the id target1.')", - "assert($(\"#target2\") && $(\"#target2\").length > 0, 'One button element should have the id target2.')", - "assert($(\"#target3\") && $(\"#target3\").length > 0, 'One button element should have the id target3.')", - "assert($(\"#target4\") && $(\"#target4\").length > 0, 'One button element should have the id target4.')", - "assert($(\"#target5\") && $(\"#target5\").length > 0, 'One button element should have the id target5.')", - "assert($(\"#target6\") && $(\"#target6\").length > 0, 'One button element should have the id target6.')" + "assert($(\"#left-well\").children(\"#target1\") && $(\"#left-well\").children(\"#target1\").length > 0, 'One button element should have the id target1.')", + "assert($(\"#left-well\").children(\"#target2\") && $(\"#left-well\").children(\"#target2\").length > 0, 'One button element should have the id target2.')", + "assert($(\"#left-well\").children(\"#target3\") && $(\"#left-well\").children(\"#target3\").length > 0, 'One button element should have the id target3.')", + "assert($(\"#right-well\").children(\"#target4\") && $(\"#right-well\").children(\"#target4\").length > 0, 'One button element should have the id target4.')", + "assert($(\"#right-well\").children(\"#target5\") && $(\"#right-well\").children(\"#target5\").length > 0, 'One button element should have the id target5.')", + "assert($(\"#right-well\").children(\"#target6\") && $(\"#right-well\").children(\"#target6\").length > 0, 'One button element should have the id target6.')" ], "challengeSeed": [ "
", From 37b4530df2b350378432efef1c12ff2807687a94 Mon Sep 17 00:00:00 2001 From: Arsen Melikyan Date: Sat, 22 Aug 2015 17:11:44 +0400 Subject: [PATCH 013/301] Fixes info buttons' text in Camper News search results In Camper News search results "more info..." buttons' text changes to "more info.more info...". This commit fixes that. --- server/views/stories/news-nav.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/views/stories/news-nav.jade b/server/views/stories/news-nav.jade index a3360dd45d..af3e038143 100644 --- a/server/views/stories/news-nav.jade +++ b/server/views/stories/news-nav.jade @@ -103,7 +103,7 @@ script. "" + "
" + "