$values['preferred_communication_method'] = $preffComm;
$values['preferred_communication_method_display'] = CRM_Utils_Array::value('preferred_communication_method_display', $temp);
- $preferredMailingFormat = CRM_Core_SelectValues::pmf();
- $values['preferred_mail_format'] = $preferredMailingFormat[$contact->preferred_mail_format];
+ if ($contact->preferred_mail_format) {
+ $preferredMailingFormat = CRM_Core_SelectValues::pmf();
+ $values['preferred_mail_format'] = $preferredMailingFormat[$contact->preferred_mail_format];
+ }
// get preferred languages
if (!empty($contact->preferred_language)) {
$this->click("xpath=//div[@class='crm-section other_amount-section']//div[2]/input");
$this->type("xpath=//div[@class='crm-section other_amount-section']//div[2]/input", $contributionAmount);
+ $this->typeKeys("xpath=//div[@class='crm-section other_amount-section']//div[2]/input", $contributionAmount);
$this->type("email-5", $email);
+ $this->click("xpath=//label[text()='Test Processor']");
+ $this->waitForAjaxContent();
$this->webtestAddCreditCardDetails();
$this->webtestAddBillingDetails($firstName, $middleName, $lastName);
$this->openCiviPage("contribute/transact", "reset=1&id=$pageId&pcpId=$id[1]", "_qf_Main_upload-bottom");
$this->click("xpath=//div[@class='crm-section other_amount-section']//div[2]/input");
$this->type("xpath=//div[@class='crm-section other_amount-section']//div[2]/input", $contributionAmount);
+ $this->typeKeys("xpath=//div[@class='crm-section other_amount-section']//div[2]/input", $contributionAmount);
$this->type("email-5", $donorFirstName . "@example.com");
+ $this->click("xpath=//label[text()='Test Processor']");
+ $this->waitForAjaxContent();
$this->webtestAddCreditCardDetails();
$this->webtestAddBillingDetails($donorFirstName, $middleName, $donorLastName);
$this->waitForElementPresent('contribution_pcp_made_through_id');
$this->multiselect2('contribution_pcp_made_through_id', array($pcpTitle));
- $this->clickLink("_qf_Search_refresh", "xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[11]/span/a[1][text()='View']");
- $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[11]/span/a[1][text()='View']");
+ $this->clickLink("_qf_Search_refresh", "xpath=//table[@class='selector row-highlight']/tbody/tr[1]//td/span/a[1][text()='View']");
+ $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr[1]//td/span/a[1][text()='View']");
$this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[3]/span[2]");
// View Contribution Record and test for expected values
$this->webtestVerifyTabularData($verifyData);
//check if the membership amount is correct
- $this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/div[@class='crm-accordion-wrapper']/div/table/tbody/tr/td/span[text()='{$amount}']");
- $this->assertTrue($this->isElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/div[@class='crm-accordion-wrapper']/div/table/tbody/tr/td/span[text()='{$amount}']"));
+ $this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/div[@class='crm-accordion-wrapper']/div[2]/table/tbody/tr/td/a");
+ $this->assertElementContainsText("xpath=//form[@id='MembershipView']/div[2]/div/div[@class='crm-accordion-wrapper']/div[2]/table/tbody/tr/td/a", $amount);
$this->click("_qf_MembershipView_cancel-bottom");
}
$this->select('payment_instrument_id', 'Check');
$this->select('contribution_status_id', 'Completed');
- $this->click("_qf_Membership_upload");
+ $this->clickLink("_qf_Membership_upload");
//View Membership
$this->waitForElementPresent("xpath=//table[@class='display dataTable no-footer']/tbody/tr[1]/td[9]/span/a[text()='View']");
- $this->click("xpath=xpath=//table[@class='display dataTable no-footer']/tbody/tr[1]/td[9]/span/a[text()='View']");
+ $this->click("xpath=//table[@class='display dataTable no-footer']/tbody/tr[1]/td[9]/span/a[text()='View']");
$this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
// verify soft credit data