start adding additional tests to html waypoints to make them more robust
This commit is contained in:
@@ -625,8 +625,8 @@ module.exports = {
|
|||||||
text: "Anyone want to pair with @" + userName + " on " + challenge +
|
text: "Anyone want to pair with @" + userName + " on " + challenge +
|
||||||
"?\nMake sure you install Screen Hero here:" +
|
"?\nMake sure you install Screen Hero here:" +
|
||||||
"http://freecodecamp.com/field-guide/how-do-i-install-screenhero\n" +
|
"http://freecodecamp.com/field-guide/how-do-i-install-screenhero\n" +
|
||||||
"Then start your pair program session with *" + userName +
|
"Then start your pair program session with *@" + userName +
|
||||||
"* by typing \"/hero @" + userName + "\" into Slack.\n And *"+ userName +
|
"* by typing \"/hero @" + userName + "\" into Slack.\n And *@"+ userName +
|
||||||
"*, be sure to launch Screen Hero, then keep coding. " +
|
"*, be sure to launch Screen Hero, then keep coding. " +
|
||||||
"Another camper may pair with you soon.",
|
"Another camper may pair with you soon.",
|
||||||
channel: '#letspair',
|
channel: '#letspair',
|
||||||
|
@@ -44,7 +44,8 @@
|
|||||||
"<code>h2</code> elements are slightly smaller than <code>h1</code> elements. There are also <code>h3</code>, <code>h4</code>, <code>h5</code> and <code>h6</code> elements."
|
"<code>h2</code> elements are slightly smaller than <code>h1</code> elements. There are also <code>h3</code>, <code>h4</code>, <code>h5</code> and <code>h6</code> elements."
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert(($('h2').length > 0), 'Create an <code>h2</code> elements.')",
|
"assert(($('h2').length > 0), 'Create an <code>h2</code> element.')",
|
||||||
|
"assert(new RegExp('</h2>', 'gi').test(editor), 'Be sure to complete your h2 element with a closing tag.');",
|
||||||
"assert.isTrue((/cat(\\s)?photo(\\s)?app/gi).test($('h2').text()), 'Your h2 element should have the text \"CatPhotoApp\"')",
|
"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((/hello(\\s)+world/gi).test($('h1').text()), 'Your h1 element should have the text \"Hello World\"')"
|
||||||
],
|
],
|
||||||
@@ -74,7 +75,8 @@
|
|||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert(($('p').length > 0), 'Create a paragraph element.')",
|
"assert(($('p').length > 0), 'Create a paragraph element.')",
|
||||||
"assert.isTrue((/hello(\\s)+paragraph/gi).test($('p').text()), 'Your paragraph element should have the text \"Hello Paragraph\"')"
|
"assert.isTrue((/hello(\\s)+paragraph/gi).test($('p').text()), 'Your paragraph element should have the text \"Hello Paragraph\"')",
|
||||||
|
"assert(new RegExp('</p>', 'gi').test(editor), 'Be sure to complete your paragraph element with a closing tag.');"
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"<h1>Hello World</h1>",
|
"<h1>Hello World</h1>",
|
||||||
@@ -1573,10 +1575,11 @@
|
|||||||
"description": [
|
"description": [
|
||||||
"Add a submit button to your form field with type <code>submit</code> and a test value of \"Submit\".",
|
"Add a submit button to your form field with type <code>submit</code> and a test value of \"Submit\".",
|
||||||
"Let's add a submit button to your form. Clicking this button will send the data from your form to the URL you specified with your form's <code>action</code> attribute.",
|
"Let's add a submit button to your form. Clicking this button will send the data from your form to the URL you specified with your form's <code>action</code> attribute.",
|
||||||
"Here's an example submit button: <code><button type='submit'>this button submits the form</button><code>"
|
"Here's an example submit button: <code><button type='submit'>this button submits the form</button></code>"
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert(new RegExp('<button type=.submit.>Submit</button>', 'gi').test(editor), 'Make sure you have completely declared your button!');"
|
"assert(new RegExp('<button>', 'gi').test(editor), 'Your form should have a button inside it.');",
|
||||||
|
"assert(new RegExp('</button>', 'gi').test(editor), 'Be sure to complete your button element with a closing tag.');"
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>",
|
"<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>",
|
||||||
|
Reference in New Issue
Block a user