mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-16 04:08:34 +03:00
cfe272e175
closes #1373 - Note that the tests fail if you run them pre #1363, thus future proofing us from this happening again. - Added submodule handling to travis - Added a new test for each of the home and post pages
22 lines
955 B
JavaScript
22 lines
955 B
JavaScript
/**
|
|
* Tests the homepage
|
|
*/
|
|
|
|
/*globals CasperTest, casper, __utils__, url, testPost, falseUser, email */
|
|
CasperTest.begin('Home page loads', 3, function suite(test) {
|
|
casper.start(url, function then(response) {
|
|
test.assertTitle('Ghost', 'The homepage should have a title and it should be Ghost');
|
|
test.assertExists('.content .post', 'There is at least one post on this page');
|
|
test.assertSelectorHasText('.poweredby', 'Proudly published with Ghost');
|
|
});
|
|
}, true);
|
|
|
|
CasperTest.begin('Test helpers on homepage', 3, function suite(test) {
|
|
casper.start(url, function then(response) {
|
|
// body class
|
|
test.assertExists('body.home-template', 'body_class outputs correct home-template class');
|
|
// post class
|
|
test.assertExists('article.post', 'post_class outputs correct post class');
|
|
test.assertExists('article.tag-getting-started', 'post_class outputs correct tag class');
|
|
});
|
|
}); |