mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Updating tests
This commit is contained in:
parent
4b40bb5aab
commit
5ae36b00c9
2 changed files with 9 additions and 3 deletions
|
@ -20,7 +20,7 @@ casper.test.begin('Ensure a User is Registered', 2, function suite(test) {
|
|||
casper.waitFor(function checkOpaque() {
|
||||
return this.evaluate(function () {
|
||||
var loginBox = document.querySelector('.login-box');
|
||||
return window.getComputedStyle(loginBox).getPropertyValue('display') === "block"
|
||||
return window.getComputedStyle(loginBox).getPropertyValue('display') === "table"
|
||||
&& window.getComputedStyle(loginBox).getPropertyValue('opacity') === "1";
|
||||
});
|
||||
}, function then() {
|
||||
|
@ -90,11 +90,13 @@ casper.test.begin("Can't spam it", 4, function suite(test) {
|
|||
return this.evaluate(function () {
|
||||
var loginBox = document.querySelector('.login-box');
|
||||
|
||||
return window.getComputedStyle(loginBox).getPropertyValue('display') === "block"
|
||||
return window.getComputedStyle(loginBox).getPropertyValue('display') === "table"
|
||||
&& window.getComputedStyle(loginBox).getPropertyValue('opacity') === "1";
|
||||
});
|
||||
}, function then() {
|
||||
this.fill("#login", falseUser, true);
|
||||
}, function onTimeout() {
|
||||
test.fail('Sign in form didn\'t fade in.');
|
||||
});
|
||||
|
||||
casper.wait(200, function doneWait() {
|
||||
|
@ -109,6 +111,10 @@ casper.test.begin("Can't spam it", 4, function suite(test) {
|
|||
test.assert(false, 'Spamming the login did not result in an error notification');
|
||||
});
|
||||
|
||||
// This test causes the spam notification
|
||||
// add a wait to ensure future tests don't get tripped up by this.
|
||||
casper.wait(1000);
|
||||
|
||||
casper.run(function () {
|
||||
test.done();
|
||||
});
|
||||
|
|
|
@ -43,7 +43,7 @@ casper.test.begin("Can't spam signin", 3, function suite(test) {
|
|||
casper.waitFor(function checkOpaque() {
|
||||
return this.evaluate(function () {
|
||||
var loginBox = document.querySelector('.login-box');
|
||||
return window.getComputedStyle(loginBox).getPropertyValue('display') === "block"
|
||||
return window.getComputedStyle(loginBox).getPropertyValue('display') === "table"
|
||||
&& window.getComputedStyle(loginBox).getPropertyValue('opacity') === "1";
|
||||
});
|
||||
}, function then() {
|
||||
|
|
Loading…
Add table
Reference in a new issue