// add to group
$this->select("group_id", "label=$groupName");
$this->click("_qf_GroupContact_next");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->waitForElementPresent('link=Remove');
$firstName2 = substr(sha1(rand()), 0, 7);
$this->webtestAddContact($firstName2, "John", "$firstName2.john@example.org");
// add to group
$this->select("group_id", "label=$groupName");
$this->click("_qf_GroupContact_next");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->waitForElementPresent('link=Remove');
// Enable CiviCampaign module if necessary
$this->enableComponents(array('CiviCampaign'));
$this->waitForText('crm-notification-container', "Campaign $title");
- $this->waitForElementPresent("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
- $id = (int) $this->getText("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
+ $this->waitForElementPresent("//div[@id='campaignList']/div[@id='campaigns_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
+ $id = (int) $this->getText("//div[@id='campaignList']/div[@id='campaigns_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
$this->onlineContributionAddTest($campaignTitle, $id);
}
+ /**
+ * @param $campaignTitle
+ * @param $id
+ */
function onlineContributionAddTest($campaignTitle, $id) {
// We need a payment processor
$processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
$this->type("value_1", "100");
$this->type("label_2", "amount 2");
$this->type("value_2", "200");
- $this->click("CIVICRM_QFID_1_2");
+ $this->click("xpath=//*[@id='map-field-table']//tr[2]//input[1][@name='default']");
$this->click("_qf_Amount_next-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->waitForElementPresent("_qf_Custom_next-bottom");
// fill in step 6 (Include Profiles)
- $this->select('custom_pre_id', 'value=1');
+ $this->select('css=tr.crm-contribution-contributionpage-custom-form-block-custom_pre_id span.crm-profile-selector-select select', 'value=1');
$this->click('_qf_Custom_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->type("sort_name", "$firstName $lastName");
$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");
+ $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE);
//View Contribution Record
$this->verifyText("xpath=id('ContributionView')/div[2]/table[1]/tbody/tr[10]/td[2]", preg_quote($campaignTitle));