$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')]");
$this->waitForText("crm-notification-container", "The contribution record has been saved.");
// verify if Membership is created
- $this->waitForElementPresent("xpath=//form[@class='CRM_Contribute_Form_Search crm-search-form']//div[2]table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span//a[text()='View']");
+ $this->waitForElementPresent("xpath=//form[@class='CRM_Contribute_Form_Search crm-search-form']//div[2]/table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span//a[text()='View']");
$contriID = $this->urlArg('id', $this->getAttribute("xpath=//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span//a[text()='Edit']@href"));
$contactID = $this->urlArg('cid', $this->getAttribute("xpath=//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span//a[text()='Edit']@href"));
//click through to the Membership view screen
- $this->click("xpath=//form[@class='CRM_Contribute_Form_Search crm-search-form']//div[2]table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span//a[text()='View']");
+ $this->click("xpath=//form[@class='CRM_Contribute_Form_Search crm-search-form']//div[2]/table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span//a[text()='View']");
$this->waitForElementPresent("_qf_ContributionView_cancel-bottom");
$expected = array(
);
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
$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']}");
}
/**
);
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);
}
}