diff --git a/apps/advanced/tests/codeception/backend/acceptance/LoginCept.php b/apps/advanced/tests/codeception/backend/acceptance/LoginCept.php index bb6c65f80c..8ed1b54e19 100644 --- a/apps/advanced/tests/codeception/backend/acceptance/LoginCept.php +++ b/apps/advanced/tests/codeception/backend/acceptance/LoginCept.php @@ -10,6 +10,9 @@ $loginPage = LoginPage::openBy($I); $I->amGoingTo('submit login form with no data'); $loginPage->login('', ''); +if (method_exists($I, 'wait')) { + $I->wait(3); // only for selenium +} $I->expectTo('see validations errors'); $I->see('Username cannot be blank.', '.help-block'); $I->see('Password cannot be blank.', '.help-block'); @@ -17,11 +20,17 @@ $I->see('Password cannot be blank.', '.help-block'); $I->amGoingTo('try to login with wrong credentials'); $I->expectTo('see validations errors'); $loginPage->login('admin', 'wrong'); +if (method_exists($I, 'wait')) { + $I->wait(3); // only for selenium +} $I->expectTo('see validations errors'); $I->see('Incorrect username or password.', '.help-block'); $I->amGoingTo('try to login with correct credentials'); $loginPage->login('erau', 'password_0'); +if (method_exists($I, 'wait')) { + $I->wait(3); // only for selenium +} $I->expectTo('see that user is logged'); $I->seeLink('Logout (erau)'); $I->dontSeeLink('Login'); diff --git a/apps/advanced/tests/codeception/frontend/acceptance/ContactCept.php b/apps/advanced/tests/codeception/frontend/acceptance/ContactCept.php index c537fd4807..f589460e33 100644 --- a/apps/advanced/tests/codeception/frontend/acceptance/ContactCept.php +++ b/apps/advanced/tests/codeception/frontend/acceptance/ContactCept.php @@ -11,6 +11,9 @@ $I->see('Contact', 'h1'); $I->amGoingTo('submit contact form with no data'); $contactPage->submit([]); +if (method_exists($I, 'wait')) { + $I->wait(3); // only for selenium +} $I->expectTo('see validations errors'); $I->see('Contact', 'h1'); $I->see('Name cannot be blank', '.help-block'); @@ -27,6 +30,9 @@ $contactPage->submit([ 'body' => 'test content', 'verifyCode' => 'testme', ]); +if (method_exists($I, 'wait')) { + $I->wait(3); // only for selenium +} $I->expectTo('see that email adress is wrong'); $I->dontSee('Name cannot be blank', '.help-block'); $I->see('Email is not a valid email address.', '.help-block'); @@ -42,4 +48,7 @@ $contactPage->submit([ 'body' => 'test content', 'verifyCode' => 'testme', ]); +if (method_exists($I, 'wait')) { + $I->wait(3); // only for selenium +} $I->see('Thank you for contacting us. We will respond to you as soon as possible.'); diff --git a/apps/basic/tests/codeception/acceptance/ContactCept.php b/apps/basic/tests/codeception/acceptance/ContactCept.php index 98ba2ef12c..4e8ee80b4e 100644 --- a/apps/basic/tests/codeception/acceptance/ContactCept.php +++ b/apps/basic/tests/codeception/acceptance/ContactCept.php @@ -11,6 +11,9 @@ $I->see('Contact', 'h1'); $I->amGoingTo('submit contact form with no data'); $contactPage->submit([]); +if (method_exists($I, 'wait')) { + $I->wait(3); // only for selenium +} $I->expectTo('see validations errors'); $I->see('Contact', 'h1'); $I->see('Name cannot be blank'); @@ -27,6 +30,9 @@ $contactPage->submit([ 'body' => 'test content', 'verifyCode' => 'testme', ]); +if (method_exists($I, 'wait')) { + $I->wait(3); // only for selenium +} $I->expectTo('see that email adress is wrong'); $I->dontSee('Name cannot be blank', '.help-inline'); $I->see('Email is not a valid email address.'); diff --git a/apps/basic/tests/codeception/acceptance/LoginCept.php b/apps/basic/tests/codeception/acceptance/LoginCept.php index 4f022e1c28..7575caf58c 100644 --- a/apps/basic/tests/codeception/acceptance/LoginCept.php +++ b/apps/basic/tests/codeception/acceptance/LoginCept.php @@ -11,6 +11,9 @@ $I->see('Login', 'h1'); $I->amGoingTo('try to login with empty credentials'); $loginPage->login('', ''); +if (method_exists($I, 'wait')) { + $I->wait(3); // only for selenium +} $I->expectTo('see validations errors'); $I->see('Username cannot be blank.'); $I->see('Password cannot be blank.');