$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', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
+ $this->click('newCustomField');
+ $this->waitForElementPresent("_qf_Field_cancel-bottom");
//add custom field - alphanumeric checkbox
$checkboxFieldLabel = 'custom_field' . substr(sha1(rand()), 0, 4);
$this->click("is_searchable");
//clicking save
- $this->click("_qf_Field_next");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->click("_qf_Field_done");
//Is custom field created?
$this->waitForText('crm-notification-container', "Custom field '$checkboxFieldLabel' has been saved.");
+ $this->waitForElementPresent('newCustomField');
//create another custom field - Integer Radio
- $this->clickLink("//a[@id='newCustomField']/span", '_qf_Field_cancel', FALSE);
+ $this->clickLink("newCustomField", '_qf_Field_cancel', FALSE);
$this->click("data_type[0]");
$this->select("data_type[0]", "value=1");
$this->click("//option[@value='1']");
$this->click("is_searchable");
//clicking save
- $this->click("_qf_Field_next");
+ $this->click("_qf_Field_done");
//Is custom field created
$this->waitForText('crm-notification-container', "Custom field '$radioFieldLabel' has been saved.");
$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', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
+ $this->click('newCustomField');
+ $this->waitForElementPresent("_qf_Field_cancel-bottom");
//add custom field - money text
$moneyTextFieldLabel = 'money' . substr(sha1(rand()), 0, 4);
$this->click("is_searchable");
//clicking save
- $this->click("_qf_Field_next");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->click("_qf_Field_done");
//Is custom field created?
$this->waitForText('crm-notification-container', "Custom field '$moneyTextFieldLabel' has been saved.");
$this->select("id=extends_0", "label=Individual");
$this->click("id=collapse_display");
$this->click("id=_qf_Group_next-bottom");
- $this->waitForElementPresent('_qf_Field_next-bottom');
+ $this->waitForElementPresent('newCustomField');
$this->waitForText('crm-notification-container', "Your custom field set '$customFieldSet' has been added.");
+ $this->click('newCustomField');
+ $this->waitForElementPresent('_qf_Field_done-bottom');
// Add field to fieldset
$customField = 'CustomField' . rand();
$this->type("id=label", $customField);
$this->select("id=data_type_0", "value=0");
- $this->click("id=_qf_Field_next-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->click("id=_qf_Field_done-bottom");
$this->waitForText('crm-notification-container', "Custom field '$customField' has been saved.");
$this->openCiviPage('contact/add', 'reset=1&ct=Individual');
$this->click('demographics');
$this->waitForElementPresent('CIVICRM_QFID_1_is_deceased');
$this->click('CIVICRM_QFID_1_is_deceased');
- $this->clickLink('_qf_Advanced_refresh', 'Go');
+ $this->clickLink('_qf_Advanced_refresh');
$this->assertElementContainsText('search-status', '2 Contacts');
$this->click("toggleSelect");
$this->waitForTextPresent('2 Selected records only');
$this->select('task', 'label=Remove Contacts from Group');
- $this->click("Go");
+ $this->waitForPageToLoad($this->getTimeoutMsec());
$this->waitForElementPresent('_qf_RemoveFromGroup_back-bottom');
$this->assertElementContainsText('crm-container', 'Number of selected contacts: 2');
$this->select('group_id', "label={$groupName}");
$this->click('_qf_Advanced_refresh');
// Check if non-deceased contacts are still present
- $this->waitForElementPresent('Go');
+ $this->waitForElementPresent('search-status');
$this->assertElementContainsText('search-status', '3 Contacts');
}
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->_searchBuilder('Email', NULL, NULL, 'IS NULL');
- $this->type("xpath=//*[@id='Builder-rows-per-page-select']", '100');
- $this->waitForElementPresent("xpath=//*[@id='Builder-rows-per-page-select']");
+ $this->type('CRM_Contact_Form_Search_Builder-rows-per-page-select', '100');
+ $this->waitForElementPresent('CRM_Contact_Form_Search_Builder-rows-per-page-select');
$names = array(
1 => $firstName1,
2 => $firstName2,
}
//searching contacts whose phone field is not empty
$this->_searchBuilder('Phone', NULL, $firstName, 'IS NOT EMPTY');
- $this->type("xpath=//*[@id='Builder-rows-per-page-select']", '100');
- $this->waitForElementPresent("xpath=//*[@id='Builder-rows-per-page-select']");
+ $this->type('CRM_Contact_Form_Search_Builder-rows-per-page-select', '100');
+ $this->waitForElementPresent('CRM_Contact_Form_Search_Builder-rows-per-page-select');
$this->assertTrue($this->isTextPresent($firstName));
$firstName4 = "AB" . substr(sha1(rand()), 0, 7);
}
else {
$this->click("location");
- $this->waitForElementPresent("xpath=//div[@id='location']/table/tbody/tr[2]/td/table/tbody/tr[4]/td[2]/select");
+ $this->waitForElementPresent("$field");
if ($contactType == 'Individual') {
$this->type("$field", $fieldValue);
}
$this->typeKeys("css=input#sort_name_navigation", $sortName);
// wait for result list
- $this->waitForElementPresent("xpath=//*[@id='ui-id-1']/li");
+ $this->waitForElementPresent("xpath=//li[contains(text(), '$sortName :: $firstName.anderson@example.org')]");
// visit contact summary page
- $this->click("xpath=//*[@id='ui-id-1']/li");
+ $this->click("xpath=//li[contains(text(), '$sortName :: $firstName.anderson@example.org')]");
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is contact present?
$this->waitForElementPresent("css=div#tagtree");
// select tag
- $this->click("xpath=//ul/li/label[text()=\"$tagName\"]");
+ $this->click("xpath=//ul/li/span/label[text()=\"$tagName\"]");
$this->waitForElementPresent("css=.success");
// visit contact search page
// Select the task action to export
$this->click("task");
$this->select("task", "label=Export Contacts");
- $this->click("Go");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->click("_qf_Select_next-bottom");
$this->addSelection('id=extends_1', "label=$grantType");
$this->click('id=collapse_display');
$this->click('id=_qf_Group_next-bottom');
- $this->waitForElementPresent('_qf_Field_next-bottom');
+ $this->waitForElementPresent('newCustomField');
$this->waitForText('crm-notification-container', "Your custom field set '$grantFieldSet' has been added.");
+ $this->click('newCustomField');
+ $this->waitForElementPresent('_qf_Field_done-bottom');
// Add field to fieldset
$grantField = 'GrantField' . $rand;
$this->type('id=label', $grantField);
$this->select('id=data_type_0', 'label=Money');
- $this->click('id=_qf_Field_next-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->click('id=_qf_Field_done-bottom');
$this->waitForText('crm-notification-container', "Custom field '$grantField' has been saved.");
// Create new Grant
$this->select('extends[0]', "value=Address");
$this->click("//option[@value='Address']");
$this->click('_qf_Group_next-bottom');
- $this->waitForElementPresent('_qf_Field_cancel-bottom');
+ $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.");
$gid = $this->urlArg('gid');
+ $this->click('newCustomField');
+ $this->waitForElementPresent('_qf_Field_cancel-bottom');
// create custom field "alphanumeric text"
$customField = 'Custom field ' . substr(sha1(rand()), 0, 4);
$this->type('label', $customField);
// clicking save
- $this->click('_qf_Field_next-bottom');
- $this->waitForElementPresent('newCustomField');
+ $this->click('_qf_Field_done-bottom');
$this->waitForText('crm-notification-container',"Custom field '{$customField}' has been saved.");
+ $this->waitForElementPresent("xpath=//span[text()='$customField']");
$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];
// create custom field - Integer
$this->click("newCustomField");
- $this->waitForElementPresent('_qf_Field_next-bottom');
+ $this->waitForElementPresent('_qf_Field_done-bottom');
$customField1 = 'Customfield_int ' . substr(sha1(rand()), 0, 4);
$this->type('label', $customField1);
$this->select("data_type[0]","value=1");
// clicking save
- $this->click('_qf_Field_next-bottom');
+ $this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
$this->waitForText('crm-notification-container', "Custom field '{$customField1}' has been saved.");
$this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField1']");
// create custom field - Number
$this->click("newCustomField");
- $this->waitForElementPresent('_qf_Field_next-bottom');
+ $this->waitForElementPresent('_qf_Field_done-bottom');
$customField2 = 'Customfield_Number ' . substr(sha1(rand()), 0, 4);
$this->type('label', $customField2);
$this->select("data_type[0]","value=2");
// clicking save
- $this->click('_qf_Field_next-bottom');
+ $this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
$this->waitForText('crm-notification-container', "Custom field '{$customField2}' has been saved.");
$this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField2']");
// create custom field - "alphanumeric select"
$this->click("newCustomField");
- $this->waitForElementPresent('_qf_Field_next-bottom');
+ $this->waitForElementPresent('_qf_Field_done-bottom');
$customField3 = 'Customfield_alp_select' . substr(sha1(rand()), 0, 4);
$customFieldId3 = $this->_createMultipleValueCustomField($customField3,'Select');
// create custom field - "alphanumeric radio"
$this->click("newCustomField");
- $this->waitForElementPresent('_qf_Field_next-bottom');
+ $this->waitForElementPresent('_qf_Field_done-bottom');
$customField4 = 'Customfield_alp_radio' . substr(sha1(rand()), 0, 4);
$customFieldId4 = $this->_createMultipleValueCustomField($customField4,'Radio');
// create custom field - "alphanumeric checkbox"
$this->click("newCustomField");
- $this->waitForElementPresent('_qf_Field_next-bottom');
+ $this->waitForElementPresent('_qf_Field_done-bottom');
$customField5 = 'Customfield_alp_checkbox' . substr(sha1(rand()), 0, 4);
$customFieldId5 = $this->_createMultipleValueCustomField($customField5,'CheckBox');
// create custom field - "alphanumeric multiselect"
$this->click("newCustomField");
- $this->waitForElementPresent('_qf_Field_next-bottom');
+ $this->waitForElementPresent('_qf_Field_done-bottom');
$customField6 = 'Customfield_alp_multiselect' . substr(sha1(rand()), 0, 4);
$customFieldId6 = $this->_createMultipleValueCustomField($customField6,'Multi-Select');
// create custom field - "alphanumeric advmultiselect"
$this->click("newCustomField");
- $this->waitForElementPresent('_qf_Field_next-bottom');
+ $this->waitForElementPresent('_qf_Field_done-bottom');
$customField7 = 'Customfield_alp_advmultiselect' . substr(sha1(rand()), 0, 4);
$customFieldId7 = $this->_createMultipleValueCustomField($customField7,'AdvMulti-Select');
// create custom field - "alphanumeric autocompleteselect"
$this->click("newCustomField");
- $this->waitForElementPresent('_qf_Field_next-bottom');
+ $this->waitForElementPresent('_qf_Field_done-bottom');
$customField8 = 'Customfield_alp_autocompleteselect' . substr(sha1(rand()), 0, 4);
$customFieldId8 = $this->_createMultipleValueCustomField($customField8,'Autocomplete-Select');
// create custom field - Money
$this->click("newCustomField");
- $this->waitForElementPresent('_qf_Field_next-bottom');
+ $this->waitForElementPresent('_qf_Field_done-bottom');
$customField9 = 'Customfield_Money' . substr(sha1(rand()), 0, 4);
$this->type('label', $customField9);
$this->select("data_type[0]","value=3");
// clicking save
- $this->click('_qf_Field_next-bottom');
+ $this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
$this->waitForText('crm-notification-container', "Custom field '{$customField9}' has been saved.");
$this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField9']");
// create custom field - Date
$this->click("newCustomField");
- $this->waitForElementPresent('_qf_Field_next-bottom');
+ $this->waitForElementPresent('_qf_Field_done-bottom');
$customField10 = 'Customfield_Date' . substr(sha1(rand()), 0, 4);
$this->type('label', $customField10);
$this->select("data_type[0]","value=5");
$this->select("date_format","value=yy-mm-dd");
// clicking save
- $this->click('_qf_Field_next-bottom');
+ $this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
$this->waitForText('crm-notification-container', "Custom field '{$customField10}' has been saved.");
$this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField10']");
$this->type("option_value_2","label2");
// clicking save
- $this->click('_qf_Field_next-bottom');
+ $this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
$this->waitForText('crm-notification-container', "Custom field '{$customFieldName}' has been saved.");
$this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customFieldName']");