-
-
Save macikokoro/3ecb77fb4974e27c31f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
casper.test.begin("Testing if node express app", 2, function suite(test) { | |
casper.start('http://localhost:3000', function() { | |
test.assertHttpStatus(200); | |
}); | |
casper.then(function() { | |
if (this.fetchText('.daysLeft' > 0)) { | |
this.echo("more than 0 days left"); | |
} | |
this.echo("Days left: " + this.fetchText('.daysLeft')); | |
}); | |
casper.then(function() { | |
test.assertTitle("Class Days Remaining", 'title is ok'); | |
}); | |
casper.run(function() { | |
test.done(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment