Skip to content
Permalink
Browse files

fix(curriculum): Remove unnecessary assert message argument from Engl…

…ish Data Visualization challenges (#36424)

* fix: removed assert msg argument

* fix: corrected test text
  • Loading branch information...
RandellDawson authored and ojeytonwilliams committed Jul 11, 2019
1 parent e2e69c2 commit db8098601ed3b8047d670ab7b6edf7db6024089b
Showing with 201 additions and 201 deletions.
  1. +1 −1 ...sh/04-data-visualization/data-visualization-with-d3/add-a-hover-effect-to-a-d3-element.english.md
  2. +10 −10 ...english/04-data-visualization/data-visualization-with-d3/add-a-tooltip-to-a-d3-element.english.md
  3. +11 −11 ...04-data-visualization/data-visualization-with-d3/add-attributes-to-the-circle-elements.english.md
  4. +3 −3 ...s/english/04-data-visualization/data-visualization-with-d3/add-axes-to-a-visualization.english.md
  5. +2 −2 ...hallenges/english/04-data-visualization/data-visualization-with-d3/add-classes-with-d3.english.md
  6. +6 −6 ...english/04-data-visualization/data-visualization-with-d3/add-document-elements-with-d3.english.md
  7. +2 −2 ...nglish/04-data-visualization/data-visualization-with-d3/add-inline-styling-to-elements.english.md
  8. +9 −9 ...ges/english/04-data-visualization/data-visualization-with-d3/add-labels-to-d3-elements.english.md
  9. +11 −11 ...sh/04-data-visualization/data-visualization-with-d3/add-labels-to-scatter-plot-circles.english.md
  10. +9 −9 ...s/english/04-data-visualization/data-visualization-with-d3/change-styles-based-on-data.english.md
  11. +1 −1 ...sh/04-data-visualization/data-visualization-with-d3/change-the-color-of-an-svg-element.english.md
  12. +9 −9 ...4-data-visualization/data-visualization-with-d3/change-the-presentation-of-a-bar-chart.english.md
  13. +4 −4 ...a-visualization/data-visualization-with-d3/create-a-bar-for-each-data-point-in-the-set.english.md
  14. +3 −3 ...english/04-data-visualization/data-visualization-with-d3/create-a-linear-scale-with-d3.english.md
  15. +1 −1 ...04-data-visualization/data-visualization-with-d3/create-a-scatterplot-with-svg-circles.english.md
  16. +5 −5 ...enges/english/04-data-visualization/data-visualization-with-d3/display-shapes-with-svg.english.md
  17. +9 −9 ...ata-visualization/data-visualization-with-d3/dynamically-change-the-height-of-each-bar.english.md
  18. +9 −9 ...-visualization/data-visualization-with-d3/dynamically-set-the-coordinates-for-each-bar.english.md
  19. +9 −9 ...hallenges/english/04-data-visualization/data-visualization-with-d3/invert-svg-elements.english.md
  20. +3 −3 ...llenges/english/04-data-visualization/data-visualization-with-d3/learn-about-svg-in-d3.english.md
  21. +3 −3 ...sh/04-data-visualization/data-visualization-with-d3/select-a-group-of-elements-with-d3.english.md
  22. +5 −5 ...h/04-data-visualization/data-visualization-with-d3/set-a-domain-and-a-range-on-a-scale.english.md
  23. +2 −2 ...um/challenges/english/04-data-visualization/data-visualization-with-d3/style-d3-labels.english.md
  24. +9 −9 ...a-visualization/data-visualization-with-d3/update-the-height-of-an-element-dynamically.english.md
  25. +22 −22 ...ata-visualization/data-visualization-with-d3/use-a-pre-defined-scale-to-place-elements.english.md
  26. +3 −3 ...challenges/english/04-data-visualization/data-visualization-with-d3/use-dynamic-scales.english.md
  27. +1 −1 ...d3/use-the-d3.max-and-d3.min-functions-to-find-minimum-and-maximum-values-in-a-dataset.english.md
  28. +4 −4 ...allenges/english/04-data-visualization/data-visualization-with-d3/work-with-data-in-d3.english.md
  29. +9 −9 .../english/04-data-visualization/data-visualization-with-d3/work-with-dynamic-data-in-d3.english.md
  30. +1 −1 ...nges/english/04-data-visualization/json-apis-and-ajax/access-the-json-data-from-an-api.english.md
  31. +1 −1 ...llenges/english/04-data-visualization/json-apis-and-ajax/change-text-with-click-events.english.md
  32. +3 −3 .../challenges/english/04-data-visualization/json-apis-and-ajax/convert-json-data-to-html.english.md
  33. +4 −4 ...-visualization/json-apis-and-ajax/get-geolocation-data-to-find-a-users-gps-coordinates.english.md
  34. +6 −6 ...ta-visualization/json-apis-and-ajax/get-json-with-the-javascript-xmlhttprequest-method.english.md
  35. +2 −2 ...tion/json-apis-and-ajax/handle-click-events-with-javascript-using-the-onclick-property.english.md
  36. +7 −7 ...a-visualization/json-apis-and-ajax/post-data-with-the-javascript-xmlhttprequest-method.english.md
  37. +1 −1 ...lish/04-data-visualization/json-apis-and-ajax/pre-filter-json-to-get-the-data-you-need.english.md
  38. +1 −1 ...enges/english/04-data-visualization/json-apis-and-ajax/render-images-from-data-sources.english.md
@@ -21,7 +21,7 @@ Use the <code>attr()</code> method to add a class of <code>bar</code> to all the
```yml
tests:
- text: Your <code>rect</code> elements should have a class of <code>bar</code>.
testString: assert($('rect').attr('class') == "bar", 'Your <code>rect</code> elements should have a class of <code>bar</code>.');
testString: assert($('rect').attr('class') == "bar");
```

@@ -21,25 +21,25 @@ Append a <code>title</code> element under each <code>rect</code> node. Then call
```yml
tests:
- text: Your code should have 9 <code>title</code> elements.
testString: assert($('title').length == 9, 'Your code should have 9 <code>title</code> elements.');
testString: assert($('title').length == 9);
- text: The first <code>title</code> element should have tooltip text of 12.
testString: assert($('title').eq(0).text() == '12', 'The first <code>title</code> element should have tooltip text of 12.');
testString: assert($('title').eq(0).text() == '12');
- text: The second <code>title</code> element should have tooltip text of 31.
testString: assert($('title').eq(1).text() == '31', 'The second <code>title</code> element should have tooltip text of 31.');
testString: assert($('title').eq(1).text() == '31');
- text: The third <code>title</code> element should have tooltip text of 22.
testString: assert($('title').eq(2).text() == '22', 'The third <code>title</code> element should have tooltip text of 22.');
testString: assert($('title').eq(2).text() == '22');
- text: The fourth <code>title</code> element should have tooltip text of 17.
testString: assert($('title').eq(3).text() == '17', 'The fourth <code>title</code> element should have tooltip text of 17.');
testString: assert($('title').eq(3).text() == '17');
- text: The fifth <code>title</code> element should have tooltip text of 25.
testString: assert($('title').eq(4).text() == '25', 'The fifth <code>title</code> element should have tooltip text of 25.');
testString: assert($('title').eq(4).text() == '25');
- text: The sixth <code>title</code> element should have tooltip text of 18.
testString: assert($('title').eq(5).text() == '18', 'The sixth <code>title</code> element should have tooltip text of 18.');
testString: assert($('title').eq(5).text() == '18');
- text: The seventh <code>title</code> element should have tooltip text of 29.
testString: assert($('title').eq(6).text() == '29', 'The seventh <code>title</code> element should have tooltip text of 29.');
testString: assert($('title').eq(6).text() == '29');
- text: The eighth <code>title</code> element should have tooltip text of 14.
testString: assert($('title').eq(7).text() == '14', 'The eighth <code>title</code> element should have tooltip text of 14.');
testString: assert($('title').eq(7).text() == '14');
- text: The ninth <code>title</code> element should have tooltip text of 9.
testString: assert($('title').eq(8).text() == '9', 'The ninth <code>title</code> element should have tooltip text of 9.');
testString: assert($('title').eq(8).text() == '9');
```

@@ -23,27 +23,27 @@ Add <code>cx</code>, <code>cy</code>, and <code>r</code> attributes to the <code
```yml
tests:
- text: Your code should have 10 <code>circle</code> elements.
testString: assert($('circle').length == 10, 'Your code should have 10 <code>circle</code> elements.');
testString: assert($('circle').length == 10);
- text: The first <code>circle</code> element should have a <code>cx</code> value of 34, a <code>cy</code> value of 422, and an <code>r</code> value of 5.
testString: assert($('circle').eq(0).attr('cx') == '34' && $('circle').eq(0).attr('cy') == '422' && $('circle').eq(0).attr('r') == '5', 'The first <code>circle</code> element should have a <code>cx</code> value of 34, a <code>cy</code> value of 422, and an <code>r</code> value of 5.');
testString: assert($('circle').eq(0).attr('cx') == '34' && $('circle').eq(0).attr('cy') == '422' && $('circle').eq(0).attr('r') == '5');
- text: The second <code>circle</code> element should have a <code>cx</code> value of 109, a <code>cy</code> value of 220, and an <code>r</code> value of 5.
testString: assert($('circle').eq(1).attr('cx') == '109' && $('circle').eq(1).attr('cy') == '220' && $('circle').eq(1).attr('r') == '5', 'The second <code>circle</code> element should have a <code>cx</code> value of 109, a <code>cy</code> value of 220, and an <code>r</code> value of 5.');
testString: assert($('circle').eq(1).attr('cx') == '109' && $('circle').eq(1).attr('cy') == '220' && $('circle').eq(1).attr('r') == '5');
- text: The third <code>circle</code> element should have a <code>cx</code> value of 310, a <code>cy</code> value of 380, and an <code>r</code> value of 5.
testString: assert($('circle').eq(2).attr('cx') == '310' && $('circle').eq(2).attr('cy') == '380' && $('circle').eq(2).attr('r') == '5', 'The third <code>circle</code> element should have a <code>cx</code> value of 310, a <code>cy</code> value of 380, and an <code>r</code> value of 5.');
testString: assert($('circle').eq(2).attr('cx') == '310' && $('circle').eq(2).attr('cy') == '380' && $('circle').eq(2).attr('r') == '5');
- text: The fourth <code>circle</code> element should have a <code>cx</code> value of 79, a <code>cy</code> value of 89, and an <code>r</code> value of 5.
testString: assert($('circle').eq(3).attr('cx') == '79' && $('circle').eq(3).attr('cy') == '89' && $('circle').eq(3).attr('r') == '5', 'The fourth <code>circle</code> element should have a <code>cx</code> value of 79, a <code>cy</code> value of 89, and an <code>r</code> value of 5.');
testString: assert($('circle').eq(3).attr('cx') == '79' && $('circle').eq(3).attr('cy') == '89' && $('circle').eq(3).attr('r') == '5');
- text: The fifth <code>circle</code> element should have a <code>cx</code> value of 420, a <code>cy</code> value of 280, and an <code>r</code> value of 5.
testString: assert($('circle').eq(4).attr('cx') == '420' && $('circle').eq(4).attr('cy') == '280' && $('circle').eq(4).attr('r') == '5', 'The fifth <code>circle</code> element should have a <code>cx</code> value of 420, a <code>cy</code> value of 280, and an <code>r</code> value of 5.');
testString: assert($('circle').eq(4).attr('cx') == '420' && $('circle').eq(4).attr('cy') == '280' && $('circle').eq(4).attr('r') == '5');
- text: The sixth <code>circle</code> element should have a <code>cx</code> value of 233, a <code>cy</code> value of 355, and an <code>r</code> value of 5.
testString: assert($('circle').eq(5).attr('cx') == '233' && $('circle').eq(5).attr('cy') == '355' && $('circle').eq(5).attr('r') == '5', 'The sixth <code>circle</code> element should have a <code>cx</code> value of 233, a <code>cy</code> value of 355, and an <code>r</code> value of 5.');
testString: assert($('circle').eq(5).attr('cx') == '233' && $('circle').eq(5).attr('cy') == '355' && $('circle').eq(5).attr('r') == '5');
- text: The seventh <code>circle</code> element should have a <code>cx</code> value of 333, a <code>cy</code> value of 404, and an <code>r</code> value of 5.
testString: assert($('circle').eq(6).attr('cx') == '333' && $('circle').eq(6).attr('cy') == '404' && $('circle').eq(6).attr('r') == '5', 'The seventh <code>circle</code> element should have a <code>cx</code> value of 333, a <code>cy</code> value of 404, and an <code>r</code> value of 5.');
testString: assert($('circle').eq(6).attr('cx') == '333' && $('circle').eq(6).attr('cy') == '404' && $('circle').eq(6).attr('r') == '5');
- text: The eighth <code>circle</code> element should have a <code>cx</code> value of 222, a <code>cy</code> value of 167, and an <code>r</code> value of 5.
testString: assert($('circle').eq(7).attr('cx') == '222' && $('circle').eq(7).attr('cy') == '167' && $('circle').eq(7).attr('r') == '5', 'The eighth <code>circle</code> element should have a <code>cx</code> value of 222, a <code>cy</code> value of 167, and an <code>r</code> value of 5.');
testString: assert($('circle').eq(7).attr('cx') == '222' && $('circle').eq(7).attr('cy') == '167' && $('circle').eq(7).attr('r') == '5');
- text: The ninth <code>circle</code> element should have a <code>cx</code> value of 78, a <code>cy</code> value of 180, and an <code>r</code> value of 5.
testString: assert($('circle').eq(8).attr('cx') == '78' && $('circle').eq(8).attr('cy') == '180' && $('circle').eq(8).attr('r') == '5', 'The ninth <code>circle</code> element should have a <code>cx</code> value of 78, a <code>cy</code> value of 180, and an <code>r</code> value of 5.');
testString: assert($('circle').eq(8).attr('cx') == '78' && $('circle').eq(8).attr('cy') == '180' && $('circle').eq(8).attr('r') == '5');
- text: The tenth <code>circle</code> element should have a <code>cx</code> value of 21, a <code>cy</code> value of 377, and an <code>r</code> value of 5.
testString: assert($('circle').eq(9).attr('cx') == '21' && $('circle').eq(9).attr('cy') == '377' && $('circle').eq(9).attr('r') == '5', 'The tenth <code>circle</code> element should have a <code>cx</code> value of 21, a <code>cy</code> value of 377, and an <code>r</code> value of 5.');
testString: assert($('circle').eq(9).attr('cx') == '21' && $('circle').eq(9).attr('cy') == '377' && $('circle').eq(9).attr('r') == '5');
```

@@ -37,11 +37,11 @@ The scatter plot now has an x-axis. Create a y-axis in a variable named <code>yA
```yml
tests:
- text: Your code should use the <code>axisLeft()</code> method with <code>yScale</code> passed as the argument.
testString: assert(code.match(/\.axisLeft\(yScale\)/g), 'Your code should use the <code>axisLeft()</code> method with <code>yScale</code> passed as the argument.');
testString: assert(code.match(/\.axisLeft\(yScale\)/g));
- text: The y-axis <code>g</code> element should have a <code>transform</code> attribute to translate the axis by (60, 0).
testString: assert($('g').eq(10).attr('transform').match(/translate\(60\s*?,\s*?0\)/g), 'The y-axis <code>g</code> element should have a <code>transform</code> attribute to translate the axis by (60, 0).');
testString: assert($('g').eq(10).attr('transform').match(/translate\(60\s*?,\s*?0\)/g));
- text: Your code should call the <code>yAxis</code>.
testString: assert(code.match(/\.call\(\s*yAxis\s*\)/g), 'Your code should call the <code>yAxis</code>.');
testString: assert(code.match(/\.call\(\s*yAxis\s*\)/g));
```

@@ -24,9 +24,9 @@ Add the <code>attr()</code> method to the code in the editor and put a class of
```yml
tests:
- text: Your <code>div</code> elements should have a class of <code>bar</code>.
testString: assert($('div').attr('class') == "bar", 'Your <code>div</code> elements should have a class of <code>bar</code>.');
testString: assert($('div').attr('class') == "bar");
- text: Your code should use the <code>attr()</code> method.
testString: assert(code.match(/\.attr/g), 'Your code should use the <code>attr()</code> method.');
testString: assert(code.match(/\.attr/g));
```

@@ -35,17 +35,17 @@ Use the <code>select</code> method to select the <code>body</code> tag in the do
```yml
tests:
- text: The <code>body</code> should have one <code>h1</code> element.
testString: assert($('body').children('h1').length == 1, 'The <code>body</code> should have one <code>h1</code> element.');
testString: assert($('body').children('h1').length == 1);
- text: The <code>h1</code> element should have the text "Learning D3" in it.
testString: assert($('h1').text() == "Learning D3", 'The <code>h1</code> element should have the text "Learning D3" in it.');
testString: assert($('h1').text() == "Learning D3");
- text: Your code should access the <code>d3</code> object.
testString: assert(code.match(/d3/g), 'Your code should access the <code>d3</code> object.');
testString: assert(code.match(/d3/g));
- text: Your code should use the <code>select</code> method.
testString: assert(code.match(/\.select/g), 'Your code should use the <code>select</code> method.');
testString: assert(code.match(/\.select/g));
- text: Your code should use the <code>append</code> method.
testString: assert(code.match(/\.append/g), 'Your code should use the <code>append</code> method.');
testString: assert(code.match(/\.append/g));
- text: Your code should use the <code>text</code> method.
testString: assert(code.match(/\.text/g), 'Your code should use the <code>text</code> method.');
testString: assert(code.match(/\.text/g));
```

@@ -22,9 +22,9 @@ Add the <code>style()</code> method to the code in the editor to make all the di
```yml
tests:
- text: Your <code>h2</code> elements should have a <code>font-family</code> of verdana.
testString: assert($('h2').css('font-family') == 'verdana', 'Your <code>h2</code> elements should have a <code>font-family</code> of verdana.');
testString: assert($('h2').css('font-family') == 'verdana');
- text: Your code should use the <code>style()</code> method.
testString: assert(code.match(/\.style/g), 'Your code should use the <code>style()</code> method.');
testString: assert(code.match(/\.style/g));
```

@@ -23,23 +23,23 @@ The code in the editor already binds the data to each new <code>text</code> elem
```yml
tests:
- text: The first <code>text</code> element should have a label of 12 and a <code>y</code> value of 61.
testString: assert($('text').eq(0).text() == '12' && $('text').eq(0).attr('y') == '61', 'The first <code>text</code> element should have a label of 12 and a <code>y</code> value of 61.');
testString: assert($('text').eq(0).text() == '12' && $('text').eq(0).attr('y') == '61');
- text: The second <code>text</code> element should have a label of 31 and a <code>y</code> value of 4.
testString: assert($('text').eq(1).text() == '31' && $('text').eq(1).attr('y') == '4', 'The second <code>text</code> element should have a label of 31 and a <code>y</code> value of 4.');
testString: assert($('text').eq(1).text() == '31' && $('text').eq(1).attr('y') == '4');
- text: The third <code>text</code> element should have a label of 22 and a <code>y</code> value of 31.
testString: assert($('text').eq(2).text() == '22' && $('text').eq(2).attr('y') == '31', 'The third <code>text</code> element should have a label of 22 and a <code>y</code> value of 31.');
testString: assert($('text').eq(2).text() == '22' && $('text').eq(2).attr('y') == '31');
- text: The fourth <code>text</code> element should have a label of 17 and a <code>y</code> value of 46.
testString: assert($('text').eq(3).text() == '17' && $('text').eq(3).attr('y') == '46', 'The fourth <code>text</code> element should have a label of 17 and a <code>y</code> value of 46.');
testString: assert($('text').eq(3).text() == '17' && $('text').eq(3).attr('y') == '46');
- text: The fifth <code>text</code> element should have a label of 25 and a <code>y</code> value of 22.
testString: assert($('text').eq(4).text() == '25' && $('text').eq(4).attr('y') == '22', 'The fifth <code>text</code> element should have a label of 25 and a <code>y</code> value of 22.');
testString: assert($('text').eq(4).text() == '25' && $('text').eq(4).attr('y') == '22');
- text: The sixth <code>text</code> element should have a label of 18 and a <code>y</code> value of 43.
testString: assert($('text').eq(5).text() == '18' && $('text').eq(5).attr('y') == '43', 'The sixth <code>text</code> element should have a label of 18 and a <code>y</code> value of 43.');
testString: assert($('text').eq(5).text() == '18' && $('text').eq(5).attr('y') == '43');
- text: The seventh <code>text</code> element should have a label of 29 and a <code>y</code> value of 10.
testString: assert($('text').eq(6).text() == '29' && $('text').eq(6).attr('y') == '10', 'The seventh <code>text</code> element should have a label of 29 and a <code>y</code> value of 10.');
testString: assert($('text').eq(6).text() == '29' && $('text').eq(6).attr('y') == '10');
- text: The eighth <code>text</code> element should have a label of 14 and a <code>y</code> value of 55.
testString: assert($('text').eq(7).text() == '14' && $('text').eq(7).attr('y') == '55', 'The eighth <code>text</code> element should have a label of 14 and a <code>y</code> value of 55.');
testString: assert($('text').eq(7).text() == '14' && $('text').eq(7).attr('y') == '55');
- text: The ninth <code>text</code> element should have a label of 9 and a <code>y</code> value of 70.
testString: assert($('text').eq(8).text() == '9' && $('text').eq(8).attr('y') == '70', 'The ninth <code>text</code> element should have a label of 9 and a <code>y</code> value of 70.');
testString: assert($('text').eq(8).text() == '9' && $('text').eq(8).attr('y') == '70');
```

0 comments on commit db80986

Please sign in to comment.
You can’t perform that action at this time.