Skip to content

Commit

Permalink
Fix the issue_#30
Browse files Browse the repository at this point in the history
  • Loading branch information
pritalpatel committed Jun 27, 2016
1 parent 537b559 commit 6ddf0c2
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 11 deletions.
11 changes: 11 additions & 0 deletions tests/_support/Page/Acceptance/Administrator/UserAclPage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
namespace Page\Acceptance\Administrator;

use Page\Acceptance\Administrator\AdminPage;

class UserAclPage extends AdminPage
{
// include url of current page
public static $aclPageURL = 'administrator/index.php?option=com_users&view=levels';

}
12 changes: 12 additions & 0 deletions tests/_support/Page/Acceptance/Administrator/UserGroupPage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
namespace Page\Acceptance\Administrator;

use Page\Acceptance\Administrator\AdminPage;

class UserGroupPage extends AdminPage
{
// include url of current page
public static $groupPageURL = 'administrator/index.php?option=com_users&view=groups';


}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,4 @@ class UserManagerPage extends AdminPage
public static $title = ['id' => '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";

}
14 changes: 8 additions & 6 deletions tests/_support/Step/Acceptance/Administrator/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -264,7 +266,7 @@ public function iSeeTheAlertError($error)
public function thereIsAAddNewGroupLink()
{
$I = $this;
$I->amOnPage(UserManagerPage::$groupPageURL);
$I->amOnPage(UserGroupPage::$groupPageURL);
$I->clickToolbarButton('New');
}

Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -348,7 +350,7 @@ public function iDeleteUserGroup($message)
public function thereIsAAddViewingAccessLevelLink()
{
$I = $this;
$I->amOnPage(UserManagerPage::$aclPageURL);
$I->amOnPage(UserAclPage::$aclPageURL);
$I->clickToolbarButton('New');
}

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 6ddf0c2

Please sign in to comment.