From b5eef8a5e8d8425c113ba5983ac658339d95b2c9 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Mon, 1 Jun 2015 17:11:24 -0700 Subject: [PATCH 1/2] fix systemic typo in challenges --- seed_data/challenges/basic-html5-and-css.json | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/seed_data/challenges/basic-html5-and-css.json b/seed_data/challenges/basic-html5-and-css.json index 1f22850de3..bfcfb39af7 100644 --- a/seed_data/challenges/basic-html5-and-css.json +++ b/seed_data/challenges/basic-html5-and-css.json @@ -53,7 +53,7 @@ ], "tests": [ "assert(($('h2').length > 0), 'Create an h2 element.')", - "assert(editor.match(/<\\/h2>/g) && editor.match(/<\\/h2>/g).length === editor.match(/

/g).length, 'Make sureyour h2 element has a closing tag.')", + "assert(editor.match(/<\\/h2>/g) && editor.match(/<\\/h2>/g).length === editor.match(/

/g).length, 'Make sure your h2 element has a closing tag.')", "assert.isTrue((/cat(\\s)?photo(\\s)?app/gi).test($('h2').text()), 'Your h2 element should have the text \"CatPhotoApp\"')", "assert.isTrue((/hello(\\s)+world/gi).test($('h1').text()), 'Your h1 element should have the text \"Hello World\"')" ], @@ -89,7 +89,7 @@ "tests": [ "assert(($('p').length > 0), 'Create a p element.')", "assert.isTrue((/hello(\\s)+paragraph/gi).test($('p').text()), 'Your p element should have the text \"Hello Paragraph\".')", - "assert(editor.match(/<\\/p>/g) && editor.match(/<\\/p>/g).length === editor.match(/

/g).length, 'Make sureyour p element has a closing tag.')" + "assert(editor.match(/<\\/p>/g) && editor.match(/<\\/p>/g).length === editor.match(/

/g).length, 'Make sure your p element has a closing tag.')" ], "challengeSeed": [ "

Hello World

", @@ -480,7 +480,7 @@ ], "tests": [ "assert($('p').length > 1, 'You need 2 p elements with Kitty Ipsum text.')", - "assert(editor.match(/<\\/p>/g).length > 1, 'Make sureeach of your p elements has a closing tag.')", + "assert(editor.match(/<\\/p>/g).length > 1, 'Make sure each of your p elements has a closing tag.')", "assert($('p').css('font-size') === '16px', 'Give your p elements the font-size of 16px.')" ], "challengeSeed": [ @@ -1041,7 +1041,7 @@ "assert($('a').text().match(/cat\\sphotos/gi).length > 0, 'Your a element should have the anchor text of \"cat photos\"')", "assert($('a[href=\\'http://www.catphotoapp.com\\']').parent().is('p'), 'Your anchor element should be wrapped within a paragraph element.')", "assert($('p').text().match(/click\\shere\\sfor/gi), 'Your p element should have the text \"click here for\".')", - "assert(editor.match(/<\\/p>/g).length > 2, 'Make sureeach of your p elements has a closing tag.')" + "assert(editor.match(/<\\/p>/g).length > 2, 'Make sure each of your p elements has a closing tag.')" ], "challengeSeed": [ "", @@ -1168,7 +1168,7 @@ "tests": [ "assert(new RegExp('#').test($('a').children('img').parent().attr('href')), 'Your anchor element should be a dead link with a href attribute set to \"#\".')", "assert($('a').children('img').length > 0, 'Wrap your image element inside an anchor element.')", - "assert(editor.match(/<\\/a>/g).length > 1, 'Make sureeach of your a elements has a closing tag.')" + "assert(editor.match(/<\\/a>/g).length > 1, 'Make sure each of your a elements has a closing tag.')" ], "challengeSeed": [ "", @@ -1295,8 +1295,8 @@ "tests": [ "assert($('ul').length > 0, 'Create a ul element.')", "assert($('li').length > 2, 'Add three li elements to your ul element.')", - "assert(editor.match(/<\\/ul>/g), 'Make sureyour ul element has a closing tag.')", - "assert(editor.match(/<\\/li>/g) && editor.match(/<\\/li>/g).length > 2, 'Make sureeach of your li elements has a closing tag.')" + "assert(editor.match(/<\\/ul>/g), 'Make sure your ul element has a closing tag.')", + "assert(editor.match(/<\\/li>/g) && editor.match(/<\\/li>/g).length > 2, 'Make sure each of your li elements has a closing tag.')" ], "challengeSeed": [ "", @@ -1362,9 +1362,9 @@ "assert($('ol').length > 0, 'You should have an ol element on your webpage.')", "assert($('li').length > 5, 'You should have three li elements within your ul element.')", "assert($('li').length > 5, 'You should have three li elements within your ol element.')", - "assert(editor.match(/<\\/ol>/g), 'Make sureyour ol element has a closing tag.')", - "assert(editor.match(/<\\/ul>/g), 'Make sureyour ul element has a closing tag.')", - "assert(editor.match(/<\\/li>/g).length > 5, 'Make sureeach of your li elements has a closing tag.')" + "assert(editor.match(/<\\/ol>/g), 'Make sure your ol element has a closing tag.')", + "assert(editor.match(/<\\/ul>/g), 'Make sure your ul element has a closing tag.')", + "assert(editor.match(/<\\/li>/g).length > 5, 'Make sure each of your li elements has a closing tag.')" ], "challengeSeed": [ "", @@ -1651,7 +1651,7 @@ "assert($('form').children('button').length > 0, 'Your form should have a button inside it.')", "assert($('button').attr('type') === 'submit', 'Your submit button should have be of input type \"submit\".')", "assert($('button').text().match(/submit/gi), 'Your submit button should have the text \"submit\".')", - "assert(editor.match(/<\\/button>/g), 'Make sureyour button element has a closing tag.')" + "assert(editor.match(/<\\/button>/g), 'Make sure your button element has a closing tag.')" ], "challengeSeed": [ "", @@ -2125,7 +2125,7 @@ "assert($('div').children('ol').length > 0, 'Wrap your ol element inside your div element.')", "assert($('div').children('p').length > 1, 'Wrap your p element inside your div element.')", "assert($('div').children('ul').length > 0, 'Wrap your ul element inside your div element.')", - "assert(editor.match(/<\\/div>/g) && editor.match(/<\\/div>/g).length === editor.match(/
/g).length, 'Make sureyour div element has a closing tag.')" + "assert(editor.match(/<\\/div>/g) && editor.match(/<\\/div>/g).length === editor.match(/
/g).length, 'Make sure your div element has a closing tag.')" ], "challengeSeed": [ "", From 223c4499bab5ae5a62ef3efd198894c09c2d3042 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Mon, 1 Jun 2015 17:22:09 -0700 Subject: [PATCH 2/2] minor fixes so far --- seed_data/challenges/basic-html5-and-css.json | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/seed_data/challenges/basic-html5-and-css.json b/seed_data/challenges/basic-html5-and-css.json index bfcfb39af7..f588fcc9a0 100644 --- a/seed_data/challenges/basic-html5-and-css.json +++ b/seed_data/challenges/basic-html5-and-css.json @@ -16,7 +16,7 @@ "To enable the \"Go to my next challenge\" button on this exercise, change your h1 tag's text to say \"Hello World\" instead of \"Hello\"." ], "tests": [ - "assert.isTrue((/hello(\\s)+world/gi).test($('h1').text()), 'Your h1 element should have the text \"Hello World\"')" + "assert.isTrue((/hello(\\s)+world/gi).test($('h1').text()), 'Your h1 element should have the text \"Hello World\".')" ], "challengeSeed": [ "

Hello

" @@ -54,8 +54,8 @@ "tests": [ "assert(($('h2').length > 0), 'Create an h2 element.')", "assert(editor.match(/<\\/h2>/g) && editor.match(/<\\/h2>/g).length === editor.match(/

/g).length, 'Make sure your h2 element has a closing tag.')", - "assert.isTrue((/cat(\\s)?photo(\\s)?app/gi).test($('h2').text()), 'Your h2 element should have the text \"CatPhotoApp\"')", - "assert.isTrue((/hello(\\s)+world/gi).test($('h1').text()), 'Your h1 element should have the text \"Hello World\"')" + "assert.isTrue((/cat(\\s)?photo(\\s)?app/gi).test($('h2').text()), 'Your h2 element should have the text \"CatPhotoApp\".')", + "assert.isTrue((/hello(\\s)+world/gi).test($('h1').text()), 'Your h1 element should have the text \"Hello World\".')" ], "challengeSeed": [ "

Hello World

" @@ -84,7 +84,7 @@ "description": [ "Create a p element below your h2 element, and give it the text \"Hello Paragraph\".", "p elements are the preferred element for normal-sized paragraph text on websites. P is short for \"paragraph\".", - "You can create a p element like so: <p>I'm a p tag!</p>" + "You can create a p element like so: <p>I'm a p tag!</p>." ], "tests": [ "assert(($('p').length > 0), 'Create a p element.')", @@ -106,7 +106,7 @@ "descriptionEs": [ "Crea un elemento párrafo debajo de tu elemento h2, y dale el texto \"Hello Paragraph\". Apenas escribas la etiqueta de apertura <p>, una de nuestras pruebas pasarán (ya que ésta es HTML válido). Asegúrate de cerrar el elemento agregando la etiqueta de cierre </p>.", "Los elementos párrafo son los principales elementos para los párrafos de texto en tamaño normal en sitios web.", - "Tú puedes crear un elemento párrafo como éste: <p>I'm a p tag!</p>" + "Tú puedes crear un elemento párrafo como éste: <p>I'm a p tag!</p>." ], "namePt": "", "descriptionPt": [] @@ -122,7 +122,7 @@ "You'll encounter other self-closing element tags soon." ], "tests": [ - "assert(($('br').length > 0), 'Add a br element to your page, preferably between two of your elements.')" + "assert(($('br').length > 0), 'Add a br element to your page preferably between two of your elements.')" ], "challengeSeed": [ "

Hello World

", @@ -362,7 +362,9 @@ ], "tests": [ "assert($('h2').css('color') === 'rgb(0, 0, 255)', 'Your h2 element should be blue.')", - "assert(!$('h2').attr('style'), 'Remove the style attribute from your h2 element.')" + "assert(!$('h2').attr('style'), 'Remove the style attribute from your h2 element.')", + "assert(($('style').length > 0), 'Create a style element.')", + "assert(editor.match(/<\\/style>/g) && editor.match(/<\\/style>/g).length === editor.match(/