diff --git a/tests/_pages/AboutPage.php b/tests/_pages/AboutPage.php index ed5eb1b..5f9021f 100644 --- a/tests/_pages/AboutPage.php +++ b/tests/_pages/AboutPage.php @@ -6,5 +6,5 @@ use yii\codeception\BasePage; class AboutPage extends BasePage { - public static $URL = '?r=site/about'; -} \ No newline at end of file + public $route = 'site/about'; +} diff --git a/tests/_pages/ContactPage.php b/tests/_pages/ContactPage.php index 8149436..4fd6fa8 100644 --- a/tests/_pages/ContactPage.php +++ b/tests/_pages/ContactPage.php @@ -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 diff --git a/tests/_pages/LoginPage.php b/tests/_pages/LoginPage.php index 74725d1..8493d51 100644 --- a/tests/_pages/LoginPage.php +++ b/tests/_pages/LoginPage.php @@ -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 diff --git a/tests/acceptance/AboutCept.php b/tests/acceptance/AboutCept.php index b6be2f3..deecee7 100644 --- a/tests/acceptance/AboutCept.php +++ b/tests/acceptance/AboutCept.php @@ -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'); diff --git a/tests/acceptance/ContactCept.php b/tests/acceptance/ContactCept.php index 107d12d..25f5735 100644 --- a/tests/acceptance/ContactCept.php +++ b/tests/acceptance/ContactCept.php @@ -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'); diff --git a/tests/acceptance/LoginCept.php b/tests/acceptance/LoginCept.php index b6ce5f9..5d6a387 100644 --- a/tests/acceptance/LoginCept.php +++ b/tests/acceptance/LoginCept.php @@ -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'); diff --git a/tests/functional/AboutCept.php b/tests/functional/AboutCept.php index 419b3fe..1875c2e 100644 --- a/tests/functional/AboutCept.php +++ b/tests/functional/AboutCept.php @@ -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'); diff --git a/tests/functional/ContactCept.php b/tests/functional/ContactCept.php index 9c7cab3..ddc7ca6 100644 --- a/tests/functional/ContactCept.php +++ b/tests/functional/ContactCept.php @@ -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'); diff --git a/tests/functional/LoginCept.php b/tests/functional/LoginCept.php index 7a76e18..770b823 100644 --- a/tests/functional/LoginCept.php +++ b/tests/functional/LoginCept.php @@ -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');