$this->waitForElementPresent("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td/span[contains(text(), '{$params['name']}')]");
$createdBy = $this->getText("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td[3]/a");
$this->click("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td[7]/span/a[2]");
- $this->waitForElementPresent("xpath=//form[@id='Edit']/div[2]/div/table[2]/tbody/tr/td[2]/select");
-
- //assert created by in the edit page
- $this->assertTrue($this->isElementPresent(
- "xpath=//form[@id='Edit']/div[2]/div/table/tbody/tr[2]/td[contains(text(), '{$createdBy}')]"));
+ $this->waitForElementPresent("xpath=//form[@id='Edit']/div[2]/div/table/tbody/tr[2]/td[contains(text(), '{$createdBy}')]");
$this->openCiviPage('group', 'reset=1');
//search groups using created by
$this->type('created_by', $createdBy);
- $this->click('_qf_Search_refresh');
+ $this->clickLink('_qf_Search_refresh');
//show maximum no. of groups on first result set page
//as many groups can be created by same creator
$this->waitForElementPresent("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td/span[contains(text(), '{$params['name']}')]");
$this->click("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td/span[contains(text(), '{$params['name']}')]/../following-sibling::td[2]/a[text()='{$createdBy}']");
- $this->assertTrue($this->isElementPresent("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td/span[contains(text(), '{$params['name']}')]/../following-sibling::td[2]/a[text()='{$createdBy}']"));
+ $this->waitForElementPresent("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td/span[contains(text(), '{$params['name']}')]/../following-sibling::td[2]/a[text()='{$createdBy}']");
//check link of the contact who created the group
- $this->click("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody//tr/td[1]/span[contains(text(),'{$params['name']}')]/../following-sibling::td[2]/a");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody//tr/td[1]/span[contains(text(),'{$params['name']}')]/../following-sibling::td[2]/a", "css=div.crm-summary-display_name");
$name = explode(',', $createdBy);
$name1 = isset($name[1]) ? trim($name[1]) : NULL;
$name0 = trim($name[0]);
$this->click("is_reserved");
// Clicking save.
- $this->click("_qf_Edit_upload");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Edit_upload");
// Is status message correct?
- $this->assertTrue($this->isTextPresent("The Group '{$params['name']}' has been saved."));
+ $this->waitForText('crm-notification-container', "The Group '{$params['name']}' has been saved.");
// Create a new role w/o reserved group permissions
$role = 'role' . substr(sha1(rand()), 0, 7);
$this->waitForElementPresent("edit-add");
$this->type("edit-name", $role);
- $this->click("edit-add");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("edit-add", NULL);
$this->open($this->sboxPath . "admin/people/permissions/roles");
$this->waitForElementPresent("xpath=//table[@id='user-roles']/tbody//tr/td[1][text()='{$role}']");