Skip to content

Commit

Permalink
fix(curriculum): quotes in tests (#18828)
Browse files Browse the repository at this point in the history
* fix(curriculum): tests quotes

* fix(curriculum): fill seed-teardown

* fix(curriculum): fix tests and remove unneeded seed-teardown
  • Loading branch information
ValeraS authored and raisedadead committed Oct 20, 2018
1 parent 96eb124 commit 79d9012
Show file tree
Hide file tree
Showing 1,339 changed files with 6,499 additions and 5,185 deletions.
Expand Up @@ -24,8 +24,8 @@ Camper Cat happens to be both a coding ninja and an actual ninja, and is buildin

```yml
tests:
- text: 'Your <code>img</code> tag should have an <code>alt</code> attribute, and it should not be empty.'
testString: 'assert($("img").attr("alt"), "Your <code>img</code> tag should have an <code>alt</code> attribute, and it should not be empty.");'
- text: Your <code>img</code> tag should have an <code>alt</code> attribute, and it should not be empty.
testString: assert($('img').attr('alt'), 'Your <code>img</code> tag should have an <code>alt</code> attribute, and it should not be empty.');

```

Expand Down
Expand Up @@ -25,13 +25,13 @@ Camper Cat is setting up a Mortal Kombat tournament and wants to ask his competi
```yml
tests:
- text: Your code should add one <code>input</code> tag for the date selector field.
testString: 'assert($("input").length == 2, "Your code should add one <code>input</code> tag for the date selector field.");'
testString: assert($('input').length == 2, 'Your code should add one <code>input</code> tag for the date selector field.');
- text: Your <code>input</code> tag should have a <code>type</code> attribute with a value of date.
testString: 'assert($("input").attr("type") == "date", "Your <code>input</code> tag should have a <code>type</code> attribute with a value of date.");'
testString: assert($('input').attr('type') == 'date', 'Your <code>input</code> tag should have a <code>type</code> attribute with a value of date.');
- text: Your <code>input</code> tag should have an <code>id</code> attribute with a value of pickdate.
testString: 'assert($("input").attr("id") == "pickdate", "Your <code>input</code> tag should have an <code>id</code> attribute with a value of pickdate.");'
testString: assert($('input').attr('id') == 'pickdate', 'Your <code>input</code> tag should have an <code>id</code> attribute with a value of pickdate.');
- text: Your <code>input</code> tag should have a <code>name</code> attribute with a value of date.
testString: 'assert($("input").attr("name") == "date", "Your <code>input</code> tag should have a <code>name</code> attribute with a value of date.");'
testString: assert($('input').attr('name') == 'date', 'Your <code>input</code> tag should have a <code>name</code> attribute with a value of date.');

```

Expand Down
Expand Up @@ -23,7 +23,7 @@ Camper Cat is testing different styles for an important button, but the yellow (
```yml
tests:
- text: Your code should change the text <code>color</code> for the <code>button</code> to the dark blue.
testString: 'assert($("button").css("color") == "rgb(0, 51, 102)", "Your code should change the text <code>color</code> for the <code>button</code> to the dark blue.");'
testString: assert($('button').css('color') == 'rgb(0, 51, 102)', 'Your code should change the text <code>color</code> for the <code>button</code> to the dark blue.');

```

Expand Down
Expand Up @@ -24,9 +24,9 @@ Camper Cat is experimenting with using color for his blog text and background, b
```yml
tests:
- text: Your code should only change the lightness value for the text <code>color</code> property to a value of 15%.
testString: 'assert(code.match(/color:\s*?hsl\(0,\s*?55%,\s*?15%\)/gi), "Your code should only change the lightness value for the text <code>color</code> property to a value of 15%.");'
testString: assert(code.match(/color:\s*?hsl\(0,\s*?55%,\s*?15%\)/gi), 'Your code should only change the lightness value for the text <code>color</code> property to a value of 15%.');
- text: Your code should only change the lightness value for the <code>background-color</code> property to a value of 55%.
testString: 'assert(code.match(/background-color:\s*?hsl\(120,\s*?25%,\s*?55%\)/gi), "Your code should only change the lightness value for the <code>background-color</code> property to a value of 55%.");'
testString: assert(code.match(/background-color:\s*?hsl\(120,\s*?25%,\s*?55%\)/gi), 'Your code should only change the lightness value for the <code>background-color</code> property to a value of 55%.');

```

Expand Down
Expand Up @@ -22,9 +22,9 @@ The link text that Camper Cat is using is not very descriptive without the surro
```yml
tests:
- text: Your code should move the anchor <code>a</code> tags from around the words "Click here" to wrap around the words "information about batteries".
testString: 'assert($("a").text().match(/^(information about batteries)$/g), "Your code should move the anchor <code>a</code> tags from around the words "Click here" to wrap around the words "information about batteries".");'
testString: assert($('a').text().match(/^(information about batteries)$/g), 'Your code should move the anchor <code>a</code> tags from around the words "Click here" to wrap around the words "information about batteries".');
- text: Make sure your <code>a</code> element has a closing tag.
testString: 'assert(code.match(/<\/a>/g) && code.match(/<\/a>/g).length === code.match(/<a href=(""|"")>/g).length, "Make sure your <code>a</code> element has a closing tag.");'
testString: assert(code.match(/<\/a>/g) && code.match(/<\/a>/g).length === code.match(/<a href=(''|"")>/g).length, 'Make sure your <code>a</code> element has a closing tag.');

```

Expand Down
Expand Up @@ -26,19 +26,19 @@ Time to take a break from Camper Cat and meet fellow camper Zersiax (@zersiax),
```yml
tests:
- text: Your code should have one <code>audio</code> tag.
testString: 'assert($("audio").length === 1, "Your code should have one <code>audio</code> tag.");'
testString: assert($('audio').length === 1, 'Your code should have one <code>audio</code> tag.');
- text: Make sure your <code>audio</code> element has a closing tag.
testString: 'assert(code.match(/<\/audio>/g).length === 1 && code.match(/<audio.*>[\s\S]*<\/audio>/g), "Make sure your <code>audio</code> element has a closing tag.");'
testString: assert(code.match(/<\/audio>/g).length === 1 && code.match(/<audio.*>[\s\S]*<\/audio>/g), 'Make sure your <code>audio</code> element has a closing tag.');
- text: The <code>audio</code> tag should have the <code>controls</code> attribute.
testString: 'assert($("audio").attr("controls"), "The <code>audio</code> tag should have the <code>controls</code> attribute.");'
testString: assert($('audio').attr('controls'), 'The <code>audio</code> tag should have the <code>controls</code> attribute.');
- text: Your code should have one <code>source</code> tag.
testString: 'assert($("source").length === 1, "Your code should have one <code>source</code> tag.");'
testString: assert($('source').length === 1, 'Your code should have one <code>source</code> tag.');
- text: Your <code>source</code> tag should be inside the <code>audio</code> tags.
testString: 'assert($("audio").children("source").length === 1, "Your <code>source</code> tag should be inside the <code>audio</code> tags.");'
testString: assert($('audio').children('source').length === 1, 'Your <code>source</code> tag should be inside the <code>audio</code> tags.');
- text: The value for the <code>src</code> attribute on the <code>source</code> tag should match the link in the instructions exactly.
testString: 'assert($("source").attr("src") === "https://s3.amazonaws.com/freecodecamp/screen-reader.mp3", "The value for the <code>src</code> attribute on the <code>source</code> tag should match the link in the instructions exactly.");'
testString: assert($('source').attr('src') === 'https://s3.amazonaws.com/freecodecamp/screen-reader.mp3', 'The value for the <code>src</code> attribute on the <code>source</code> tag should match the link in the instructions exactly.');
- text: Your code should include a <code>type</code> attribute on the <code>source</code> tag with a value of audio/mpeg.
testString: 'assert($("source").attr("type") === "audio/mpeg", "Your code should include a <code>type</code> attribute on the <code>source</code> tag with a value of audio/mpeg.");'
testString: assert($('source').attr('type') === 'audio/mpeg', 'Your code should include a <code>type</code> attribute on the <code>source</code> tag with a value of audio/mpeg.');

```

Expand Down
Expand Up @@ -24,17 +24,17 @@ Camper Cat is hard at work creating a stacked bar chart showing the amount of ti
```yml
tests:
- text: Your code should have one <code>figure</code> tag.
testString: 'assert($("figure").length == 1, "Your code should have one <code>figure</code> tag.");'
testString: assert($('figure').length == 1, 'Your code should have one <code>figure</code> tag.');
- text: Your code should have one <code>figcaption</code> tag.
testString: 'assert($("figcaption").length == 1, "Your code should have one <code>figcaption</code> tag.");'
testString: assert($('figcaption').length == 1, 'Your code should have one <code>figcaption</code> tag.');
- text: Your code should not have any <code>div</code> tags.
testString: 'assert($("div").length == 0, "Your code should not have any <code>div</code> tags.");'
testString: assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.');
- text: Your code should not have any <code>p</code> tags.
testString: 'assert($("p").length == 0, "Your code should not have any <code>p</code> tags.");'
testString: assert($('p').length == 0, 'Your code should not have any <code>p</code> tags.');
- text: The <code>figcaption</code> should be a child of the <code>figure</code> tag.
testString: 'assert($("figure").children("figcaption").length == 1, "The <code>figcaption</code> should be a child of the <code>figure</code> tag.");'
testString: assert($('figure').children('figcaption').length == 1, 'The <code>figcaption</code> should be a child of the <code>figure</code> tag.');
- text: Make sure your <code>figure</code> element has a closing tag.
testString: 'assert(code.match(/<\/figure>/g) && code.match(/<\/figure>/g).length === code.match(/<figure>/g).length, "Make sure your <code>figure</code> element has a closing tag.");'
testString: assert(code.match(/<\/figure>/g) && code.match(/<\/figure>/g).length === code.match(/<figure>/g).length, 'Make sure your <code>figure</code> element has a closing tag.');

```

Expand Down
Expand Up @@ -25,9 +25,9 @@ Camper Cat expects a lot of interest in his thoughtful blog posts, and wants to
```yml
tests:
- text: Your code should have a <code>for</code> attribute on the <code>label</code> tag that is not empty.
testString: 'assert($("label").attr("for"), "Your code should have a <code>for</code> attribute on the <code>label</code> tag that is not empty.");'
testString: assert($('label').attr('for'), 'Your code should have a <code>for</code> attribute on the <code>label</code> tag that is not empty.');
- text: Your <code>for</code> attribute value should match the <code>id</code> value on the email <code>input</code>.
testString: 'assert($("label").attr("for") == "email", "Your <code>for</code> attribute value should match the <code>id</code> value on the email <code>input</code>.");'
testString: assert($('label').attr('for') == 'email', 'Your <code>for</code> attribute value should match the <code>id</code> value on the email <code>input</code>.');

```

Expand Down
Expand Up @@ -22,9 +22,9 @@ Camper Cat's choice of light gray text on a white background for his recent blog
```yml
tests:
- text: Your code should change the text <code>color</code> for the <code>body</code> to the darker gray.
testString: 'assert($("body").css("color") == "rgb(99, 99, 99)", "Your code should change the text <code>color</code> for the <code>body</code> to the darker gray.");'
testString: assert($('body').css('color') == 'rgb(99, 99, 99)', 'Your code should change the text <code>color</code> for the <code>body</code> to the darker gray.');
- text: Your code should not change the <code>background-color</code> for the <code>body</code>.
testString: 'assert($("body").css("background-color") == "rgb(255, 255, 255)", "Your code should not change the <code>background-color</code> for the <code>body</code>.");'
testString: assert($('body').css('background-color') == 'rgb(255, 255, 255)', 'Your code should not change the <code>background-color</code> for the <code>body</code>.');

```

Expand Down
Expand Up @@ -24,9 +24,9 @@ Camper Cat has some big ideas for his ninja weapons page. Help him set up his ma
```yml
tests:
- text: Your code should have one <code>main</code> tag.
testString: 'assert($("main").length == 1, "Your code should have one <code>main</code> tag.");'
testString: assert($('main').length == 1, 'Your code should have one <code>main</code> tag.');
- text: The <code>main</code> tags should be between the closing <code>header</code> tag and the opening <code>footer</code> tag.
testString: 'assert(code.match(/<\/header>\s*?<main>\s*?<\/main>/gi), "The <code>main</code> tags should be between the closing <code>header</code> tag and the opening <code>footer</code> tag.");'
testString: assert(code.match(/<\/header>\s*?<main>\s*?<\/main>/gi), 'The <code>main</code> tags should be between the closing <code>header</code> tag and the opening <code>footer</code> tag.');

```

Expand Down
Expand Up @@ -25,9 +25,9 @@ Camper Cat has coded a skeleton page for the blog part of his website. He's plan
```yml
tests:
- text: Your <code>img</code> tag should have an <code>alt</code> attribute.
testString: 'assert(!($("img").attr("alt") == undefined), "Your <code>img</code> tag should have an <code>alt</code> attribute.");'
testString: assert(!($('img').attr('alt') == undefined), 'Your <code>img</code> tag should have an <code>alt</code> attribute.');
- text: The <code>alt</code> attribute should be set to an empty string.
testString: 'assert($("img").attr("alt") == "", "The <code>alt</code> attribute should be set to an empty string.");'
testString: assert($('img').attr('alt') == '', 'The <code>alt</code> attribute should be set to an empty string.');

```

Expand Down
Expand Up @@ -29,13 +29,13 @@ Camper Cat created a really cool stacked bar chart for his training page, and pu
```yml
tests:
- text: Your code should set the <code>position</code> property of the <code>sr-only</code> class to a value of absolute.
testString: 'assert($(".sr-only").css("position") == "absolute", "Your code should set the <code>position</code> property of the <code>sr-only</code> class to a value of absolute.");'
testString: assert($('.sr-only').css('position') == 'absolute', 'Your code should set the <code>position</code> property of the <code>sr-only</code> class to a value of absolute.');
- text: Your code should set the <code>left</code> property of the <code>sr-only</code> class to a value of -10000px.
testString: 'assert($(".sr-only").css("left") == "-10000px", "Your code should set the <code>left</code> property of the <code>sr-only</code> class to a value of -10000px.");'
testString: assert($('.sr-only').css('left') == '-10000px', 'Your code should set the <code>left</code> property of the <code>sr-only</code> class to a value of -10000px.');
- text: Your code should set the <code>width</code> property of the <code>sr-only</code> class to a value of 1 pixel.
testString: 'assert(code.match(/width:\s*?1px/gi), "Your code should set the <code>width</code> property of the <code>sr-only</code> class to a value of 1 pixel.");'
testString: assert(code.match(/width:\s*?1px/gi), 'Your code should set the <code>width</code> property of the <code>sr-only</code> class to a value of 1 pixel.');
- text: Your code should set the <code>height</code> property of the <code>sr-only</code> class to a value of 1 pixel.
testString: 'assert(code.match(/height:\s*?1px/gi), "Your code should set the <code>height</code> property of the <code>sr-only</code> class to a value of 1 pixel.");'
testString: assert(code.match(/height:\s*?1px/gi), 'Your code should set the <code>height</code> property of the <code>sr-only</code> class to a value of 1 pixel.');

```

Expand Down
Expand Up @@ -24,13 +24,13 @@ Camper Cat wants the links around the two blog article titles to have keyboard s
```yml
tests:
- text: Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of "first".
testString: 'assert($("#first").attr("accesskey"), "Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of "first".");'
testString: assert($('#first').attr('accesskey'), 'Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of "first".');
- text: Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of "second".
testString: 'assert($("#second").attr("accesskey"), "Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of "second".");'
testString: assert($('#second').attr('accesskey'), 'Your code should add an <code>accesskey</code> attribute to the <code>a</code> tag with the <code>id</code> of "second".');
- text: Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of "first" to "g". Note that case matters.
testString: 'assert($("#first").attr("accesskey") == "g", "Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of "first" to "g". Note that case matters.");'
testString: assert($('#first').attr('accesskey') == 'g', 'Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of "first" to "g". Note that case matters.');
- text: Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of "second" to "c". Note that case matters.
testString: 'assert($("#second").attr("accesskey") == "c", "Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of "second" to "c". Note that case matters.");'
testString: assert($('#second').attr('accesskey') == 'c', 'Your code should set the <code>accesskey</code> attribute on the <code>a</code> tag with the <code>id</code> of "second" to "c". Note that case matters.');

```

Expand Down
Expand Up @@ -21,11 +21,11 @@ Camper Cat's training page is making good progress. Change the <code>div</code>
```yml
tests:
- text: Your code should have one <code>footer</code> tag.
testString: 'assert($("footer").length == 1, "Your code should have one <code>footer</code> tag.");'
testString: assert($('footer').length == 1, 'Your code should have one <code>footer</code> tag.');
- text: Your code should not have any <code>div</code> tags.
testString: 'assert($("div").length == 0, "Your code should not have any <code>div</code> tags.");'
testString: assert($('div').length == 0, 'Your code should not have any <code>div</code> tags.');
- text: Your code should have an opening and closing <code>footer</code> tag.
testString: 'assert(code.match(/<footer>\s*&copy; 2018 Camper Cat\s*<\/footer>/g), "Your code should have an opening and closing <code>footer</code> tag.");'
testString: assert(code.match(/<footer>\s*&copy; 2018 Camper Cat\s*<\/footer>/g), 'Your code should have an opening and closing <code>footer</code> tag.');

```

Expand Down

0 comments on commit 79d9012

Please sign in to comment.