$this->click("xpath=//button[@title='Close']");
//--------track and respond----------
- $this->click("xpath=//ul/li/a[text()='Tracking']");
+ $this->waitForAjaxContent();
+ $this->click('link=Tracking');
$this->assertChecked("url_tracking");
$this->assertChecked("open_tracking");
// no need tracking for this test
// default header and footer ( with label )
- $this->click("xpath=//ul/li/a[text()='Header and Footer']");
+ $this->waitForAjaxContent();
+ $this->click('link=Header and Footer');
$this->select("header_id", "label=Mailing Header");
$this->select("footer_id", "label=Mailing Footer");
$this->waitForElementPresent('crm-contact-actions-link');
// now add pledge from contact summary
- $this->click("//a[@id='crm-contact-actions-link']/span/div");
+ $this->click("xpath=//div[@class='crm-actions-ribbon']/ul[@id='actions']/li[@class='crm-contact-activity crm-summary-block']/div/a[@id='crm-contact-actions-link']");
+ $this->waitForElementPresent('crm-contact-actions-list');
// wait for add plegde link
$this->waitForElementPresent('link=Add Pledge');
$this->click("_qf_Search_refresh");
$this->waitForElementPresent('toggleSelect');
- $this->click('toggleSelect');
+ $this->click("xpath=//table[@class='selector row-highlight']/thead/tr/th[1]/input[@id='toggleSelect']");
$this->select('task', "Record Survey Responses");
$this->waitForElementPresent("_qf_Interview_cancel_interview");
+ $this->select("xpath=//table[@class='display crm-copy-fields dataTable no-footer']/tbody/tr[1]/td[@class='result']/select", "value=Label $title 1");
+ $this->click("xpath=//table[@class='display crm-copy-fields dataTable no-footer']/tbody/tr[1]/td[8]/a");
- $this->click("CIVICRM_QFID_1_2");
- $this->select("xpath=//table[@class='display crm-copy-fields dataTable no-footer']/tbody/tr[1]/td[8]/select", "value=Label $title 1");
- $this->click("xpath=//table[@class='display crm-copy-fields dataTable no-footer']/tbody/tr[1]/td[9]/a");
-
- $this->click("CIVICRM_QFID_2_8");
-
- $this->select("xpath=//table[@class='display crm-copy-fields dataTable no-footer']/tbody/tr[2]/td[8]/select", "value=Label $title 2");
- $this->click("xpath=//table[@class='display crm-copy-fields dataTable no-footer']/tbody/tr[2]/td[9]/a");
+ $this->select("xpath=//table[@class='display crm-copy-fields dataTable no-footer']/tbody/tr[2]/td[@class='result']/select", "value=Label $title 2");
+ $this->click("xpath=//table[@class='display crm-copy-fields dataTable no-footer']/tbody/tr[2]/td[8]/a");
$this->click("_qf_Interview_cancel_interview");
$this->waitForPageToLoad($this->getTimeoutMsec());
* @param $numberOfTrxn
*/
public function _testAssignBatch($numberOfTrxn) {
- $this->select("xpath=//div[@id='crm-transaction-selector-assign_length']/label/select[@name='crm-transaction-selector-assign_length']", "value=$numberOfTrxn");
+ $this->waitForAjaxContent();
+ $this->select("xpath=//div[@class='dataTables_length']/label/select", "value={$numberOfTrxn}");
// Because it tends to cause problems, all uses of sleep() must be justified in comments
// Sleep should never be used for wait for anything to load from the server
// Justification for this instance: FIXME
- sleep(5);
+ $this->waitForAjaxContent();
$this->click('toggleSelect');
$this->select('trans_assign', 'value=Assign');
$this->click('Go');
- $this->waitForPageToLoad($this->getTimeoutMsec());
}
/**
public function _testExportBatch($setTitle, $batchId, $exportFormat) {
$this->openCiviPage("financial/batch", "reset=1&action=export&id=$batchId");
if ($exportFormat == 'CSV') {
- $this->click("xpath=//form[@id='FinancialBatch']/div[2]/table[@class='form-layout']/tbody/tr/td/input[2]");
+ $this->click("xpath=//form[@id='FinancialBatch']/div[2]/table[@class='form-layout']/tbody/tr/td/input[1]");
$this->click('_qf_FinancialBatch_next-botttom');
$this->waitForPageToLoad($this->getTimeoutMsec());
}
$this->waitForPageToLoad($this->getTimeoutMsec());
}
$this->openCiviPage("dashboard", "reset=1");
- $this->waitForPageToLoad($this->getTimeoutMsec());
-
- $this->clickLink("xpath=//div[@id='recently-viewed']/ul/li[1]/a", "_qf_Activity_cancel-bottom");
+ $this->clickLink("xpath=//div[@id='crm-recently-viewed']/ul/li[1]/a", "_qf_Activity_cancel-bottom");
$this->webtestVerifyTabularData(
array(
'Current Attachment(s)' => 'Financial_Transactions_',
$this->waitForElementPresent('crm-contact-actions-link');
// now add grant from contact summary
- $this->click("//a[@id='crm-contact-actions-link']/span/div");
+ $this->click("xpath=//div[@class='crm-actions-ribbon']/ul[@id='actions']/li[@class='crm-contact-activity crm-summary-block']/div/a[@id='crm-contact-actions-link']");
+ $this->waitForElementPresent('crm-contact-actions-list');
// wait for add Grant link
$this->waitForElementPresent('link=Add Grant');
$this->click("xpath=//button[@title='Close']");
// select default header and footer ( with label )
- $this->click("xpath=//ul/li/a[text()='Header and Footer']");
+ $this->click('link=Header and Footer');
$this->select2("s2id_crmUiId_10", "Mailing Header");
$this->select2("s2id_crmUiId_11", "Mailing Footer");
//--------track and respond----------
// check for default settings options
- $this->click("xpath=//ul/li/a[text()='Tracking']");
+ $this->click('link=Tracking');
$this->assertChecked("url_tracking");
$this->assertChecked("open_tracking");
$this->click("xpath=//button[@title='Close']");
// select default header and footer ( with label )
- $this->click("xpath=//ul/li/a[text()='Header and Footer']");
+ $this->click('link=Header and Footer');
$this->select2("s2id_crmUiId_10", "Mailing Header");
$this->select2("s2id_crmUiId_11", "Mailing Footer");
//--------track and respond----------
// check for default settings options
- $this->click("xpath=//ul/li/a[text()='Tracking']");
+ $this->click('link=Tracking');
$this->assertChecked("url_tracking");
$this->assertChecked("open_tracking");
$this->waitForElementPresent('crm-contact-actions-link');
// now add pledge from contact summary
- $this->click("//a[@id='crm-contact-actions-link']/span/div");
+ $this->click("xpath=//div[@class='crm-actions-ribbon']/ul[@id='actions']/li[@class='crm-contact-activity crm-summary-block']/div/a[@id='crm-contact-actions-link']");
+ $this->waitForElementPresent('crm-contact-actions-list');
// wait for add plegde link
$this->waitForElementPresent('link=Add Pledge');
public function testAddPledgePaymentWithAdjustPledgePaymentSchedule() {
$this->webtestLogin();
$this->openCiviPage('admin/setting/localization', 'reset=1');
- $this->select("currencyLimit-f", "value=FJD");
+ $this->select("currencyLimit", "value=FJD");
$this->click("add");
$this->click("_qf_Localization_next-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->waitForElementPresent('crm-contact-actions-link');
// now add pledge from contact summary
- $this->click("//a[@id='crm-contact-actions-link']/span/div");
+ $this->click("xpath=//div[@class='crm-actions-ribbon']/ul[@id='actions']/li[@class='crm-contact-activity crm-summary-block']/div/a[@id='crm-contact-actions-link']");
+ $this->waitForElementPresent('crm-contact-actions-list');
// wait for add pledge link
$this->waitForElementPresent('link=Add Pledge');
)
);
$this->openCiviPage('admin/setting/localization', 'reset=1');
- $this->select("currencyLimit-t", "value=FJD");
+ $this->select("currencyLimit", "value=FJD");
$this->click("remove");
$this->click("_qf_Localization_next-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->waitForElementPresent('crm-contact-actions-link');
// now add pledge from contact summary
- $this->click("//a[@id='crm-contact-actions-link']/span/div");
+ $this->click("xpath=//div[@class='crm-actions-ribbon']/ul[@id='actions']/li[@class='crm-contact-activity crm-summary-block']/div/a[@id='crm-contact-actions-link']");
+ $this->waitForElementPresent('crm-contact-actions-list');
// wait for add plegde link
$this->waitForElementPresent('link=Add Pledge');
$this->waitForElementPresent('crm-contact-actions-link');
// now add pledge from contact summary
- $this->click("//a[@id='crm-contact-actions-link']/span/div");
+ $this->click("xpath=//div[@class='crm-actions-ribbon']/ul[@id='actions']/li[@class='crm-contact-activity crm-summary-block']/div/a[@id='crm-contact-actions-link']");
+ $this->waitForElementPresent('crm-contact-actions-list');
// wait for add plegde link
$this->waitForElementPresent('link=Add Pledge');
$reportDescription = "New Contact Summary Report";
$emaiSubject = "Contact Summary Report";
$emailCC = "tesmail@example.org";
-
$this->click("xpath=//div[@id='mainTabContainer']/ul/li[4]/a");
$this->waitForElementPresent("xpath=//div[@class='crm-submit-buttons']");
$this->click("_qf_Summary_submit_save");
$this->type("email_subject", $emaiSubject);
// Fill Email To
+ $this->waitForElementPresent('email_to');
$this->type("email_to", $emailId);
// Fill Email CC
+ $this->waitForElementPresent('email_cc');
$this->type("email_cc", $emailCC);
// We want navigation menu