+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2016 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
//Create role
$role = 'role' . substr(sha1(rand()), 0, 7);
$this->open($this->sboxPath . "admin/people/permissions/roles");
- $this->waitForElementPresent("edit-submit");
+ $this->waitForAjaxContent();
$this->type("edit-name", $role);
$this->click("edit-add");
$this->waitForPageToLoad($this->getTimeoutMsec());
$label = "TestAclRole" . substr(sha1(rand()), 0, 4);
$this->waitForElementPresent("label");
$this->type("label", $label);
- $this->type("value", "Acl value" . $label);
$this->click("_qf_Options_next-bottom");
$this->waitForText('crm-notification-container', "The ACL Role '{$label}' has been saved.");
$this->click('newACL');
$this->waitForElementPresent("acl_role_id");
$this->select("acl_role_id", "label=" . $label);
+ $this->waitForAjaxContent();
$this->select("entity_id", "label={$groupTitle}");
$this->clickLink("_qf_EntityRole_next-botttom", 'newACL', FALSE);
//Create ACL granting 'Edit' access on smart group to the role
+ $this->waitForAjaxContent();
$this->openCiviPage("acl", "reset=1");
$this->click('newACL');
$this->waitForElementPresent("group_id");
$this->select("group_id", "label={$smartGroupTitle}");
$this->select("operation", "label=Edit");
+ $this->waitForAjaxContent();
$this->select("entity_id", "label={$label}");
$this->type("name", "describe {$label}");
$this->clickLink("_qf_ACL_next-bottom", 'newACL', FALSE);
//ACL granting edit permission on events.
+ $this->waitForAjaxContent();
$this->click('newACL');
$this->waitForElementPresent('name');
$this->type("name", "Edit All Events $label");
$this->select("entity_id", "label={$label}");
+ $this->waitForAjaxContent();
$this->select("operation", "label=Edit");
$this->click("xpath=//label[contains(text(), 'Events')]");
$this->select("event_id", "value=0");
$role = 'role' . substr(sha1(rand()), 0, 7);
$this->open($this->sboxPath . "admin/people/permissions/roles");
- $this->waitForElementPresent("edit-add");
+ $this->waitForAjaxContent();
$this->type("edit-name", $role);
$this->click("edit-add");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->open($this->sboxPath . "admin/people/permissions/roles");
$this->waitForElementPresent("xpath=//table[@id='user-roles']/tbody//tr/td[1][text()='{$ACLrole1}']");
- $roleId = explode('/', $this->getAttribute("xpath=//table[@id='user-roles']/tbody//tr/td[1][text()='{$ACLrole1}']/../td[4]/a[text()='edit permissions']/@href"));
+ $roleId = explode("people/permissions/", $this->getAttribute("xpath=//table[@id='user-roles']/tbody//tr/td[1][text()='{$ACLrole1}']/../td[4]/a[text()='edit permissions']/@href"));
$permissions = array(
- "edit-{$roleId[5]}-access-civicrm",
- "edit-{$roleId[5]}-access-civievent",
+ "edit-{$roleId[1]}-access-civicrm",
+ "edit-{$roleId[1]}-access-civievent",
);
$this->changePermissions($permissions);
$this->type("name", "Edit Events{$label}");
$this->select("operation", "label=Edit");
$this->select("entity_id", "label={$label}");
+ $this->waitForElementPresent("xpath=//tr[@class='crm-acl-form-block-object_type']/td[2]/label[contains(text(), 'Events')]");
$this->click("xpath=//tr[@class='crm-acl-form-block-object_type']/td[2]/label[contains(text(), 'Events')]");
$this->select("event_id", "label=All Events");
$this->clickLink("_qf_ACL_next-bottom");