Ghost/core/test/functional/frontend/home_test.js
Hannah Wolfe cfe272e175 Functional tests for home and post page
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
2013-11-01 11:33:50 +00:00

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');
});
});