$this->click('_qf_FinancialType_next');
if ($option == 'new') {
- $text = "Your Financial '{$financialType['name']}' Type has been created, along with a corresponding income account '{$financialType['name']}'. That income account, along with standard financial accounts 'Accounts Receivable', 'Banking Fees' and 'Premiums' have been linked to the financial type. You may edit or replace those relationships here.";
+ $text = "Your Financial \"{$financialType['name']}\" Type has been created, along with a corresponding income account \"{$financialType['name']}\". That income account, along with standard financial accounts \"Accounts Receivable\", \"Banking Fees\" and \"Premiums\" have been linked to the financial type. You may edit or replace those relationships here.";
}
else {
$text = "The financial type '{$financialType['name']}' has been saved.";
}
- $this->waitForText('crm-notification-container', $text);
+ $this->waitForText("xpath=//div[@class='notify-content']", $text);
}
/**
$this->type("description", "This is a test campaign");
// include groups for the campaign
- $this->addSelection("includeGroups-f", "label=$groupName");
- $this->click("//option[@value=4]");
- $this->click("add");
+ $this->multiselect2("includeGroups", array("$groupName", "Advisory Board"));
// fill the end date for campaign
$this->webtestFillDate("end_date", "+1 year");
$this->waitForText('crm-notification-container', "Campaign $title");
- $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->waitForElementPresent("//div[@id='campaignList']/div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
+ $id = (int) $this->getText("//div[@id='campaignList']/div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
$this->activityAddTest($campaignTitle, $id);
}
// Is status message correct?
$this->waitForText('crm-notification-container', $subject);
- $this->waitForElementPresent("
- xpath=//table[@id='contact-activity-selector-activity']//tbody//tr[1]/td[8]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']/tbody/tr[1]/td[8]/span/a[text()='View']");
// click through to the Activity view screen
- $this->click("xpath=//table[@id='contact-activity-selector-activity']//tbody//tr[1]/td[8]/span/a[text()='View']");
+ $this->click("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']/tbody//tr[1]/td[8]/span/a[text()='View']");
$this->waitForElementPresent('_qf_Activity_cancel-bottom');
// verify Activity created
- $this->verifyText("xpath=id('Activity')/div[2]/table[1]/tbody/tr[5]/td[2]/span", preg_quote($campaignTitle));
+ $this->waitForText("xpath=id('Activity')/div[2]/table[1]/tbody/tr[5]/td[2]/span", $campaignTitle);
}
}
$this->type("description", "This is a test campaign");
// include groups for the campaign
- $this->addSelection("includeGroups-f", "label=$groupName");
- $this->click("//option[@value=4]");
- $this->click("add");
+ $this->multiselect2("includeGroups", array("$groupName", "Advisory Board"));
// fill the end date for campaign
$this->webtestFillDate("end_date", "+1 year");
$this->waitForText('crm-notification-container', "Campaign $title");
- $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->waitForElementPresent("//div[@id='campaignList']/div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
+ $id = (int) $this->getText("//div[@id='campaignList']/div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
$this->memberAddTest($campaignTitle, $id);
}
}
break;
+ case 'multiselect2':
+ foreach ($field['values'] as $op) {
+ $this->waitForVisible($fldLocator);
+ $this->multiselect2($fldLocator, $op);
+ }
+ break;
+
case 'date':
$this->webtestFillDate($fldLocator, current($field['values']));
break;
array(
'Location Type' =>
array(
- 'type' => 'checkbox',
- 'values' => array('location_type[1]', 'location_type[2]'),
+ 'type' => 'multiselect2',
+ 'locator' => 'location_type',
+ 'values' => array(array('Home', 'Work')),
),
'Country' =>
array(
),
'State' =>
array(
- 'type' => 'select',
+ 'type' => 'multiselect2',
'locator' => 'state_province',
- 'values' => array('Alabama', 'California', 'New Jersey', 'New York'),
+ 'values' => array(array('Alabama', 'California', 'New Jersey', 'New York')),
),
),
),
$this->type('help_pre', $setHelp);
$this->assertChecked('is_active', 'Verify that Is Active checkbox is set.');
- $this->clickLink('_qf_Set_next-bottom', '_qf_Field_next-bottom');
+ $this->clickLink('_qf_Set_next-bottom', 'newPriceField');
}
/**
*/
function _testAddPriceFields(&$fields, &$validateString, $financialType, $dateSpecificFields = FALSE) {
$validateStrings[] = $financialType;
+ $this->click('newPriceField');
+ $this->waitForElementPresent('label');
foreach ($fields as $label => $type) {
$validateStrings[] = $label;
break;
}
$this->select('financial_type_id', "label={$financialType}");
- $this->clickLink('_qf_Field_next_new-bottom', '_qf_Field_next-bottom');
+ $this->clickLink('_qf_Field_next_new-bottom', '_qf_Field_next-bottom', FALSE);
+ $this->waitForText('crm-notification-container', "Price Field '$label' has been saved.");
}
}
$this->type('help_pre', $setHelp);
$this->assertChecked('is_active', 'Verify that Is Active checkbox is set.');
- $this->clickLink('_qf_Set_next-bottom', '_qf_Field_next-bottom');
+ $this->clickLink('_qf_Set_next-bottom', 'newPriceField');
$this->assertTrue($this->isTextPresent("Your Set '{$setTitle}' has been added. You can add fields to this set now."));
}
elseif (!$defaultPriceSet) {
$memTypeParams1 = $this->webtestAddMembershipType();
$memTypeTitle1 = $memTypeParams1['membership_type'];
- $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[1]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
+ $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
$memTypeId1 = $memTypeId1[1];
$memTypeParams2 = $this->webtestAddMembershipType();
$memTypeTitle2 = $memTypeParams2['membership_type'];
- $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[1]/table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
+ $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
$memTypeId2 = $memTypeId2[1];
$memTypeParams3 = $this->webtestAddMembershipType();
$memTypeTitle3 = $memTypeParams3['membership_type'];
- $memTypeId3 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[1]/table/tbody//tr/td[text()='{$memTypeTitle3}']/../td[12]/span/a[3]@href"));
+ $memTypeId3 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/table/tbody//tr/td[text()='{$memTypeTitle3}']/../td[12]/span/a[3]@href"));
$memTypeId3 = $memTypeId3[1];
}