From 04ed850ef9b5e4d6ecdaa01694f3dddd919673c0 Mon Sep 17 00:00:00 2001 From: Charles Treece Date: Fri, 5 Jun 2015 01:33:10 -0400 Subject: [PATCH 1/6] Escaped dot in RegExp for the Waypoint: Override Styles with Important --- seed_data/challenges/basic-html5-and-css.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed_data/challenges/basic-html5-and-css.json b/seed_data/challenges/basic-html5-and-css.json index ea7d77dee3..a722e0f635 100644 --- a/seed_data/challenges/basic-html5-and-css.json +++ b/seed_data/challenges/basic-html5-and-css.json @@ -659,7 +659,7 @@ "Now see if you can make sure the h2 element is rendered in the color red without removing the \"blue-text\" class, doing an in-line styling, and without changing the sequence of CSS class declarations." ], "tests": [ - "assert(new RegExp('.blue-text', 'gi').test(editor), 'Create the CSS class \"blue-text\"')", + "assert(new RegExp(/\.blue-text/gi).test(editor), 'Create the CSS class \"blue-text\"')", "assert(new RegExp('.urgently-red', 'gi').test(editor), 'Create the CSS class \"urgently-red\"')", "assert(new RegExp('red.?!important', 'gi').test(editor), 'Add the \"!important\" declaration!')", "assert($('h2').hasClass('blue-text'), 'Your h2 element should have the class \"blue-text\".')", From be633105c51753933d2caf2010387b8d944043cd Mon Sep 17 00:00:00 2001 From: Charles Treece Date: Sat, 6 Jun 2015 16:43:27 -0400 Subject: [PATCH 2/6] Fixed blue-text and urgently-red regex constructors --- seed_data/challenges/basic-html5-and-css.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seed_data/challenges/basic-html5-and-css.json b/seed_data/challenges/basic-html5-and-css.json index a722e0f635..424ed8797b 100644 --- a/seed_data/challenges/basic-html5-and-css.json +++ b/seed_data/challenges/basic-html5-and-css.json @@ -659,8 +659,8 @@ "Now see if you can make sure the h2 element is rendered in the color red without removing the \"blue-text\" class, doing an in-line styling, and without changing the sequence of CSS class declarations." ], "tests": [ - "assert(new RegExp(/\.blue-text/gi).test(editor), 'Create the CSS class \"blue-text\"')", - "assert(new RegExp('.urgently-red', 'gi').test(editor), 'Create the CSS class \"urgently-red\"')", + "assert(new RegExp('\\.blue-text', 'gi').test(editor), 'Create the CSS class \"blue-text\"')", + "assert(new RegExp('\\.urgently-red', 'gi').test(editor), 'Create the CSS class \"urgently-red\"')", "assert(new RegExp('red.?!important', 'gi').test(editor), 'Add the \"!important\" declaration!')", "assert($('h2').hasClass('blue-text'), 'Your h2 element should have the class \"blue-text\".')", "assert($('h2').hasClass('urgently-red'), 'Your h2 element should have the class \"urgently-red\".')", From de831a9d3c37c3d1251b50cff9b04f8d2a4169ae Mon Sep 17 00:00:00 2001 From: Charles Treece Date: Sat, 6 Jun 2015 21:53:27 -0400 Subject: [PATCH 3/6] Removed aarmy example from descr and changed the test for it to passing --- seed_data/challenges/basic-bonfires.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/seed_data/challenges/basic-bonfires.json b/seed_data/challenges/basic-bonfires.json index d067eed8e3..80a9090877 100644 --- a/seed_data/challenges/basic-bonfires.json +++ b/seed_data/challenges/basic-bonfires.json @@ -509,8 +509,7 @@ "Return true if the string in the first element of the array contains all of the letters of the string in the second element of the array.", "For example, ['hello', 'Hello'], should return true because all of the letters in the second string are present in the first, ignoring case.", "The arguments ['hello', 'hey'] should return false because the string 'hello' does not contain a 'y'.", - "Another example, ['Alien', 'line'], should return true because all of the letters in 'line' are present in 'Alien'.", - "Lastly, ['Mary', 'Aarmy'] should return false because 'Mary' is only 4 letters while 'Aarmy' is 5, so 'Mary' can't possibly contain 'Aarmy'", + "Lastly, ['Alien', 'line'], should return true because all of the letters in 'line' are present in 'Alien'.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], "challengeSeed": [ @@ -525,7 +524,7 @@ "expect(mutation(['hello', 'Hello'])).to.be.true;", "expect(mutation(['zyxwvutsrqponmlkjihgfedcba', 'qrstu'])).to.be.true;", "expect(mutation(['Mary', 'Army'])).to.be.true;", - "expect(mutation(['Mary', 'Aarmy'])).to.be.false;", + "expect(mutation(['Mary', 'Aarmy'])).to.be.true;", "expect(mutation(['Alien', 'line'])).to.be.true;", "expect(mutation(['floor', 'for'])).to.be.true;" ], From b7145f46045f8476f7431f01845ff1a4f85eed54 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sun, 7 Jun 2015 21:59:04 -0700 Subject: [PATCH 4/6] fix #856 --- seed_data/challenges/basic-html5-and-css.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed_data/challenges/basic-html5-and-css.json b/seed_data/challenges/basic-html5-and-css.json index ea7d77dee3..87a5800cc8 100644 --- a/seed_data/challenges/basic-html5-and-css.json +++ b/seed_data/challenges/basic-html5-and-css.json @@ -203,7 +203,7 @@ "assert(($('h1').length === 0), 'Comment out your h1 element so that it is not visible on your page.')", "assert(($('h2').length > 0), 'Leave your h2 element uncommented so that is not visible on your page.')", "assert(($('p').length === 0), 'Comment out your p element so that it is not visible on your page.')", - "assert(editor.match(/-->/g).length > 0, 'Be sure to close each of your comments with -->.')" + "assert(editor.match(/-->/g).length > 1, 'Be sure to close each of your comments with -->.')" ], "challengeSeed": [ "