Skip to content

Commit

Permalink
Working on tests fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PSkierniewski committed Mar 24, 2016
1 parent 1b54e1e commit e5082c4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/_support/FunctionalTester.php
Expand Up @@ -29,6 +29,8 @@ class FunctionalTester extends \Codeception\Actor {

use _generated\FunctionalTesterActions;

protected $baseUrl = 'http://localhost/';

/**
* @var UserRepository
*/
Expand Down Expand Up @@ -67,7 +69,7 @@ public function __construct(\Codeception\Scenario $scenario)
public function login($email, $password)
{
$I = $this;
$I->amOnPage('/en/login');
$I->amOnPage($this->baseUrl . 'en/login');
$I->fillField('email', $email);
$I->fillField('password', $password);
$I->click('button[type=submit]');
Expand All @@ -81,7 +83,7 @@ public function login($email, $password)
public function loginAsAdmin()
{
$I = $this;
$I->amOnPage('/en/login');
$I->amOnPage($this->baseUrl . 'en/login');
$I->fillField('email', 'admin@gzero.pl');
$I->fillField('password', 'test');
$I->click('button[type=submit]');
Expand All @@ -94,7 +96,7 @@ public function loginAsAdmin()
public function logout()
{
$I = $this;
$I->amOnPage('/en/logout');
$I->amOnPage($this->baseUrl . 'en/logout');
$I->canSeeCurrentUrlEquals('/en');
$I->dontSeeAuthentication();
}
Expand Down
1 change: 1 addition & 0 deletions tests/functional/AdminBlockCest.php
Expand Up @@ -9,6 +9,7 @@ class AdminBlockCest {

public function _before(FunctionalTester $I)
{
$I->logout();
}

public function _after(FunctionalTester $I)
Expand Down
1 change: 1 addition & 0 deletions tests/functional/AdminContentCest.php
Expand Up @@ -5,6 +5,7 @@ class AdminContentCest {

public function _before(FunctionalTester $I)
{
$I->logout();
}

public function _after(FunctionalTester $I)
Expand Down

0 comments on commit e5082c4

Please sign in to comment.