mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 18:52:05 +03:00
f70f99b5cf
closes #3056 - Remove clientold - Remove clientold tests - Cleanup old admin helpers - Remove old routes from admin and controllers from admin controller - Comment out / remove old and broken tests - Cleanup Gruntfile.js, bower.js, package.json etc Still TODO: - cleanup / add removed tests - do we still need countable?
38 lines
1.3 KiB
JavaScript
38 lines
1.3 KiB
JavaScript
// # Signup Test
|
|
// Test that signup works correctly
|
|
|
|
/*global CasperTest, casper, email */
|
|
|
|
|
|
CasperTest.begin('Ghost signup fails properly', 0, function suite(test) {
|
|
/*
|
|
casper.thenOpenAndWaitForPageLoad('signup', function then() {
|
|
test.assertUrlMatch(/ghost\/signup\/$/, 'Landed on the correct URL');
|
|
});
|
|
|
|
casper.then(function signupWithShortPassword() {
|
|
casper.fillAndSave('#signup', {email: email, password: 'test'});
|
|
});
|
|
|
|
// should now throw a short password error
|
|
casper.waitForSelector('.notification-error', function onSuccess() {
|
|
test.assert(true, 'Got error notification');
|
|
test.assertSelectorDoesntHaveText('.notification-error', '[object Object]');
|
|
}, function onTimeout() {
|
|
test.assert(false, 'No error notification :(');
|
|
});
|
|
|
|
casper.then(function signupWithLongPassword() {
|
|
casper.fillAndSave('#signup', {email: email, password: 'testing1234'});
|
|
});
|
|
|
|
// should now throw a 1 user only error
|
|
casper.waitForSelector('.notification-error', function onSuccess() {
|
|
test.assert(true, 'Got error notification');
|
|
test.assertSelectorDoesntHaveText('.notification-error', '[object Object]');
|
|
}, function onTimeout() {
|
|
test.assert(false, 'No error notification :(');
|
|
});
|
|
*/
|
|
}, true);
|