Refactored codeception/BasePage.
This commit is contained in:
parent
3c07648ba2
commit
0acc59170f
@ -6,5 +6,5 @@ use yii\codeception\BasePage;
|
||||
|
||||
class AboutPage extends BasePage
|
||||
{
|
||||
public static $URL = '?r=site/about';
|
||||
}
|
||||
public $route = 'site/about';
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ use yii\codeception\BasePage;
|
||||
|
||||
class ContactPage extends BasePage
|
||||
{
|
||||
public static $URL = '?r=site/contact';
|
||||
public $route = 'site/contact';
|
||||
|
||||
/**
|
||||
* contact form name text field locator
|
||||
|
@ -6,7 +6,7 @@ use yii\codeception\BasePage;
|
||||
|
||||
class LoginPage extends BasePage
|
||||
{
|
||||
public static $URL = '?r=site/login';
|
||||
public $route = 'site/login';
|
||||
|
||||
/**
|
||||
* login form username text field locator
|
||||
|
@ -4,5 +4,5 @@ use tests\_pages\AboutPage;
|
||||
|
||||
$I = new WebGuy($scenario);
|
||||
$I->wantTo('ensure that about works');
|
||||
$I->amOnPage(AboutPage::$URL);
|
||||
AboutPage::openBy($I);
|
||||
$I->see('About', 'h1');
|
||||
|
@ -4,9 +4,9 @@ use tests\_pages\ContactPage;
|
||||
|
||||
$I = new WebGuy($scenario);
|
||||
$I->wantTo('ensure that contact works');
|
||||
$contactPage = ContactPage::of($I);
|
||||
|
||||
$I->amOnPage(ContactPage::$URL);
|
||||
$contactPage = ContactPage::openBy($I);
|
||||
|
||||
$I->see('Contact', 'h1');
|
||||
|
||||
$I->amGoingTo('submit contact form with no data');
|
||||
|
@ -4,9 +4,9 @@ use tests\_pages\LoginPage;
|
||||
|
||||
$I = new WebGuy($scenario);
|
||||
$I->wantTo('ensure that login works');
|
||||
$loginPage = LoginPage::of($I);
|
||||
|
||||
$I->amOnPage(LoginPage::$URL);
|
||||
$loginPage = LoginPage::openBy($I);
|
||||
|
||||
$I->see('Login', 'h1');
|
||||
|
||||
$I->amGoingTo('try to login with empty credentials');
|
||||
|
@ -4,5 +4,5 @@ use tests\_pages\AboutPage;
|
||||
|
||||
$I = new TestGuy($scenario);
|
||||
$I->wantTo('ensure that about works');
|
||||
$I->amOnPage(AboutPage::$URL);
|
||||
AboutPage::openBy($I);
|
||||
$I->see('About', 'h1');
|
||||
|
@ -4,9 +4,9 @@ use tests\functional\_pages\ContactPage;
|
||||
|
||||
$I = new TestGuy($scenario);
|
||||
$I->wantTo('ensure that contact works');
|
||||
$contactPage = ContactPage::of($I);
|
||||
|
||||
$I->amOnPage(ContactPage::$URL);
|
||||
$contactPage = ContactPage::openBy($I);
|
||||
|
||||
$I->see('Contact', 'h1');
|
||||
|
||||
$I->amGoingTo('submit contact form with no data');
|
||||
|
@ -4,9 +4,9 @@ use tests\functional\_pages\LoginPage;
|
||||
|
||||
$I = new TestGuy($scenario);
|
||||
$I->wantTo('ensure that login works');
|
||||
$loginPage = LoginPage::of($I);
|
||||
|
||||
$I->amOnPage(LoginPage::$URL);
|
||||
$loginPage = LoginPage::openBy($I);
|
||||
|
||||
$I->see('Login', 'h1');
|
||||
|
||||
$I->amGoingTo('try to login with empty credentials');
|
||||
|
Loading…
x
Reference in New Issue
Block a user