$tableLocator = "[@id='$tableId']";
}
foreach ($expected as $label => $value) {
+ //assertContains() accepts param as string
+ $value = "$value";
if ($xpathPrefix) {
$this->waitForElementPresent("xpath=//table{$tableLocator}/tbody/tr/td{$xpathPrefix}[text()='{$label}']/../following-sibling::td");
$this->assertElementContainsText("xpath=//table{$tableLocator}/tbody/tr/td{$xpathPrefix}[text()='{$label}']/../following-sibling::td", $value);
$smartGroupTitle = "SmartGroup" . substr(sha1(rand()), 0, 4);
$this->type("title", $smartGroupTitle);
$this->clickLink("_qf_SaveSearch_next-bottom");
- $this->waitForText('crm-notification-container', "Your smart group has been saved as \'$smartGroupTitle\'");
+ $this->waitForText('crm-notification-container', "Your smart group has been saved as '$smartGroupTitle'");
//Create ACL role
$this->openCiviPage("admin/options/acl_role", "reset=1", "xpath=//a[@class='button new-option']");
$this->waitForElementPresent("xpath=//table[@id='caseRoles-selector-$id']/tbody/tr[4]/td[2]/a");
// check that expected roles are listed in the Case Roles pane
foreach ($caseRoles as $role) {
- $this->assertElementContainsText("xpath=//table[@id='caseRoles-selector-$id']/tbody/tr[4]/td[1]", $role);
+ $this->assertElementContainsText("css=div.crm-case-roles-block", $role);
}
// check that case creator role has been assigned to logged in user
$this->assertElementContainsText("xpath=//table[@id='caseRoles-selector-$id']/tbody/tr[4]/td[2]", $creatorName);
$id = $this->urlArg('id');
// check that expected auto-created activities are listed in the Case Activities table
foreach ($activityTypes as $aType) {
- $this->assertText("case_id_$id", $aType);
+ $this->assertElementContainsText("case_id_$id", $aType);
}
}
public function _testVerifyOpenCaseActivity($subject, $openCaseData) {
$id = $this->urlArg('id');
// check that open case subject is present
- $this->assertText("case_id_$id", $subject);
+ $this->assertElementContainsText("case_id_$id", $subject);
// click open case activity pop-up dialog
$this->click("xpath=//table[@id='case_id_{$id}']/tbody//tr/td[2]/div[text()='{$subject}']/../../td[8]/a[text()='View']");
$this->waitForElementPresent("ActivityView");
//verify the money custom field value in the proper format
$this->assertTrue($this->isElementPresent("xpath=//div[@id='custom-set-content-{$customFieldsetId}']/div/div[2]/div[2]"));
- $this->verifyText("xpath=//div[@id='custom-set-content-{$customFieldsetId}']/div/div[2]/div[2]", '12,345,678.98');
+ $this->assertElementContainsText("xpath=//div[@id='custom-set-content-{$customFieldsetId}']/div/div[2]/div[2]", '12,345,678.98');
}
public function testCustomDataChangeLog() {
$this->waitForElementPresent("financial_type_id");
$this->type("sort_name", $firstName);
$this->select('financial_type_id', "label=Donation");
- $this->clickLink('_qf_Search_refresh', "xpath=//table[@class='selector row-highlight']/tbody/tr/td[10]/span//a[text()='View']", FALSE);
- $this->click("xpath=//div[@id='contributionSearch']/table[@class='selector row-highlight']/tbody/tr/td[10]/span//a[text()='View']");
+ $this->clickLink('_qf_Search_refresh', "xpath=//table[@class='selector row-highlight']/tbody/tr/td[4][text()='Donation']/../td[10]/span//a[text()='View']", FALSE);
+ $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr/td[4][text()='Donation']/../td[10]/span//a[text()='View']");
+ $this->waitForElementPresent("xpath=//table/tbody/tr/td[text()='From']/following-sibling::td");
$this->waitForAjaxContent();
$expected = array(
'From' => "{$firstName} {$lastName}",
// Check PCP Summary Report
$this->openCiviPage('report/instance/17', 'reset=1');
- $this->verifyText("PCP", preg_quote($pcpTitle));
- $this->verifyText("PCP", preg_quote("{$lastName}, {$firstName}"));
+ $this->assertElementContainsText("PCP", $pcpTitle);
+ $this->assertElementContainsText("PCP", "{$lastName}, {$firstName}");
}
}
$this->select("financial_type_id", "label={$financialType['name']}");
$this->clickLink("_qf_Search_refresh");
$this->assertElementContainsText("xpath=//div[@class='crm-content-block']//div[@id='search-status']/table/tbody/tr[1]/td[1]", "2 Result");
- $this->assertElementContainsText("xpath=//div[@class='crm-content-block']//div[@id='search-status']/table/tbody/tr[1]/td[2]", "Financial Type ID In {$financialType['name']}");
+ $this->assertElementContainsText("xpath=//div[@class='crm-content-block']//div[@id='search-status']/table/tbody/tr[1]/td[2]", "Financial Type In {$financialType['name']}");
$this->openCiviPage("contact/search/advanced", "reset=1", "_qf_Advanced_refresh-top");
$this->clickAjaxLink('CiviContribute', "financial_type_id");
$this->select("financial_type_id", "label={$financialType['name']}");
$this->clickLink("_qf_Advanced_refresh-top");
$this->assertElementContainsText("xpath=//div[@class='crm-content-block']//div[@id='search-status']//table/tbody/tr[1]/td[1]", "2 Contacts");
- $this->assertElementContainsText("xpath=//div[@class='crm-content-block']//div[@id='search-status']//table/tbody/tr[1]/td[2]", "Financial Type ID In {$financialType['name']}");
+ $this->assertElementContainsText("xpath=//div[@class='crm-content-block']//div[@id='search-status']//table/tbody/tr[1]/td[2]", "Financial Type In {$financialType['name']}");
}
/**
// Search the participants
$this->openCiviPage("event/search", "reset=1", '_qf_Search_refresh');
- $eventName = 'Rain';
- $this->select2("event_id", $eventName);
+ $eventName = 'Rain-forest Cup Youth Soccer Tournament';
+ $this->select2("event_id", $eventName, TRUE);
$this->click('_qf_Search_refresh');
$this->openCiviPage("contribute/search", "reset=1", "contribution_date_low");