瀏覽代碼

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

Alexander Makarov 11 年之前
父節點
當前提交
8bcb38960f
共有 2 個文件被更改,包括 9 次插入0 次删除
  1. 6 0
      tests/codeception/acceptance/ContactCept.php
  2. 3 0
      tests/codeception/acceptance/LoginCept.php

+ 6 - 0
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.');

+ 3 - 0
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.');