0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00

Merge pull request #4718 from jaswilli/about-tests

Adjust about page tests
This commit is contained in:
Hannah Wolfe 2014-12-26 11:42:29 +00:00
commit 555bf97a9d

View file

@ -3,7 +3,7 @@
/*globals CasperTest, casper */ /*globals CasperTest, casper */
CasperTest.begin('About screen is correct', 10, function suite(test) { CasperTest.begin('About screen is correct', 9, function suite(test) {
casper.thenOpenAndWaitForPageLoad('settings.about', function testTitleAndUrl() { casper.thenOpenAndWaitForPageLoad('settings.about', function testTitleAndUrl() {
test.assertTitle('Settings - About - Test Blog', 'Ghost admin has incorrect title'); test.assertTitle('Settings - About - Test Blog', 'Ghost admin has incorrect title');
test.assertUrlMatch(/ghost\/settings\/about\/$/, 'Landed on the correct URL'); test.assertUrlMatch(/ghost\/settings\/about\/$/, 'Landed on the correct URL');
@ -19,11 +19,9 @@ CasperTest.begin('About screen is correct', 10, function suite(test) {
test.assertMatch(databaseTypeText, /sqlite3|mysql|pg/gi, 'Database is an allowed type'); test.assertMatch(databaseTypeText, /sqlite3|mysql|pg/gi, 'Database is an allowed type');
}); });
casper.then(function testContributors() { casper.waitForSelector('.top-contributors li', function testContributors() {
var firstContribImageSrc = casper.getElementAttribute('.top-contributors li:nth-child(1) a img', 'src'); var firstContribImageSrc = casper.getElementAttribute('.top-contributors li:nth-child(1) a img', 'src');
test.assertElementCount('.top-contributors li', 20, '20 contributors are shown');
// Check first contributor image tag is on the page // Check first contributor image tag is on the page
test.assertExist('.top-contributors li:nth-child(1) img', 'First contributor image is in place'); test.assertExist('.top-contributors li:nth-child(1) img', 'First contributor image is in place');