open($this->sboxPath); $this->webtestLogin(); // Go directly to the URL of the screen that will create new group. $this->open($this->sboxPath . "civicrm/group/add?reset=1"); $groupTitle = "testGroup" . substr(sha1(rand()), 0, 4); $this->type("title", $groupTitle); $this->click("group_type[1]"); $this->click("_qf_Edit_upload-bottom"); $this->waitForPageToLoad($this->getTimeoutMsec()); $this->assertTrue($this->isTextPresent("The Group '{$groupTitle}' has been saved.")); // Go directly to the URL that will create a new ACL role $this->open($this->sboxPath . "civicrm/admin/options/acl_role?group=acl_role&action=add&reset=1"); $this->waitForElementPresent("_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->assertTrue($this->isTextPresent("The Acl Role '{$label}' has been saved ")); // Go directly to the URL of the screen that will assign users to role. $this->open($this->sboxPath . "civicrm/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()); // Go directly to the URL of the screen that will manage ACLs $this->open($this->sboxPath . "civicrm/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()); } }