Fixes #6624: Added delays to acceptance tests in order to make Selenium run more reliable

This commit is contained in:
Alexander Makarov 2014-12-26 23:18:52 +03:00
parent aef33fd969
commit 8bcb38960f
2 changed files with 9 additions and 0 deletions

View File

@ -11,6 +11,9 @@ $I->see('Contact', 'h1');
$I->amGoingTo('submit contact form with no data'); $I->amGoingTo('submit contact form with no data');
$contactPage->submit([]); $contactPage->submit([]);
if (method_exists($I, 'wait')) {
$I->wait(3); // only for selenium
}
$I->expectTo('see validations errors'); $I->expectTo('see validations errors');
$I->see('Contact', 'h1'); $I->see('Contact', 'h1');
$I->see('Name cannot be blank'); $I->see('Name cannot be blank');
@ -27,6 +30,9 @@ $contactPage->submit([
'body' => 'test content', 'body' => 'test content',
'verifyCode' => 'testme', 'verifyCode' => 'testme',
]); ]);
if (method_exists($I, 'wait')) {
$I->wait(3); // only for selenium
}
$I->expectTo('see that email adress is wrong'); $I->expectTo('see that email adress is wrong');
$I->dontSee('Name cannot be blank', '.help-inline'); $I->dontSee('Name cannot be blank', '.help-inline');
$I->see('Email is not a valid email address.'); $I->see('Email is not a valid email address.');

View File

@ -11,6 +11,9 @@ $I->see('Login', 'h1');
$I->amGoingTo('try to login with empty credentials'); $I->amGoingTo('try to login with empty credentials');
$loginPage->login('', ''); $loginPage->login('', '');
if (method_exists($I, 'wait')) {
$I->wait(3); // only for selenium
}
$I->expectTo('see validations errors'); $I->expectTo('see validations errors');
$I->see('Username cannot be blank.'); $I->see('Username cannot be blank.');
$I->see('Password cannot be blank.'); $I->see('Password cannot be blank.');