write tests for first 5 jquery challenges
This commit is contained in:
@ -19,5 +19,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 250);
|
}, 10);
|
||||||
})();
|
})();
|
||||||
|
@ -53,7 +53,8 @@
|
|||||||
"Make all <code>img</code> elements bounce $('img').addClass('animated bounce')"
|
"Make all <code>img</code> elements bounce $('img').addClass('animated bounce')"
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"expect($('img'), 'Make sure you add the animated bounce class').to.have.class('animated bounce')"
|
"assert($('img').hasClass('animated') && $('img').hasClass('bounce'), 'Use the jQuery <code>addClass()</code> function to give the classes \"animated\" and \"bounce\" to your <code>img</code> element.')",
|
||||||
|
"assert(!editor.match(/class.*animated/g), 'Only use jQuery to add these classes to the element.')"
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"fccss",
|
"fccss",
|
||||||
@ -98,13 +99,13 @@
|
|||||||
|
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
|
"assert($('.btn').hasClass('animated') && $('.btn').hasClass('shake'), 'Use the jQuery <code>addClass()</code> function to give the classes \"animated\" and \"shake\" to all your elements with the class \"btn\".')",
|
||||||
|
"assert(!editor.match(/class.*animated/g), 'Only use jQuery to add these classes to the element.')"
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"fccss",
|
"fccss",
|
||||||
" $(document).ready(function() {",
|
" $(document).ready(function() {",
|
||||||
" $('img').addClass('animated bounce');",
|
" $('img').addClass('animated bounce');",
|
||||||
" $('.btn').addClass('animated shake');",
|
|
||||||
" });",
|
" });",
|
||||||
"fcces",
|
"fcces",
|
||||||
"<br>",
|
"<br>",
|
||||||
@ -144,7 +145,7 @@
|
|||||||
|
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert($('form').attr('id') === 'cat-photo-form', 'Add an ID <code>script</code> element has a closing tag.')"
|
"assert($('form').attr('id') === 'cat-photo-form', 'Add the ID of \"cat-photo-form\" to your <code>form</code> element.')"
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"fccss",
|
"fccss",
|
||||||
@ -190,7 +191,8 @@
|
|||||||
|
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
|
"assert($('#cat-photo-form') && $('#cat-photo-form').hasClass('animated') && $('#cat-photo-form').hasClass('pulse'), 'Select the element with the <code>id</code> of \"cat-photo-form\" and use the jQuery <code>addClass()</code> function to give it the classes of \"animated\" and \"pulse\".')",
|
||||||
|
"assert(!editor.match(/class.*animated/g), 'Only use jQuery to add these classes to the element.')"
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"fccss",
|
"fccss",
|
||||||
|
@ -28,10 +28,12 @@ block content
|
|||||||
h4.text-center.negative-10= name
|
h4.text-center.negative-10= name
|
||||||
.bonfire-instructions
|
.bonfire-instructions
|
||||||
for sentence in details
|
for sentence in details
|
||||||
p.wrappable.!= sentence
|
p.wrappable.negative-10!= sentence
|
||||||
.negative-bottom-margin-30
|
.negative-bottom-margin-30
|
||||||
if (user)
|
if (user)
|
||||||
a.btn.btn-primary.btn-sm.btn-block.negative-10#next-courseware-button Go to my next challenge (ctrl + enter)
|
label.btn.btn-primary.btn-block.negative-10#next-courseware-button
|
||||||
|
.ion-checkmark-circled
|
||||||
|
| Go to my next challenge (ctrl + enter)
|
||||||
|
|
||||||
if (user.sentSlackInvite)
|
if (user.sentSlackInvite)
|
||||||
.button-spacer
|
.button-spacer
|
||||||
@ -46,7 +48,7 @@ block content
|
|||||||
script.
|
script.
|
||||||
var userLoggedIn = true;
|
var userLoggedIn = true;
|
||||||
else
|
else
|
||||||
a.btn.signup-btn.btn-block.btn-sm.btn-block.negative-15(href='/login') Sign in so you can save your progress
|
a.btn.signup-btn.btn-block.btn-block.negative-15(href='/login') Sign in so you can save your progress
|
||||||
script.
|
script.
|
||||||
var userLoggedIn = false;
|
var userLoggedIn = false;
|
||||||
.button-spacer
|
.button-spacer
|
||||||
|
Reference in New Issue
Block a user