Travis test fixes.

This commit is contained in:
buddh4 2017-03-26 17:18:03 +02:00
parent 83aa1ae09a
commit 13a5cd5368
3 changed files with 12 additions and 11 deletions

View File

@ -12,6 +12,7 @@ class PasswordRecoveryCest
$I->amGoingTo('request a recovery mail for an invalid user email and wrong captcha'); $I->amGoingTo('request a recovery mail for an invalid user email and wrong captcha');
LoginPage::openBy($I); LoginPage::openBy($I);
$I->wait(3);
$I->waitForText('Create a new one.'); $I->waitForText('Create a new one.');
$I->jsClick('#password-recovery-link'); $I->jsClick('#password-recovery-link');
$I->waitForText('Password recovery'); $I->waitForText('Password recovery');

View File

@ -8,7 +8,7 @@ use Codeception\Specify;
use humhub\modules\user\models\User; use humhub\modules\user\models\User;
use humhub\modules\user\models\Follow; use humhub\modules\user\models\Follow;
class FollowTest extends HumHubDbTestCase class ApprovalTest extends HumHubDbTestCase
{ {
use Specify; use Specify;

View File

@ -72,7 +72,7 @@ class AcceptanceTester extends \Codeception\Actor
$this->jsClick('#post_submit_button'); $this->jsClick('#post_submit_button');
$this->waitForText($text, 30, '.wall-entry'); $this->waitForText($text, 30, '.wall-entry');
} }
public function amOnDashboard() public function amOnDashboard()
{ {
tests\codeception\_pages\DashboardPage::openBy($this); tests\codeception\_pages\DashboardPage::openBy($this);
@ -82,7 +82,7 @@ class AcceptanceTester extends \Codeception\Actor
{ {
$this->waitForElementVisible('#status-bar .success', 30); $this->waitForElementVisible('#status-bar .success', 30);
$this->waitForElementVisible('#status-bar .status-bar-close'); $this->waitForElementVisible('#status-bar .status-bar-close');
if ($text) { if ($text) {
$this->see($text, '#status-bar'); $this->see($text, '#status-bar');
} }
@ -95,7 +95,7 @@ class AcceptanceTester extends \Codeception\Actor
{ {
$this->waitForElementVisible('#status-bar .warning', 20); $this->waitForElementVisible('#status-bar .warning', 20);
$this->waitForElementVisible('#status-bar .status-bar-close'); $this->waitForElementVisible('#status-bar .status-bar-close');
if ($text) { if ($text) {
$this->see($text, '#status-bar'); $this->see($text, '#status-bar');
} }
@ -109,7 +109,7 @@ class AcceptanceTester extends \Codeception\Actor
{ {
$this->waitForElementVisible('#status-bar .error', 20); $this->waitForElementVisible('#status-bar .error', 20);
$this->waitForElementVisible('#status-bar .status-bar-close'); $this->waitForElementVisible('#status-bar .status-bar-close');
if ($text) { if ($text) {
$this->see($text, '#status-bar'); $this->see($text, '#status-bar');
} }
@ -122,7 +122,7 @@ class AcceptanceTester extends \Codeception\Actor
{ {
$this->waitForElementVisible('#status-bar .info', 20); $this->waitForElementVisible('#status-bar .info', 20);
$this->waitForElementVisible('#status-bar .status-bar-close'); $this->waitForElementVisible('#status-bar .status-bar-close');
if ($text) { if ($text) {
$this->see($text, '#status-bar'); $this->see($text, '#status-bar');
} }
@ -161,7 +161,7 @@ class AcceptanceTester extends \Codeception\Actor
$this->jsClick('#account-dropdown-link'); $this->jsClick('#account-dropdown-link');
$this->wait(2); $this->wait(2);
} }
public function amOnDirectory() public function amOnDirectory()
{ {
return tests\codeception\_pages\DirectoryPage::openBy($this); return tests\codeception\_pages\DirectoryPage::openBy($this);
@ -194,7 +194,7 @@ class AcceptanceTester extends \Codeception\Actor
$this->waitForText($text, 5, '.notifications'); $this->waitForText($text, 5, '.notifications');
$this->click('.notifications'); $this->click('.notifications');
} }
/** /**
* Selects $userName for a given userPicker. Note this implementation will * Selects $userName for a given userPicker. Note this implementation will
* just take the first result found for the given username. * just take the first result found for the given username.
@ -204,7 +204,7 @@ class AcceptanceTester extends \Codeception\Actor
*/ */
public function selectUserFromPicker($selector, $userName) public function selectUserFromPicker($selector, $userName)
{ {
$select2Input = $selector.' ~ span input'; $select2Input = $selector . ' ~ span input';
$this->fillField($select2Input, $userName); $this->fillField($select2Input, $userName);
$this->waitForElementVisible('.select2-container--open'); $this->waitForElementVisible('.select2-container--open');
$this->wait(5); $this->wait(5);
@ -219,7 +219,7 @@ class AcceptanceTester extends \Codeception\Actor
$this->dontSee($text); $this->dontSee($text);
$this->click('.notifications'); $this->click('.notifications');
} }
public function scrollTop() public function scrollTop()
{ {
$this->executeJS('window.scrollTo(0,0);'); $this->executeJS('window.scrollTo(0,0);');
@ -228,7 +228,7 @@ class AcceptanceTester extends \Codeception\Actor
public function jsClick($selector) public function jsClick($selector)
{ {
$this->executeJS("$('". $selector ."').click();"); $this->executeJS("$('" . $selector . "')[0].click();");
} }
public function jsFillField($selector, $value) public function jsFillField($selector, $value)