$this->click("//option[@value='Contact']");
$this->click("//form[@id='Group']/div[2]/div[3]/span[1]/input");
$this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->waitForElementPresent('newCustomField');
//Is custom group created?
$this->waitForText('crm-notification-container', "Your custom field set '$customGroupTitle' has been added. You can add custom fields now.");
+
//add custom field - alphanumeric text
+ $this->click('newCustomField');
+ $this->waitForElementPresent('_qf_Field_cancel-bottom');
$textFieldLabel = 'test_text_field' . substr(sha1(rand()), 0, 3);
$this->click("header");
$this->type("label", $textFieldLabel);
$this->click("_qf_Field_next_new-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->waitForElementPresent('_qf_Field_cancel-bottom');
$this->click("data_type[0]");
$this->select("data_type[0]", "value=0");
$this->click("//option[@value='0']");
//clicking save
$this->click("_qf_Field_next_new-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->waitForElementPresent('_qf_Field_cancel-bottom');
//create another custom field - Number Radio
$this->click("data_type[0]");
$this->click("is_searchable");
//clicking save
- $this->click("_qf_Field_next-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->click("_qf_Field_done-bottom");
+ $this->waitForElementPresent('newCustomField');
//On New Individual contact form
$this->openCiviPage("contact/add", "ct=Individual&reset=1");
$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->onlineParticipantAddTest($campaignTitle, $id);
}
$this->type("address_1_street_address", $streetAddress);
$this->type("address_1_city", "San Francisco");
$this->type("address_1_postal_code", "94117");
+ $this->select('address_1_country_id', 'United States');
$this->select("address_1_state_province_id", "value=1004");
$this->type("email_1_email", "info@civicrm.org");
$this->click("link=Online Registration");
$this->waitForElementPresent("_qf_Registration_upload-bottom");
- $this->check("is_online_registration");
+ $this->click("is_online_registration");
$this->assertChecked("is_online_registration");
if ($multipleRegistrations) {
$this->check("is_multiple_registrations");
$this->assertChecked("is_multiple_registrations");
}
+ $this->click('intro_text-plain');
$this->fillRichTextField("intro_text", $registerIntro);
// enable confirmation email
$this->type("label", $field3);
$this->check("is_searchable");
- $this->click("_qf_Field_next-bottom");
+ $this->click("_qf_Field_done-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
// get id of custom fields
$cusId_1 = 'custom_' . $customId[0] . '_1';
$cusId_2 = 'custom_' . $customId[1] . '_1';
- $this->clickLink("css=#{$customGrp1} a.button");
+ $this->clickLink("css=#{$customGrp1} a.button", '_qf_CustomData_cancel-bottom', FALSE);
- $this->assertElementContainsText("page-title", "Edit $customGrp1");
+ $this->assertElementContainsText("xpath=//span[@class='ui-dialog-title']", "Edit $customGrp1");
$custFname = "Miky" . substr(sha1(rand()), 0, 7);
$custLname = "Kristy" . substr(sha1(rand()), 0, 7);
$this->type('help_pre', 'This is test priceset.');
$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) {
$fieldCount = count($fields);
$count = 1;
+ $this->click('newPriceField');
+ $this->waitForElementPresent('label');
foreach ($fields as $label => $field) {
$this->type('label', $label);
$this->select('html_type', "value={$field['type']}");
else {
$this->click('_qf_Field_next-bottom');
}
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->waitForText('crm-notification-container', "Price Field '$label' has been saved.");
$count++;
}
$this->select('extends[0]', "value=Contact");
$this->click("//option[@value='Contact']");
$this->click('_qf_Group_next-bottom');
- $this->waitForElementPresent('_qf_Field_cancel-bottom');
+ $this->waitForElementPresent('newCustomField');
//Is custom group created?
$this->waitForText('crm-notification-container', $customGroupTitle);
+ $this->click('newCustomField');
+ $this->waitForElementPresent('_qf_Field_cancel-bottom');
$gid = $this->urlArg('gid');
// create another custom field - Date
$this->click("is_searchable");
// clicking save
- $this->click('_qf_Field_next-bottom');
+ $this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
- $this->assertTrue($this->isTextPresent("Custom field '{$customField}' has been saved."));
+ $this->waitForText('crm-notification-container', "Custom field '{$customField}' has been saved.");
$customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField']/../../td[8]/span/a@href"));
$customFieldId = $customFieldId[1];
$this->select("extends[0]", "value=Contact");
$this->click("//option[@value='Contact']");
$this->click('_qf_Group_next-bottom');
- $this->waitForElementPresent('_qf_Field_cancel-bottom');
+ $this->waitForElementPresent('newCustomField');
//Is custom group created?
$this->assertTrue($this->isTextPresent("Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now."));
+ $this->click('newCustomField');
+ $this->waitForElementPresent('_qf_Field_cancel-bottom');
$url = explode('gid=', $this->getLocation());
$gid = $url[1];
$this->click("is_searchable");
// clicking save
- $this->click('_qf_Field_next-bottom');
+ $this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
- $this->assertTrue($this->isTextPresent("Custom field '{$dateFieldLabel}' has been saved."));
+ $this->waitForText('crm-notification-container', "Custom field '{$dateFieldLabel}' has been saved.");
+ $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$dateFieldLabel']");
$dateFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$dateFieldLabel']/../../td[8]/span/a@href"));
$dateFieldId = $dateFieldId[1];
$this->click("is_searchable");
//clicking save
- $this->click("_qf_Field_next");
+ $this->click("_qf_Field_done");
$this->waitForElementPresent('newCustomField');
//Is custom field created
$this->click("is_searchable");
// clicking save
- $this->click('_qf_Field_next-bottom');
+ $this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
$this->waitForText("crm-notification-container", "Custom field '{$multiSelectLabel}' has been saved.");
$this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$multiSelectLabel']/parent::td/parent::tr/");
$this->click("is_searchable");
// clicking save
- $this->click('_qf_Field_next-bottom');
+ $this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
$this->waitForText("crm-notification-container", "Custom field '{$contactReferenceLabel}' has been saved.");
+ $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$contactReferenceLabel']/parent::td/parent::tr/");
$contactReferenceFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$contactReferenceLabel']/parent::td/parent::tr/td[8]/span/a@href"));
$contactReferenceFieldId = $contactReferenceFieldId[1];