+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2016 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
$this->webtestLogin();
// create a new pledge for contact
- $contact = WebTest_Pledge_StandaloneAddTest::testStandalonePledgeAdd();
+ $contact = $this->webtestStandalonePledgeAdd();
$itemCount = 2;
$softCreditTypes = CRM_Core_OptionGroup::values("soft_credit_type", FALSE);
if ($type == "Contribution") {
$this->openCiviPage("contribute/search", "reset=1", "contribution_date_low");
$this->type("sort_name", "{$data['last_name']} {$data['first_name']}");
- $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']");
- $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE);
+ $this->clickLink("_qf_Search_refresh", "xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[10]/span//a[text()='View']", FALSE);
+ $this->clickLink("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[10]/span//a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE);
$expected = array(
'From' => "{$data['first_name']} {$data['last_name']}",
'Financial Type' => $data['financial_type'],
'Soft Credit Type' => $data['soft_credit_type'],
);
foreach ($expectedSoft as $value) {
- $this->verifyText("css=table.crm-soft-credit-listing", preg_quote($value));
+ $this->assertElementContainsText("css=table.crm-soft-credit-listing", $value);
}
}
elseif ($type == "Membership") {
4 => 'New',
);
foreach ($expected as $label => $value) {
- $this->verifyText("xpath=id('MembershipView')/div[2]/div/table[1]/tbody/tr[$label]/td[2]", preg_quote($value));
+ $this->assertElementContainsText("xpath=id('MembershipView')/div[2]/div/table[1]/tbody/tr[$label]/td[2]", $value);
}
//View Contribution
$this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[8]/span/a[1][text()='View']");
'Soft Credit Type' => $data['soft_credit_type'],
);
foreach ($expectedSoft as $value) {
- $this->verifyText("css=table.crm-soft-credit-listing", preg_quote($value));
+ $this->assertElementContainsText("css=table.crm-soft-credit-listing", $value);
}
}
}