$this->click("xpath=//form[@id='Field']//a[text()='Advanced Filter']");
$this->waitForElementPresent("filter");
- $this->type("filter", "action=lookup&contact_type=Organization");
+ $this->type("filter", "action=get&contact_type=Organization");
//clicking save
$this->click("_qf_Field_next-bottom");
// Visit custom group preview page
$this->openCiviPage('admin/custom/group', "action=preview&reset=1&id={$customGroupId}");
- $this->type("custom_{$contactRefFieldID1}_-1", "Anderson");
- $this->fireEvent("custom_{$contactRefFieldID1}_-1", "focus");
- $this->click("custom_{$contactRefFieldID1}_-1");
- $this->waitForElementPresent("css=div.ac_results-inner li");
- $this->assertElementContainsText("css=div.ac_results-inner li", "{$contact1}@example.com");
- $this->assertElementNotContainsText("css=div.ac_results-inner ul li", "{$contact2}@example.com");
+ $this->clickAt("//*[@id='custom_{$contactRefFieldID1}_-1']/../div/a");
+ $this->keyDown("//*[@id='select2-drop']/div/input", " ");
+ $this->type("//*[@id='select2-drop']/div/input", "Anderson");
+ $this->typeKeys("//*[@id='select2-drop']/div/input", "Anderson");
+ $this->waitForElementPresent("css=div.select2-result-label span");
+ $this->assertElementContainsText("css=div.select2-result-label", "{$contact1}@example.com");
+ $this->assertElementNotContainsText("css=div.select2-result-label", "{$contact2}@example.com");
$this->openCiviPage('admin/custom/group', "action=preview&reset=1&id={$customGroupId}");
- $this->type("custom_{$contactRefFieldID2}_-1", $org1);
- $this->fireEvent("custom_{$contactRefFieldID2}_-1", "focus");
- $this->click("custom_{$contactRefFieldID2}_-1");
- $this->waitForElementPresent("css=div.ac_results-inner li");
- $this->assertElementContainsText("css=div.ac_results-inner li", "{$org1}@example.com");
+ $this->clickAt("//*[@id='custom_{$contactRefFieldID2}_-1']/../div/a");
+ $this->keyDown("//*[@id='select2-drop']/div/input", " ");
+ $this->type("//*[@id='select2-drop']/div/input", $org1);
+ $this->typeKeys("//*[@id='select2-drop']/div/input", $org1);
+ $this->waitForElementPresent("css=div.select2-result-label");
+ $this->assertElementContainsText("css=div.select2-result-label", "{$org1}@example.com");
}
}
// Search by group membership in newly created group
$this->openCiviPage('contact/search/advanced', 'reset=1');
- $this->select("crmasmSelect1", "label=" . $newGroupName);
+ $this->select("group", "label=" . $newGroupName);
$this->click("_qf_Advanced_refresh");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->type("xpath=//*[@id='Basic-rows-per-page-select']", '25');
- $this->waitForElementPresent("xpath=//*[@id='Basic-rows-per-page-select']");
+ $this->waitForElementPresent("toggleSelect");
$this->click("toggleSelect");
$this->click("xpath=//div[@class='crm-content-block']/div/div[2]/div/span[2]/a");
- $this->waitForElementPresent("Go");
+ $this->waitForText("xpath=//div[@class='crm-content-block']/div/div[2]/div/span[2]/a", "First");
$this->click("toggleSelect");
$this->select("task", "label=Add Contacts to Group");
$this->click("Go");
$this->waitForText('crm-notification-container', "50 contacts added to group");
$this->openCiviPage('contact/search/advanced', 'reset=1');
- $this->select("crmasmSelect1", "label=" . $newGroupName);
+ $this->select("group", "label=" . $newGroupName);
$this->click("_qf_Advanced_refresh");
$this->waitForPageToLoad($this->getTimeoutMsec());
// go to soft creditor contact view page - this also does the soft credit check
$this->click("xpath=id('ContributionView')/div[2]/div/div[1][contains(text(), 'Soft Credit')]/../div[2]/table[1]/tbody//tr/td[1]/a[contains(text(), '{$softCreditFname} {$softCreditLname}')]");
+ $this->waitForPageToLoad($this->getTimeoutMsec());
// go to contribution tab
$this->waitForElementPresent("css=li#tab_contribute a");
$this->click("css=li#tab_contribute a");
$this->type("sort_name", "$lastName, $firstName");
$this->clickLink("_qf_Search_refresh", "xpath=//div[@id='contributionSearch']//table//tbody/tr[2]/td[11]/span/a[text()='View']");
- $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[2]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom");
+ $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[2]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE);
// View Contribution Record and test for expected values
$expected = array(
'From' => "{$firstName} {$lastName}",
$this->waitForElementPresent("xpath=//div[@class='crm-customData-block']//div[@class='custom-group custom-group-$customGroupTitle crm-accordion-wrapper collapsed']");
$this->click("xpath=//div[@class='crm-customData-block']//div[@class='custom-group custom-group-$customGroupTitle crm-accordion-wrapper collapsed']//div[1]");
$this->click("xpath=//div[@class='crm-customData-block']//div[@class='custom-group custom-group-$customGroupTitle crm-accordion-wrapper']//div[2]//table//tbody//tr[2]//td[2]//table//tbody//tr[1]//td[1]//label");
- $this->click("xpath=//div[@class='crm-customData-block']//sdiv[@class='custom-group custom-group-$customGroupTitle crm-accordion-wrapper']//div[2]//table//tbody//tr[4]//td[2]//table//tbody//tr[1]//td[1]//label");
+ $this->click("xpath=//div[@class='crm-customData-block']//div[@class='custom-group custom-group-$customGroupTitle crm-accordion-wrapper']//div[2]//table//tbody//tr[4]//td[2]//table//tbody//tr[1]//td[1]//label");
// Choose Registration Date.
// Using helper webtestFillDate function.
array(
'From' => $displayName,
'Financial Type' => 'Event Fee',
- 'Total Amount' => '$ 800.00',
'Contribution Status' => 'Completed',
'Paid By' => 'Check',
'Check Number' => '1044',
)
);
+ $this->verifyText("xpath=//table/tbody/tr/td[text()='Total Amount']/following-sibling::td/strong", preg_quote('$ 800.00'), 'In line ' . __LINE__);
}
function testEventAddMultipleParticipants() {
// Clicking save.
$this->click('_qf_Membership_upload');
- $this->waitForPageToLoad($this->getTimeoutMsec());
// page was loaded
$this->waitForTextPresent($sourceText);
+ $this->waitForElementPresent("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
// Is status message correct?
$this->assertTrue($this->isTextPresent("Membership Type $title membership for $firstName $lastName has been added."),
"Status message didn't show up after saving!"
// Clicking save.
$this->click('_qf_Membership_upload');
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->waitForElementPresent("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
// page was loaded
$this->waitForTextPresent($sourceText);
// Clicking save.
$this->click('_qf_Membership_upload');
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->waitForElementPresent("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
// page was loaded
$this->waitForTextPresent($sourceText);
// Clicking save.
$this->click('_qf_Membership_upload');
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->waitForElementPresent("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
// page was loaded
$this->waitForTextPresent($sourceText);
$this->waitForElementPresent('link=Add Membership Type');
$this->waitForText('crm-notification-container', "The membership type 'Membership Type $title' has been saved.");
- $url = $this->getAttribute("xpath=//div[@id='membership_type']//div[@class='dataTables_wrapper']//table/tbody//tr/td[1][text()='{$membershipTypeTitle}']/../td[12]/span/a[3][text()='Delete']/@href");
+ $url = $this->getAttribute("xpath=//div[@id='membership_type']//div[@id='option11_wrapper']//table/tbody//tr/td[1][text()='{$membershipTypeTitle}']/../td[12]/span/a[3][text()='Delete']/@href");
$matches = array();
preg_match('/id=([0-9]+)/', $url, $matches);
$this->click('link=Title');
$this->waitForElementPresent('_qf_Settings_cancel-bottom');
$this->click('is_organization');
- $this->select('onbehalf_profile_id', "value=9");
+ $this->select("xpath=//input[@id='onbehalf_profile_id']/parent::td/div/div/span/select", "value=9");
$this->type('for_organization', "On behalf $hash");
$this->click('_qf_Settings_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());