X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FACL%2FAssignUsersToRolesTest.php;h=8642442a1ebddf781cd554df38e9f72d18f0b858;hb=808b59163b36c46b5c3c0de5714339db41da43ee;hp=56b0df8c8c64b41dd21aafa44421c8d9a49c7b95;hpb=181fe30b429627f3345c9b7d0596f22d50dcbc99;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php b/tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php index 56b0df8c8c..8642442a1e 100755 --- a/tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php +++ b/tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php @@ -1,7 +1,7 @@ open($this->sboxPath); $this->webtestLogin(); - // Go directly to the URL of the screen that will create new group. + $this->openCiviPage("group/add", "reset=1"); $groupTitle = "testGroup" . substr(sha1(rand()), 0, 4); $this->type("title", $groupTitle); @@ -44,37 +42,30 @@ class WebTest_ACL_AssignUsersToRolesTest extends CiviSeleniumTestCase { $this->click("_qf_Edit_upload-bottom"); $this->waitForPageToLoad($this->getTimeoutMsec()); - $this->assertElementContainsText('crm-notification-container', "The Group '{$groupTitle}' has been saved."); + $this->waitForText('crm-notification-container', "The Group '{$groupTitle}' has been saved."); - // Go directly to the URL that will create a new ACL role - $this->openCiviPage("admin/options/acl_role", "group=acl_role&action=add&reset=1", "_qf_Options_cancel-bottom"); + $this->openCiviPage("admin/options/acl_role", "action=add&reset=1", "_qf_Options_cancel-bottom"); $label = "TestAclRole" . substr(sha1(rand()), 0, 4); $this->type("label", $label); - $this->click("_qf_Options_next-bottom"); - $this->waitForPageToLoad($this->getTimeoutMsec()); - $this->assertElementContainsText('crm-notification-container', "The Acl Role '{$label}' has been saved"); + $this->clickLink("_qf_Options_next-bottom"); + $this->waitForText('crm-notification-container', "The Acl Role '{$label}' has been saved"); - // Go directly to the URL of the screen that will assign users to role. $this->openCiviPage("acl/entityrole", "action=add&reset=1"); $this->select("acl_role_id", "label=" . $label); $this->select("entity_id", "label={$groupTitle}"); - $this->click("_qf_EntityRole_next-botttom"); - $this->waitForPageToLoad($this->getTimeoutMsec()); - + $this->clickLink("_qf_EntityRole_next-botttom"); - // Go directly to the URL of the screen that will manage ACLs $this->openCiviPage("acl", "action=add&reset=1"); $this->click("group_id"); $this->select("group_id", "label={$groupTitle}"); $this->select("operation", "label=View"); $this->select("entity_id", "label={$label}"); $this->type("name", "describe {$label}"); - $this->click("_qf_ACL_next-bottom"); - $this->waitForPageToLoad($this->getTimeoutMsec()); + $this->clickLink("_qf_ACL_next-bottom"); } }