From 6ddf0c253c920019c1b7bbcd69235beceedb91a5 Mon Sep 17 00:00:00 2001 From: Prital Patel Date: Mon, 27 Jun 2016 16:18:09 +0530 Subject: [PATCH] Fix the issue_#30 --- .../Page/Acceptance/Administrator/UserAclPage.php | 11 +++++++++++ .../Acceptance/Administrator/UserGroupPage.php | 12 ++++++++++++ .../Acceptance/Administrator/UserManagerPage.php | 5 ----- .../Step/Acceptance/Administrator/User.php | 14 ++++++++------ 4 files changed, 31 insertions(+), 11 deletions(-) create mode 100644 tests/_support/Page/Acceptance/Administrator/UserAclPage.php create mode 100644 tests/_support/Page/Acceptance/Administrator/UserGroupPage.php diff --git a/tests/_support/Page/Acceptance/Administrator/UserAclPage.php b/tests/_support/Page/Acceptance/Administrator/UserAclPage.php new file mode 100644 index 0000000000000..d97299fc00adc --- /dev/null +++ b/tests/_support/Page/Acceptance/Administrator/UserAclPage.php @@ -0,0 +1,11 @@ + 'jform_title']; public static $pageURL = "administrator/index.php?option=com_users&view=users"; - - public static $groupPageURL = "administrator/index.php?option=com_users&view=groups"; - - public static $aclPageURL = "administrator/index.php?option=com_users&view=levels"; - } diff --git a/tests/_support/Step/Acceptance/Administrator/User.php b/tests/_support/Step/Acceptance/Administrator/User.php index b089774d1bef3..03afff5140c46 100644 --- a/tests/_support/Step/Acceptance/Administrator/User.php +++ b/tests/_support/Step/Acceptance/Administrator/User.php @@ -3,6 +3,8 @@ use Page\Acceptance\Administrator\AdminPage; use Page\Acceptance\Administrator\LoginPage; +use Page\Acceptance\Administrator\UserAclPage; +use Page\Acceptance\Administrator\UserGroupPage; use Page\Acceptance\Administrator\UserManagerPage; class User extends \AcceptanceTester @@ -264,7 +266,7 @@ public function iSeeTheAlertError($error) public function thereIsAAddNewGroupLink() { $I = $this; - $I->amOnPage(UserManagerPage::$groupPageURL); + $I->amOnPage(UserGroupPage::$groupPageURL); $I->clickToolbarButton('New'); } @@ -302,7 +304,7 @@ public function iShouldSeeTheMessage($message) public function iSearchAndSelectTheGroupWithName($GroupTitle) { $I = $this; - $I->amOnPage(UserManagerPage::$groupPageURL); + $I->amOnPage(UserGroupPage::$groupPageURL); $I->fillField(UserManagerPage::$filterSearch, $GroupTitle); $I->click(UserManagerPage::$iconSearch); $I->checkAllResults(); @@ -324,7 +326,7 @@ public function iSetGroupTitleAsA($GroupTitle) public function iDeleteTheGroup($GroupTitle) { $I = $this; - $I->amOnPage(UserManagerPage::$groupPageURL); + $I->amOnPage(UserGroupPage::$groupPageURL); $I->fillField(UserManagerPage::$filterSearch, $GroupTitle); $I->click(UserManagerPage::$iconSearch); $I->checkAllResults(); @@ -348,7 +350,7 @@ public function iDeleteUserGroup($message) public function thereIsAAddViewingAccessLevelLink() { $I = $this; - $I->amOnPage(UserManagerPage::$aclPageURL); + $I->amOnPage(UserAclPage::$aclPageURL); $I->clickToolbarButton('New'); } @@ -387,7 +389,7 @@ public function iShouldBeSeeTheMessage($message) public function iSearchAndSelectTheAccessLevelWithName($LevelTitle) { $I = $this; - $I->amOnPage(UserManagerPage::$aclPageURL); + $I->amOnPage(UserAclPage::$aclPageURL); $I->fillField(UserManagerPage::$filterSearch, $LevelTitle); $I->click(UserManagerPage::$iconSearch); $I->checkAllResults(); @@ -418,7 +420,7 @@ public function iSaveAccessLevel() public function iDeleteTheAccessLeVel($LevelTitle) { $I = $this; - $I->amOnPage(UserManagerPage::$aclPageURL); + $I->amOnPage(UserAclPage::$aclPageURL); $I->fillField(UserManagerPage::$filterSearch, $LevelTitle); $I->click(UserManagerPage::$iconSearch); $I->checkAllResults();