+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
$this->addeditFinancialType($financialType);
// Assign the created Financial Account $financialAccountTitle to $financialType
+ $this->waitForElementPresent("xpath=id('ltype')");
$this->click("xpath=id('ltype')/div/table/tbody/tr/td[1]/div[text()='$financialType[name]']/../../td[7]//span//a[text()='Accounts']");
$this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']//button//span[contains(text(), 'Assign Account')]");
$this->click("xpath=//div[@class='ui-dialog-buttonset']//button//span[contains(text(), 'Assign Account')]");
);
foreach ($expected as $label => $value) {
- $this->verifyText("xpath=id('ContributionView')/div[2]/table[1]/tbody//tr/td[1][text()='$label']/../td[2]", preg_quote($value));
+ $this->assertElementContainsText("xpath=id('ContributionView')/div[2]/table[1]/tbody//tr/td[1][text()='$label']/../td[2]", $value);
}
// verify if soft credit was created successfully
);
foreach ($expected as $value) {
- $this->verifyText("css=table.crm-soft-credit-listing", preg_quote($value));
+ $this->assertElementContainsText("css=table.crm-soft-credit-listing", $value);
}
// go to first soft creditor contact view page
$this->waitForElementPresent("css=li#tab_contribute a");
$this->click("css=li#tab_contribute a");
$this->waitForElementPresent("link=Record Contribution (Check, Cash, EFT ...)");
- $this->verifyText("xpath=id('Search')/div[2]/table[2]/tbody/tr[2]/td[1]/a", preg_quote($contact['display_name']));
+ $this->assertElementContainsText("xpath=id('Search')/div[2]/table[2]/tbody/tr[2]/td[1]/a", $contact['display_name']);
// verify soft credit details
$expected = array(
4 => $financialType['name'],
6 => 'Completed',
);
foreach ($expected as $value => $label) {
- $this->verifyText("xpath=id('Search')/div[2]/table[2]/tbody/tr[2]/td[$value]", preg_quote($label));
+ $this->assertElementContainsText("xpath=id('Search')/div[2]/table[2]/tbody/tr[2]/td[$value]", $label);
}
// CRM-17418 fix: Now cancel the contribution
);
foreach ($expected as $label => $value) {
- $this->verifyText("xpath=id('ContributionView')/div[2]/table[1]/tbody//tr/td[1][text()='$label']/../td[2]", preg_quote($value));
+ $this->assertElementContainsText("xpath=id('ContributionView')/div[2]/table[1]/tbody//tr/td[1][text()='$label']/../td[2]", $value);
}
}