if ($added) {
$this->click("_qf_Component_next-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText("crm-notification-container", "Saved");
+ $this->waitForText('crm-notification-container', "Saved");
}
}
$this->clickLink('_qf_Edit_upload-bottom');
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "$groupName");
+ $this->waitForText('crm-notification-container', "$groupName");
return $groupName;
}
$this->click("_qf_Edit_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "The Group '{$groupTitle}' has been saved.");
+ $this->waitForText('crm-notification-container', "The Group '{$groupTitle}' has been saved.");
$this->openCiviPage("admin/options/acl_role", "group=acl_role&action=add&reset=1", "_qf_Options_cancel-bottom");
$label = "TestAclRole" . substr(sha1(rand()), 0, 4);
$this->type("label", $label);
- $this->click("_qf_Options_next-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "The Acl Role '{$label}' has been saved");
+ $this->clickLink("_qf_Options_next-bottom");
+
+ $this->waitForText('crm-notification-container', "The Acl Role '{$label}' has been saved");
$this->openCiviPage("acl/entityrole", "action=add&reset=1");
$this->select("acl_role_id", "label=" . $label);
$this->select("entity_id", "label={$groupTitle}");
- $this->click("_qf_EntityRole_next-botttom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_EntityRole_next-botttom");
$this->openCiviPage("acl", "action=add&reset=1");
$this->click("group_id");
$this->select("operation", "label=View");
$this->select("entity_id", "label={$label}");
$this->type("name", "describe {$label}");
- $this->click("_qf_ACL_next-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_ACL_next-bottom");
}
}
// Since we're here, let's check if screen help is being displayed properly
- $this->assertElementContainsText('css=tr.crm-activity-form-block-assignee_contact_id td span.description', 'You can optionally assign this activity to someone', 'Help text is missing.');
+ $this->assertElementContainsText('css=tr.crm-activity-form-block-assignee_contact_id', 'You can optionally assign this activity to someone', 'Help text is missing.');
// Putting the contents into subject field - assigning the text to variable, it'll come in handy later
$subject = "This is subject of test activity being added through activity tab of contact summary screen.";
// For simple input fields we can use field id as selector
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "Activity '$subject' has been saved.", "Status message didn't show up after saving.");
+ $this->waitForText('crm-notification-container', $subject);
$this->waitForElementPresent("xpath=//div[@id='Activities']//table/tbody/tr[2]/td[9]/span/a[text()='View']");
$this->click("_qf_Activity_upload");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Activity '$subject' has been saved.", "Status message didn't show up after saving!");
+ $this->waitForText('crm-notification-container', $subject);
// check the resulting email
$mail = $mailer->getMostRecentEmail('ezc');
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom group created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field set '$customGroupTitle' has been added. You can add custom fields now.");
+ $this->waitForText('crm-notification-container', "Your custom field set '$customGroupTitle' has been added. You can add custom fields now.");
//add custom field - alphanumeric text
$textFieldLabel = 'test_text_field' . substr(sha1(rand()), 0, 3);
$this->click("header");
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$checkboxFieldLabel' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$checkboxFieldLabel' has been saved.");
//create another custom field - Number Radio
$this->click("data_type[0]");
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$radioFieldLabel' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$radioFieldLabel' has been saved.");
//On New Individual contact form
$this->openCiviPage("contact/add", "ct=Individual&reset=1");
$this->waitForPageToLoad($this->getTimeoutMsec());
//assert that the success text is present
- $this->assertElementContainsText('crm-notification-container', "has been moved", "Move field success message not displayed");
+ $this->waitForText('crm-notification-container', "has been moved");
//assert that the custom field not on old data set page
$this->waitForElementPresent("_qf_Field_cancel-bottom");
//Is custom group created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.", "Group title missing");
+ $this->waitForText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
$url = $this->parseURL();
$group_id = $url['queryString']['gid'];
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$fieldLabel' has been saved.", "Field was not created successfully");
+ $this->waitForText('crm-notification-container', "Your custom field '$fieldLabel' has been saved.");
//get the custom id of the custom field that was just created
$results = $this->webtest_civicrm_api("CustomField", "get", array('label' => $fieldLabel, 'custom_group_id' => $group_id));
$this->waitForPageToLoad($this->getTimeoutMsec());
//assert success
- $this->assertElementContainsText('crm-notification-container', "has been updated", "Contact Record could not be saved");
+ $this->waitForText('crm-notification-container', "has been updated");
}
}
$this->waitForPageToLoad($this->getTimeoutMsec());
//does data saved.
- $this->assertElementContainsText('crm-notification-container', 'The Relationship Type has been saved.',
- "Status message didn't show up after saving!"
- );
+ $this->waitForText('crm-notification-container', 'The Relationship Type has been saved.');
//validate data.
$data = array(
$this->click('_qf_RelationshipType_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', 'Relationship Label-A to B is a required field.',
- 'Required form rule for Label A - B seems to be broken.'
- );
+ $this->waitForText('crm-notification-container', 'Relationship Label-A to B is a required field.');
//enter the relationship type values.
$labelAB = 'Test Relationship Type A - B - DUPLICATE TO BE' . rand();
$this->click('_qf_RelationshipType_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', 'Label already exists in Database.',
- 'Unique relationship type label form rule seems to be broken.'
- );
+ $this->waitForText('crm-notification-container', 'Label already exists in Database.');
}
}
$this->click("_qf_Campaign_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Campaign Campaign $title has been saved.",
-
- "Status message didn't show up after saving campaign!"
- );
+ $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->type("followup_activity_subject", "This is subject of schedule follow-up activity");
// Clicking save.
- $this->click("_qf_Activity_upload");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Activity_upload");
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "Activity '$subject' has been saved.", "Status message didn't show up after saving!");
+ $this->waitForText('crm-notification-container', $subject);
$this->waitForElementPresent("xpath=//div[@id='Activities']//table/tbody/tr[1]/td[9]/span/a[text()='View']");
$this->click("_qf_Campaign_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Campaign Campaign $title has been saved.",
- "Status message didn't show up after saving campaign!"
- );
+ $this->waitForText('crm-notification-container', "Campaign $title");
//Opening Edit Page of the created Campaign
$this->waitForElementPresent("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody//tr/td[text()='{$campaignTitle}']/../td[13]/span/a[text()='Edit']");
$this->click("_qf_Campaign_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Campaign Campaign $title has been saved.",
- "Status message didn't show up after saving campaign!"
- );
+ $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->click("_qf_Campaign_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Campaign Campaign $title has been saved.",
- "Status message didn't show up after saving campaign!"
- );
+ $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->click("_qf_Campaign_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Campaign $campaignTitle has been saved.",
- "Status message didn't show up after saving campaign!"
- );
+ $this->waitForText('crm-notification-container', "Campaign $title");
$this->waitForElementPresent("xpath=//div[@id='campaignList']/div[@id='campaigns_wrapper']/table[@id='campaigns']/tbody//tr/td[text()='$campaignTitle']");
$url = explode('id=', $this->getAttribute("xpath=//div[@id='campaignList']/div[@id='campaigns_wrapper']/table[@id='campaigns']/tbody//tr/td[text()='$campaignTitle']/../td[13]/span/a[text()='Edit']@href"));
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "The contribution record has been saved");
+ $this->waitForText('crm-notification-container', "The contribution record has been saved");
$this->waitForElementPresent("xpath=//div[@id='Contributions']//table/tbody/tr/td[8]/span/a[text()='View']");
$this->click("_qf_Campaign_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Campaign Campaign $title has been saved.",
- "Status message didn't show up after saving campaign!"
- );
+ $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->click("_qf_Campaign_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Campaign Campaign $title has been saved.",
- "Status message didn't show up after saving campaign!"
- );
+ $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->select("address_1_state_province_id", "value=1004");
$this->type("email_1_email", "info@civicrm.org");
- $this->click("_qf_Location_upload-bottom");
+ $this->clickLink("_qf_Location_upload-bottom");
// Wait for "saved" status msg
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForTextPresent("'Location' information has been saved.");
+ $this->waitForText('crm-notification-container', "saved");
}
function _testAddFees($discount = FALSE, $priceSet = FALSE, $processorId) {
// Wait for "saved" status msg
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForTextPresent("'Fee' information has been saved.");
+ $this->waitForText('crm-notification-container', "saved");
}
function _testAddOnlineRegistration($registerIntro, $multipleRegistrations = FALSE) {
$this->click("_qf_Registration_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForTextPresent("'Registration' information has been saved.");
+ $this->waitForText('crm-notification-container', "saved");
}
function _testVerifyEventInfo($eventTitle, $eventInfoStrings) {
$this->click("_qf_Campaign_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText("crm-notification-container", "$title");
+ $this->waitForText('crm-notification-container', "$title");
// create a custom data set for activities -> survey
$this->openCiviPage('admin/custom/group', "action=add&reset=1", "_qf_Group_next-bottom");
$this->click("_qf_Field_next-bottom");
$this->waitForElementPresent("newCustomField");
- $this->assertElementContainsText("crm-notification-container", "$title");
+ $this->waitForText('crm-notification-container', "$title");
// create a profile for campaign
$this->openCiviPage("admin/uf/group/add", "action=add&reset=1", "_qf_Group_next-bottom");
$this->click("_qf_Group_next-bottom");
$this->waitForElementPresent("_qf_Field_next-bottom");
- $this->assertElementContainsText("crm-notification-container", "$title");
+ $this->waitForText('crm-notification-container', "$title");
// add a profile field for activity
$this->select("field_name[0]", "value=Activity");
$this->click("_qf_Field_next-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText("crm-notification-container", "$title");
+ $this->waitForText('crm-notification-container', "$title");
// create a survey
$this->openCiviPage("survey/add", "reset=1", "_qf_Main_upload-bottom");
$this->type("//input[@id='option_value_2']", "2");
$this->click('_qf_Results_upload_done-bottom');
$this->waitForElementPresent("//div[@id='search_form_survey']");
- $this->assertElementContainsText("crm-notification-container", "Results");
+ $this->waitForText('crm-notification-container', "Results");
// Reserve Respondents
$this->openCiviPage("survey/search", "reset=1&op=reserve", "_qf_Search_refresh");
$this->waitForElementPresent("_qf_Reserve_done_reserve-bottom");
$this->click("_qf_Reserve_done_reserve-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText("crm-notification-container", "2");
+ $this->waitForText('crm-notification-container', "2");
// Interview Respondents
$this->openCiviPage("survey/search", "reset=1&op=interview", "_qf_Search_refresh");
$this->waitForElementPresent("_qf_Reserve_done_reserve-bottom");
$this->click("_qf_Reserve_done_reserve-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText("crm-notification-container", "Contact(s) have been reserved");
+ $this->waitForText('crm-notification-container', "Contact(s) have been reserved");
// Release Respondents
$this->openCiviPage("survey/search", "reset=1&op=release", "_qf_Search_refresh");
$this->waitForElementPresent("Go");
$this->clickLink("Go", "_qf_Release_done-bottom");
$this->clickLink("_qf_Release_done-bottom", 'access');
- $this->assertElementContainsText("crm-notification-container", "released");
+ $this->waitForText('crm-notification-container', "released");
// check whether contact is available for reserving again
$this->openCiviPage("survey/search", "reset=1&op=reserve", "_qf_Search_refresh");
$this->select('extends[0]', "value=Contact");
$this->click('_qf_Group_next-bottom');
$this->waitForElementPresent('_qf_Field_cancel-bottom');
- $this->assertElementContainsText("crm-notification-container", $customGroup);
+ $this->waitForText('crm-notification-container', $customGroup);
// Add custom fields
$field1 = "Checkbox $title";
$this->click('_qf_Field_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText("crm-notification-container", $field1);
+ $this->waitForText('crm-notification-container', $field1);
// Create a profile for survey
$this->openCiviPage("admin/uf/group", "reset=1");
$this->type('title', $surveyProfile);
$this->click('_qf_Group_next-bottom');
$this->waitForElementPresent('_qf_Field_cancel-bottom');
- $this->assertElementContainsText("crm-notification-container", $surveyProfile);
+ $this->waitForText('crm-notification-container', $surveyProfile);
// Add fields to the profile
// Phone ( Primary )
$this->waitForElementPresent('_qf_Reserve_done_reserve-bottom');
$this->clickLink('_qf_Reserve_done_reserve-bottom', 'access');
- $this->assertElementContainsText("crm-notification-container", "2");
+ $this->waitForText('crm-notification-container', "2");
$this->openCiviPage("report/survey/detail", "reset=1", '_qf_SurveyDetails_submit');
$this->clickLink('_qf_Case_upload-bottom', '_qf_CaseView_cancel-bottom');
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "Case opened successfully.", "Save successful status message didn't show up after saving!");
+ $this->waitForText('crm-notification-container', "Case opened successfully.");
$customGroupTitle = 'Custom_' . substr(sha1(rand()), 0, 7);
$this->_testAddNewActivity($firstName, $subject, $customGroupTitle, $contactName);
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "Activity '$subject' has been saved.",
- "Status message didn't show up after saving!"
- );
+ $this->waitForText('crm-notification-container', $subject);
// click through to the Activity view screen
$this->waitForElementPresent("xpath=//div[@id='Activities']//table/tbody/tr[2]/td[9]");
$this->waitForElementPresent('_qf_Field_cancel-bottom');
//Is custom group created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
+ $this->waitForText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
// create a custom field - Integer Radio
$this->click("data_type[0]");
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$radioFieldLabel' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$radioFieldLabel' has been saved.");
// create another custom field - text field
$this->click("//a[@id='newCustomField']/span");
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$textFieldLabel' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$textFieldLabel' has been saved.");
$textFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$textFieldLabel']/../../td[8]/span/a[text()='Edit Field']/@href"));
$textFieldId = $textFieldId[1];
$this->clickLink("_qf_Case_upload-bottom", "_qf_CaseView_cancel-bottom");
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "Case opened successfully.", "Save successful status message didn't show up after saving!");
+ $this->waitForText('crm-notification-container', "Case opened successfully.");
$summaryStrings = array(
"Case Summary",
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
}
function testHouseholdAdd() {
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
}
function testOrganizationAdd() {
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
}
function testIndividualAddWithSharedAddress() {
$this->click("_qf_Edit_next");
// Is new contact created?
- $this->assertElementContainsText('crm-notification-container', "$currentEmployer has been created.",
- "Status message didn't show up after saving!"
- );
+ $this->waitForText('crm-notification-container', "$currentEmployer has been created.");
//make sure shared address is selected
$this->waitForElementPresent('selected_shared_address-1');
$this->click("_qf_Edit_next");
// Is new contact created?
- $this->assertElementContainsText('crm-notification-container', "$sharedHousehold has been created.",
- "Status message didn't show up after saving!"
- );
+ $this->waitForText('crm-notification-container', "$sharedHousehold has been created.");
//make sure shared address is selected
$this->waitForElementPresent('selected_shared_address-2');
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
$name = $this->getText("xpath=//div[@class='crm-summary-display_name']");
- $this->assertElementContainsText('crm-notification-container', "$name has been created.");
+ $this->waitForText('crm-notification-container', "$name has been created.");
//make sure current employer is set
$this->verifyText("xpath=id('contactinfo-block')/div/div/div[2]/div", 'Employer');
// Clicking save.
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "{$firstName} {$lastName} has been created.");
+ $this->waitForText('crm-notification-container', "{$firstName} {$lastName} has been created.");
}
}
// is status message correct?
$this->waitForTextPresent("Saved");
- $this->assertElementContainsText('crm-notification-container', "Saved");
+ $this->waitForText('crm-notification-container', "Saved");
// go to event tab and register for event ( auto add activity and contribution )
$this->click("css=li#tab_participant a");
$this->type("trxn_id", "trid$firstName");
$this->click("_qf_Participant_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Event registration for $firstName adv$firstName has been added");
+ $this->waitForText('crm-notification-container', "Event registration for $firstName adv$firstName has been added");
// go to pledge tab and add pledge
$this->click("css=li#tab_pledge a");
$this->click("_qf_Pledge_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+ $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
// go to Membership tab and add membership
$this->click("css=li#tab_member a");
$this->click("_qf_Membership_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Student membership for $firstName adv$firstName has been added");
+ $this->waitForText('crm-notification-container', "Student membership for $firstName adv$firstName has been added");
// go to relationship tab and add relationship
$this->click("css=li#tab_rel a");
$this->webtestFillDate("end_date", "+1 day");
$this->click("details-save");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "New relationship created.");
+ $this->waitForText('crm-notification-container', "New relationship created.");
//-------------- advance search --------------
$this->click("_qf_AddToGroup_next-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Added Contacts to ".$groupName);
- $this->assertElementContainsText('crm-notification-container', '2 contacts added to group');
+ $this->waitForText('crm-notification-container', "Added Contacts to ".$groupName);
+ $this->waitForText('crm-notification-container', '2 contacts added to group');
$this->_testSearchResult($relType);
}
// Wait for "saved" status msg
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "'Location' information has been saved.");
+ $this->waitForText('crm-notification-container', "'Location' information has been saved.");
}
function _testAddFees($discount = FALSE, $priceSet = FALSE, $processorId) {
$this->waitForElementPresent("current-relationships");
//check the status message
- $this->assertElementContainsText('crm-notification-container', "New relationship created.");
+ $this->waitForText('crm-notification-container', "New relationship created.");
$this->waitForElementPresent("xpath=//div[@id='current-relationships']//div//table/tbody//tr/td[9]/span/a[text()='View']");
$this->click("xpath=//div[@id='current-relationships']//div//table/tbody//tr/td[9]/span/a[text()='View']");
$this->select('group_id', "label={$groupName}");
$this->click('_qf_GroupContact_next');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Added to Group");
+ $this->waitForText('crm-notification-container', "Added to Group");
// Individual 1
$contact2 = substr(sha1(rand()), 0, 7);
$this->waitForElementPresent("_qf_Field_cancel-bottom");
//Is custom group created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
+ $this->waitForText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
$matches = array();
preg_match('/gid=([0-9]+)/', $this->getLocation(), $matches);
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$contactRefFieldLabel1' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$contactRefFieldLabel1' has been saved.");
//add custom field - alphanumeric checkbox
$contactRefFieldLabel2 = 'contact_ref_' . substr(sha1(rand()), 0, 4);
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$contactRefFieldLabel2' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$contactRefFieldLabel2' has been saved.");
$this->openCiviPage('admin/custom/group/field', "reset=1&action=browse&gid={$customGroupId}");
$this->waitForElementPresent("_qf_Field_cancel-bottom");
//Is custom group created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
+ $this->waitForText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
//add custom field - alphanumeric checkbox
$checkboxFieldLabel = 'custom_field' . substr(sha1(rand()), 0, 4);
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$checkboxFieldLabel' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$checkboxFieldLabel' has been saved.");
//create another custom field - Integer Radio
$this->click("//a[@id='newCustomField']/span");
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$radioFieldLabel' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$radioFieldLabel' has been saved.");
// Go to the URL to create an Individual contact.
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$this->waitForElementPresent("_qf_Field_cancel-bottom");
//Is custom group created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
+ $this->waitForText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
//add custom field - money text
$moneyTextFieldLabel = 'money' . substr(sha1(rand()), 0, 4);
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$moneyTextFieldLabel' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$moneyTextFieldLabel' has been saved.");
//Get the customFieldsetID
$this->openCiviPage('admin/custom/group', 'reset=1');
$this->click("id=collapse_display");
$this->click("id=_qf_Group_next-bottom");
$this->waitForElementPresent('_qf_Field_next-bottom');
- $this->assertElementContainsText('crm-notification-container', "Your custom field set '$customFieldSet' has been added.");
+ $this->waitForText('crm-notification-container', "Your custom field set '$customFieldSet' has been added.");
// Add field to fieldset
$customField = 'CustomField' . rand();
$this->select("id=data_type_0", "value=0");
$this->click("id=_qf_Field_next-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$customField' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$customField' has been saved.");
$this->openCiviPage('contact/add', 'reset=1&ct=Individual');
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "{$firstName} {$lastName} has been created.");
+ $this->waitForText('crm-notification-container', "{$firstName} {$lastName} has been created.");
//Update the custom field
$this->click("css=a.edit.button");
$this->select('group_id', "label={$groupName}");
$this->click('_qf_RemoveFromGroup_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "2 contacts removed from '{$groupName}'");
+ $this->waitForText('crm-notification-container', "2 contacts removed from '{$groupName}'");
// Search for the contacts who are not deceased
$this->openCiviPage('contact/search/advanced', 'reset=1', '_qf_Advanced_refresh');
// Clicking save.
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
$this->openCiviPage('contact/add' , 'reset=1&ct=Individual');
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "The Group '{$params['name']}' has been saved.");
+ $this->waitForText('crm-notification-container', "The Group '{$params['name']}' has been saved.");
$this->openCiviPage('group', 'reset=1');
$this->type('title', $params['name']);
// Clicking save.
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
// Add Contact to a group
$group = 'Newsletter Subscribers';
$this->select('group_id', "label=$group");
$this->click('_qf_GroupContact_next');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Added to Group");
+ $this->waitForText('crm-notification-container', "Added to Group");
// Add Tags to the contact
$tag = 'Government Entity';
$this->assertTrue($this->isTextPresent("One matching contact was found. You can View or Edit the existing contact."));
$this->click("_qf_Contact_upload_duplicate");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
// Add second pair of dupes so we can test Merge and Goto Next Pair
$fname2 = 'Janet';
$this->assertTrue($this->isTextPresent("One matching contact was found. You can View or Edit the existing contact."));
$this->click("_qf_Contact_upload_duplicate");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
// Find and Merge Contacts with Supervised Rule
$this->openCiviPage("contact/dedupefind", "reset=1&rgid=1&action=renew");
// Clicking save.
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
// contact2: duplicate of contact1.
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$this->assertTrue($this->isTextPresent("One matching contact was found. You can View or Edit the existing contact."));
$this->click("_qf_Contact_upload_duplicate");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
// Find and Merge Contacts with Supervised Rule
$this->openCiviPage("contact/dedupefind", "reset=1&rgid=1&action=renew");
// Clicking save.
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
// contact2: duplicate of contact1.
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$this->assertTrue($this->isTextPresent("One matching contact was found. You can View or Edit the existing contact."));
$this->click("_qf_Contact_upload_duplicate");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
// Find and Merge Contacts with Supervised Rule
$this->openCiviPage("contact/dedupefind", "reset=1&rgid=1&action=renew");
//Clicking save.
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
//duplicate of contact2.
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$this->assertTrue($this->isTextPresent("One matching contact was found. You can View or Edit the existing contact."));
$this->click("_qf_Contact_upload_duplicate");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
// add contact3 and its duplicate
//fill in first name
$this->chooseOkOnNextConfirmation();
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->waitForElementPresent('civicrm-footer');
- $this->assertElementContainsText('crm-notification-container', "safe mode");
+ $this->waitForText('crm-notification-container', "safe mode");
// If we are still on the dedupe table page, count unmerged contacts
if ($this->isElementPresent("//table[@class='pagerDisplay']")) {
// Clicking save.
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
//duplicate of above contact.
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$this->assertTrue($this->isTextPresent("One matching contact was found. You can View or Edit the existing contact."));
$this->click("_qf_Contact_upload_duplicate");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
}
}
$this->waitForPageToLoad($this->getTimeoutMsec());
//checking the contact sub-type of newly created individual
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
$this->assertElementContainsText('css=.crm-contact_type_label', "Student");
$this->assertElementContainsText('css=.crm-contact_type_label', "Parent");
$this->waitForPageToLoad($this->getTimeoutMsec());
// Verify contact types
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
$this->assertElementNotContainsText('css=.crm-contact_type_label', "Student");
$this->assertElementContainsText('css=.crm-contact_type_label', "Staff");
$this->assertElementContainsText('css=.crm-contact_type_label', "Parent");
$this->select('group_id', "label={$groupName}");
$this->click('_qf_GroupContact_next');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Added to Group");
+ $this->waitForText('crm-notification-container', "Added to Group");
// Individual 2
$contact2 = substr(sha1(rand()), 0, 7);
$this->select('group_id', "label={$groupName}");
$this->click('_qf_GroupContact_next');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Added to Group");
+ $this->waitForText('crm-notification-container', "Added to Group");
// Individual 3
$contact3 = substr(sha1(rand()), 0, 7);
$this->select('group_id', "label={$groupName}");
$this->click('_qf_GroupContact_next');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Added to Group");
+ $this->waitForText('crm-notification-container', "Added to Group");
// Search contacts
$this->openCiviPage('contact/search', 'reset=1', '_qf_Basic_refresh');
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
// Go for Ckeck Your Editor, Click on Send Mail
$this->click("//a[@id='crm-contact-actions-link']/span");
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertElementContainsText("crm-notification-container", "{$name} has been updated.");
+ $this->waitForText('crm-notification-container', "{$name} has been updated.");
// Go for Ckeck Your Editor, Click on Send Mail
$this->click("//a[@id='crm-contact-actions-link']/span");
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "The tag '$tagSetName' has been saved.");
+ $this->waitForText('crm-notification-container', "The tag '$tagSetName' has been saved.");
// sort by ID desc
$this->click("xpath=//table//tr/th[text()=\"ID\"]");
$this->waitForPageToLoad($this->getTimeoutMsec());
// Check status messages are as expected
- $this->assertElementContainsText('crm-notification-container', "Added Contacts to {$newGroupName}");
- $this->assertElementContainsText('crm-notification-container', "2 contacts added to group");
+ $this->waitForText('crm-notification-container', "Added Contacts to {$newGroupName}");
+ $this->waitForText('crm-notification-container', "2 contacts added to group");
// Search by group membership in newly created group
$this->openCiviPage('contact/search/advanced', 'reset=1');
$this->waitForPageToLoad($this->getTimeoutMsec());
// Check status messages are as expected
- $this->assertElementContainsText('crm-notification-container', "Added Contacts to {$newGroupName}");
- $this->assertElementContainsText('crm-notification-container', "50 contacts added to group");
+ $this->waitForText('crm-notification-container', "Added Contacts to {$newGroupName}");
+ $this->waitForText('crm-notification-container', "50 contacts added to group");
$this->openCiviPage('contact/search/advanced', 'reset=1');
$this->select("crmasmSelect1", "label=" . $newGroupName);
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
$this->click('css=li#tab_group a');
$this->waitForElementPresent('_qf_GroupContact_next');
$this->select('group_id', "label=$smsGroupName");
$this->click('_qf_GroupContact_next');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Added to Group");
+ $this->waitForText('crm-notification-container', "Added to Group");
// ADD contact2
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
$this->click('css=li#tab_group a');
$this->waitForElementPresent('_qf_GroupContact_next');
$this->select('group_id', "label=$smsGroupName");
$this->click('_qf_GroupContact_next');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Added to Group");
+ $this->waitForText('crm-notification-container', "Added to Group");
// Do an advanced search
$this->click("css=ul#civicrm-menu li.crm-Search");
// Clicking save.
$this->clickLink("_qf_Contribution_upload-bottom", 'civicrm-footer');
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "The contribution record has been saved");
+ $this->waitForText('crm-notification-container', "The contribution record has been saved");
$this->waitForElementPresent("xpath=//div[@id='Contributions']//table/tbody/tr/td[8]/span/a[text()='View']");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->click('_qf_Field_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Selected Profile Field has been deleted.");
+ $this->waitForText('crm-notification-container', "Selected Profile Field has been deleted.");
}
function _testOrganizationWithImageUpload($pageId, $cid, $pageTitle) {
// Wait for "saved" status msg
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText("crm-notification-container", "'Fee' information has been saved");
+ $this->waitForText('crm-notification-container', "'Fee' information has been saved");
return array($discount1, $discount2);
}
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertElementContainsText("crm-notification-container", "Event registration for $displayName has been added", "Status message didn't show up after saving!");
+ $this->waitForText('crm-notification-container', "Event registration for $displayName has been added");
$this->waitForElementPresent("xpath=//div[@id='Events']//table//tbody/tr[1]/td[8]/span/a[text()='View']");
//click through to the participant view screen
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom group created?
- $this->assertElementContainsText("crm-notification-container", "Your custom field set '$customGroupTitle' has been added. You can add custom fields now.");
+ $this->waitForText('crm-notification-container', "Your custom field set '$customGroupTitle' has been added. You can add custom fields now.");
//add custom field - alphanumeric checkbox
$checkboxFieldLabel = 'custom_field' . substr(sha1(rand()), 0, 4);
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created?
- $this->assertElementContainsText("crm-notification-container", "Your custom field '$checkboxFieldLabel' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$checkboxFieldLabel' has been saved.");
//create another custom field - Integer Radio
$this->click("//a[@id='newCustomField']/span");
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertElementContainsText("crm-notification-container", "Event registration for $displayName has been added", "Status message didn't show up after saving!");
+ $this->waitForText('crm-notification-container', "Event registration for $displayName has been added");
$this->waitForElementPresent("xpath=//div[@id='Events']//table//tbody/tr[1]/td[8]/span/a[text()='View']");
//click through to the participant view screen
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "The Group '$groupName' has been saved.");
+ $this->waitForText('crm-notification-container', "The Group '$groupName' has been saved.");
}
}
$this->click('_qf_FinancialTypeAccount_next_new');
$this->waitForPageToLoad($this->getTimeoutMsec());
$text = 'The financial type Account has been saved.';
- $this->assertElementContainsText('crm-notification-container', $text, 'Missing text: ' . $text);
- $this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text);
+ $this->waitForText('crm-notification-container', $text);
$text = 'You can add another Financial Account Type.';
- $this->assertElementContainsText('crm-notification-container', $text, 'Missing text: ' . $text);
- $this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text);
+ $this->waitForText('crm-notification-container', $text);
$accountRelationship = 'Expense Account is';
$expected[] = array(
-
'financial_account' => 'Banking Fees',
-
'account_relationship' => $accountRelationship
-
);
$this->select('account_relationship', "label={$accountRelationship}");
$this->select('financial_account_id', "label=Banking Fees");
$this->click('_qf_FinancialTypeAccount_next');
- $this->waitForElementPresent( 'newfinancialTypeAccount');
+ $this->waitForElementPresent('newfinancialTypeAccount');
$text = 'The financial type Account has been saved.';
- $this->assertElementContainsText('crm-notification-container', $text, 'Missing text: ' . $text);
- $this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text);
+ $this->waitForText('crm-notification-container', $text);
foreach ($expected as $value => $label) {
$this->verifyText("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='$label[financial_account]']/../td[2]", preg_quote($label['account_relationship']));
$this->clickLink("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='Accounts Receivable']/../td[7]/span/a[text()='Delete']", '_qf_FinancialTypeAccount_next-botttom');
$this->click('_qf_FinancialTypeAccount_next-botttom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', 'Selected financial type account has been deleted.', 'Missing text: ' . 'Selected financial type account has been deleted.');
+ $this->waitForText('crm-notification-container', 'Selected financial type account has been deleted.');
//edit financial type
$financialType['oldname'] = $financialType['name'];
$this->type('id=label', $grantType);
$this->click('id=_qf_Options_next-top');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "The Grant Type '$grantType' has been saved.");
+ $this->waitForText('crm-notification-container', "The Grant Type '$grantType' has been saved.");
// Create new Custom Field Set that extends the grant type
$this->openCiviPage('admin/custom/group', 'reset=1');
$this->click('id=collapse_display');
$this->click('id=_qf_Group_next-bottom');
$this->waitForElementPresent('_qf_Field_next-bottom');
- $this->assertElementContainsText('crm-notification-container', "Your custom field set '$grantFieldSet' has been added.");
+ $this->waitForText('crm-notification-container', "Your custom field set '$grantFieldSet' has been added.");
// Add field to fieldset
$grantField = 'GrantField' . $rand;
$this->select('id=data_type_0', 'label=Money');
$this->click('id=_qf_Field_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$grantField' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$grantField' has been saved.");
// Create new Grant
$this->openCiviPage('grant/add', 'reset=1&action=add&context=standalone', '_qf_Grant_upload-bottom');
$this->waitForElementPresent('_qf_Field_cancel-bottom');
//Is custom group created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
+ $this->waitForText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
$url = explode('gid=', $this->getLocation());
$gid = $url[1];
$this->click('_qf_Field_next-bottom');
$this->waitForElementPresent('newCustomField');
- $this->assertElementContainsText('crm-notification-container',"Your custom field '{$customField}' has been saved.");
+ $this->waitForText('crm-notification-container',"Your 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];
// clicking save
$this->click('_qf_Field_next-bottom');
$this->waitForElementPresent('newCustomField');
- $this->assertElementContainsText('crm-notification-container', "Your custom field '{$customField1}' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '{$customField1}' has been saved.");
$customFieldId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField1']/../../td[8]/span/a@href"));
$customFieldId1 = $customFieldId1[1];
// clicking save
$this->click('_qf_Field_next-bottom');
$this->waitForElementPresent('newCustomField');
- $this->assertElementContainsText('crm-notification-container', "Your custom field '{$customField2}' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '{$customField2}' has been saved.");
$customFieldId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField2']/../../td[8]/span/a@href"));
$customFieldId2 = $customFieldId2[1];
// clicking save
$this->click('_qf_Field_next-bottom');
$this->waitForElementPresent('newCustomField');
- $this->assertElementContainsText('crm-notification-container', "Your custom field '{$customField9}' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '{$customField9}' has been saved.");
$customFieldId9 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField9']/../../td[8]/span/a@href"));
$customFieldId9 = $customFieldId9[1];
// clicking save
$this->click('_qf_Field_next-bottom');
$this->waitForElementPresent('newCustomField');
- $this->assertElementContainsText('crm-notification-container', "Your custom field '{$customField10}' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '{$customField10}' has been saved.");
$customFieldId10 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField10']/../../td[8]/span/a@href"));
$customFieldId10 = $customFieldId10[1];
// clicking save
$this->click('_qf_Field_next-bottom');
$this->waitForElementPresent('newCustomField');
- $this->assertElementContainsText('crm-notification-container', "Your custom field '{$customFieldName}' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '{$customFieldName}' has been saved.");
$customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customFieldName']/../../td[8]/span/a@href"));
$customFieldId = $customFieldId[1];
return $customFieldId;
// Clicking save.
$this->click('_qf_Contact_upload_view');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
$existingContact = array(
'first_name' => $firstName,
// Clicking save.
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
return $externalId;
}
$this->click("_qf_Registration_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Saved");
+ $this->waitForText('crm-notification-container', "Saved");
// verify event input on info page
// start at Manage Events listing
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct
- $this->assertElementContainsText('crm-notification-container', "The Message Template '$msgTitle' has been saved.");
+ $this->waitForText('crm-notification-container', "The Message Template '$msgTitle' has been saved.");
// Verify text.
$this->assertTrue($this->isElementPresent("xpath=id('user')/div[2]/div/table/tbody//tr/td[1][contains(text(), '$msgTitle')]"),
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct.
- $this->assertElementContainsText('crm-notification-container', "The mailing component '$componentName' has been saved.");
+ $this->waitForText('crm-notification-container', "The mailing component '$componentName' has been saved.");
// Verify text.
$this->assertTrue($this->isElementPresent("xpath=//table/tbody//tr/td[text()='{$componentName}']/../td[2][text()='Header']/../td[3][text()='{$subject}']/../td[4][text()='{$txtMsg}']/../td[5][text()='{$htmlMsg}']"), "The row doesn't consists of proper component details");
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct.
- $this->assertElementContainsText('crm-notification-container', "The mailing component '$componentName' has been saved.");
+ $this->waitForText('crm-notification-container', "The mailing component '$componentName' has been saved.");
// Verify text.
$this->assertTrue($this->isElementPresent("xpath=//table/tbody//tr/td[text()='{$componentName}']/../td[2][text()='Footer']/../td[3][text()='{$subject}']/../td[4][text()='{$txtMsg}']/../td[5][text()='{$htmlMsg}']"), "The row doesn't consists of proper component details");
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct.
- $this->assertElementContainsText('crm-notification-container', "The mailing component '$componentName' has been saved.");
+ $this->waitForText('crm-notification-container', "The mailing component '$componentName' has been saved.");
// Verify text
$this->assertTrue($this->isElementPresent("xpath=//table/tbody//tr/td[text()='{$componentName}']/../td[2][text()='Reply']/../td[3][text()='{$subject}']/../td[4][text()='{$txtMsg}']/../td[5][text()='{$htmlMsg}']"), "The row doesn't consists of proper component details");
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "The Group '$groupName' has been saved.");
+ $this->waitForText('crm-notification-container', "The Group '$groupName' has been saved.");
//---- create mailing contact and add to mailing Group
$firstName = substr(sha1(rand()), 0, 7);
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "The Group '$groupName' has been saved.");
+ $this->waitForText('crm-notification-container', "The Group '$groupName' has been saved.");
//---- create mailing contact and add to mailing Group
$firstName = substr(sha1(rand()), 0, 7);
// Add membership for this individual
$this->_addMembership($memTypeParams);
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "membership for $firstName1 $lastName has been added.",
- "Status message didn't show up after saving!");
+ $this->waitForText('crm-notification-container', "membership for $firstName1 $lastName has been added");
// click through to the membership view screen
$this->click("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
$this->_addMembership($memTypeParams);
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "membership for $firstName2 $lastName has been added.",
- "Status message didn't show up after saving!");
+ $this->waitForText('crm-notification-container', "membership for $firstName2 $lastName has been added.");
// click through to the membership view screen
$this->click("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
$this->click('_qf_Group_next-bottom');
$this->waitForElementPresent('_qf_Field_cancel-bottom');
- $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
+ $this->waitForText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
$this->select('field_name[0]', "value=Membership");
$this->select('field_name[1]', "label={$customDataParams[0]} :: {$customDataParams[1]}");
// Clicking save and new
$this->click('_qf_Field_next_new-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile Field '{$customDataParams[0]}' has been saved to '{$profileTitle}'.");
+ $this->waitForText('crm-notification-container', "Your CiviCRM Profile Field '{$customDataParams[0]}' has been saved to '{$profileTitle}'.");
// Add membership status field to profile - CRM-8618
$this->select('field_name[0]', "value=Membership");
// Clicking save
$this->click('_qf_Field_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile Field 'Membership Status' has been saved to '{$profileTitle}'.");
+ $this->waitForText('crm-notification-container', "Your CiviCRM Profile Field 'Membership Status' has been saved to '{$profileTitle}'.");
}
function _addCustomData() {
$this->waitForElementPresent('_qf_Field_cancel-bottom');
//Is custom group created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
+ $this->waitForText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
$textFieldLabel = 'Custom Field Text_' . substr(sha1(rand()), 0, 4);
$this->type('label', $textFieldLabel);
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$textFieldLabel' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$textFieldLabel' has been saved.");
return array($textFieldLabel, $customGroupTitle);
}
// Clicking save.
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "$firstName $lastName has been created.");
+ $this->waitForText('crm-notification-container', "$firstName $lastName");
// click through to the membership view screen
$this->click("css=li#tab_member a");
$this->waitForTextPresent($sourceText);
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "membership for $firstName $lastName has been added.",
- "Status message didn't show up after saving!");
+ $this->waitForText('crm-notification-container', "membership for $firstName $lastName has been added.");
// click through to the membership view screen
$this->click("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
// Clicking save.
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "$firstName $lastName has been created.");
+ $this->waitForText('crm-notification-container', "$firstName $lastName has been created.");
// click through to the membership view screen
$this->click("css=li#tab_member a");
$this->waitForTextPresent($sourceText);
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "membership for $firstName $lastName has been added.",
- "Status message didn't show up after saving!");
+ $this->waitForText('crm-notification-container', "membership for $firstName $lastName has been added.");
// click through to the membership view screen
$this->click("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
$this->type('email_1_email', "$title@org.com");
$this->click('_qf_Contact_upload_view');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Organization {$title} has been created.");
+ $this->waitForText('crm-notification-container', "Organization {$title} has been created.");
$this->openCiviPage('admin/member/membershipType', 'reset=1&action=browse');
$this->click('_qf_MembershipType_upload-bottom');
$this->waitForElementPresent('link=Add Membership Type');
- $this->assertElementContainsText('crm-notification-container', "The membership type 'Membership Type $title' has been saved.");
+ $this->waitForText('crm-notification-container', "Membership Type $title");
$this->openCiviPage('contact/add', 'reset=1&ct=Organization', '_qf_Contact_cancel');
$this->waitForTextPresent($sourceText);
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "Membership Type $title membership for Organization $title1 has been added.",
- "Status message didn't show up after saving!");
+ $this->waitForText('crm-notification-container', "Membership Type $title");
// click through to the membership view screen
$this->click("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
$this->click('quick-save');
$this->waitForElementPresent('current-relationships');
//check the status message
- $this->assertElementContainsText('crm-notification-container', 'New relationship created.');
+ $this->waitForText('crm-notification-container', 'New relationship created');
$this->waitForElementPresent("xpath=//div[@id='current-relationships']//div//table/tbody//tr/td[9]/span/a[text()='View']");
$this->click('_qf_Relationship_upload');
$this->waitForElementPresent('inactive-relationships');
//check the status message
- $this->assertElementContainsText('crm-notification-container', 'Relationship record has been updated.');
+ $this->waitForText('crm-notification-container', 'Relationship record has been updated');
// click through to the membership view screen
$this->click('css=li#tab_member a');
$this->click('_qf_Relationship_upload');
$this->waitForElementPresent('current-relationships');
//check the status message
- $this->assertElementContainsText('crm-notification-container', 'Relationship record has been updated.');
+ $this->waitForText('crm-notification-container', 'Relationship record has been updated.');
//check for memberships
$this->click('css=li#tab_member a');
$this->waitForElementPresent('_qf_Field_next-bottom');
$this->click('_qf_Field_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Price Field '{$fields[0]}' has been saved.");
+ $this->waitForText('crm-notification-container', "Price Field '{$fields[0]}' has been saved.");
// load the Price Set Preview and check for expected values
$this->_testVerifyPriceSet($validateStrings, $sid);
$this->click('_qf_Set_next-bottom');
$this->waitForElementPresent('_qf_Field_next-bottom');
- $this->assertElementContainsText('crm-notification-container', "Your Set '{$setTitle}' has been added. You can add fields to this set now.");
+ $this->waitForText('crm-notification-container', "Your Set '{$setTitle}' has been added. You can add fields to this set now.");
}
function _testAddPriceFields(&$fields, &$validateString, $dateSpecificFields = FALSE, $title, $sid, $contributionType) {
$this->select("financial_type_id", "label={$contributionType}");
$this->click('_qf_Field_next_new-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Price Field '{$label}' has been saved.");
+ $this->waitForText('crm-notification-container', "Price Field '{$label}' has been saved.");
}
return array($memTypeTitle1, $memTypeTitle2);
}
$this->waitForTextPresent($sourceText);
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.",
- "Status message didn't show up after saving!"
- );
+ $this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
$this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
$this->waitForTextPresent($sourceText);
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.",
- "Status message didn't show up after saving!"
- );
+ $this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
$this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
$this->waitForTextPresent($sourceText);
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.",
- "Status message didn't show up after saving!"
- );
+ $this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
$this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[7]/span[2][text()='more']/ul/li/a[text()='Renew']");
$this->waitForTextPresent($sourceText);
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.",
- "Status message didn't show up after saving!"
- );
- $this->assertElementContainsText('crm-notification-container', "A membership confirmation and receipt has been sent to {$firstName}@memberson.com.",
- "Email sent to member message didn't show up after saving membership!"
- );
+ $this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
+ $this->waitForText('crm-notification-container', "A membership confirmation and receipt has been sent to {$firstName}@memberson.com.");
$this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
$this->waitForElementPresent('_qf_Field_next-bottom');
$this->click('_qf_Field_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Price Field '{$fields[0]}' has been saved.");
+ $this->waitForText('crm-notification-container', "Price Field '{$fields[0]}' has been saved.");
// load the Price Set Preview and check for expected values
$this->_testVerifyPriceSet($validateStrings, $sid);
$this->assertChecked('is_active', 'Verify that Is Active checkbox is set.');
$this->clickLink('_qf_Set_next-bottom', '_qf_Field_next-bottom');
- $this->assertElementContainsText('crm-notification-container', "Your Set '{$setTitle}' has been added. You can add fields to this set now.");
+ $this->waitForText('crm-notification-container', "Your Set '{$setTitle}' has been added. You can add fields to this set now.");
}
function _testAddPriceFields(&$fields, &$validateString, $dateSpecificFields = FALSE, $title, $sid, $contributionType) {
}
$this->select("financial_type_id", "label={$contributionType}");
$this->clickLink('_qf_Field_next_new-bottom', '_qf_Field_next-bottom');
- $this->assertElementContainsText('crm-notification-container', "Price Field '{$label}' has been saved.");
+ $this->waitForText('crm-notification-container', "Price Field '{$label}' has been saved.");
}
return array($memTypeTitle1, $memTypeTitle2);
}
$this->click("membership_type_$memTypeId2");
$this->clickLink('_qf_MembershipBlock_next', '_qf_MembershipBlock_next-bottom');
$text = "'MembershipBlock' information has been saved.";
- $this->assertElementContainsText('crm-notification-container', $text, 'Missing text: ' . $text);
+ $this->waitForText('crm-notification-container', $text);
//logout
$this->webtestLogout();
$firstName1 = 'Ma_' . substr(sha1(rand()), 0, 7);
$lastName1 = 'An_' . substr(sha1(rand()), 0, 7);
$this->webtestAddContact($firstName1, $lastName1, TRUE);
- $this->assertElementContainsText('crm-notification-container', "$firstName1 $lastName1 has been created.");
+ $this->waitForText('crm-notification-container', "$firstName1 $lastName1 has been created.");
$url = explode('&cid=', $this->getLocation());
$cid = $url[1];
$this->click("membership_type_$memTypeId2");
$this->clickLink('_qf_MembershipBlock_next', '_qf_MembershipBlock_next-bottom');
$text = "'MembershipBlock' information has been saved.";
- $this->assertElementContainsText('crm-notification-container', $text, 'Missing text: ' . $text);
+ $this->waitForText('crm-notification-container', $text);
$this->_testOnlineMembershipSignup($pageId, $memTypeTitle1, $cid);
//Find Member
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertElementContainsText('crm-notification-container', "{$memTypeParams['membership_type']} membership for $firstName Anderson has been added.",
- "Status message didn't show up after saving!"
- );
+ $this->waitForText('crm-notification-container', "{$memTypeParams['membership_type']} membership for $firstName Anderson has been added.");
// click through to the membership view screen
$this->waitForElementPresent("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]");
// Clicking save
$this->click('_qf_MembershipType_upload-bottom');
$this->waitForElementPresent('link=Add Membership Type');
- $this->assertElementContainsText('crm-notification-container', "The membership type '$title' has been saved.");
+ $this->waitForText('crm-notification-container', "The membership type '$title' has been saved.");
return $memTypeParams;
}
$this->click("_qf_Pledge_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+ $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
$this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span[1]/a[text()='View']");
//click through to the Pledge view screen
$this->click("_qf_Pledge_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+ $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
$this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
//click through to the Pledge view screen
$this->click("_qf_Pledge_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+ $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
$this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
//click through to the Pledge view screen
$this->click("_qf_Pledge_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+ $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
//Add payments
$this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
$this->click('_qf_Pledge_upload-bottom');
$this->waitForPageToLoad("30000");
- $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+ $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
// verify if Pledge is created
$this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
$this->click('_qf_Contribution_upload-bottom');
$this->waitForPageToLoad("30000");
- $this->assertElementContainsText('crm-notification-container', "The contribution record has been saved.");
+ $this->waitForText('crm-notification-container', "The contribution record has been saved.");
$this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
$this->click("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[1]/span/a");
$this->type('total_amount', '250.00');
$this->click('_qf_Contribution_upload-bottom');
$this->waitForPageToLoad("30000");
- $this->assertElementContainsText('crm-notification-container', "The contribution record has been saved.");
+ $this->waitForText('crm-notification-container', "The contribution record has been saved.");
$this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
$this->click("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[1]/span/a");
$this->type('total_amount', '170.00');
$this->click('_qf_Contribution_upload-bottom');
$this->waitForPageToLoad("30000");
- $this->assertElementContainsText('crm-notification-container', "The contribution record has been saved.");
+ $this->waitForText('crm-notification-container', "The contribution record has been saved.");
// delete the contribution associated with the 2nd payment
$this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
$this->click('_qf_Pledge_upload-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+ $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
// verify if Pledge is created
$this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
$this->click('_qf_Group_next-bottom');
$this->waitForElementPresent('_qf_Field_cancel-bottom');
- $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
+ $this->waitForText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
foreach ($customDataArr as $key => $customDataParams) {
$this->select('field_name[0]', "label={$profileFor}");
// Clicking save and new
$this->click('_qf_Field_next_new-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile Field '{$customDataParams[1]}' has been saved to '{$profileTitle}'.");
+ $this->waitForText('crm-notification-container', "Your CiviCRM Profile Field '{$customDataParams[1]}' has been saved to '{$profileTitle}'.");
}
}
$this->waitForElementPresent('_qf_Field_cancel-bottom');
//Is custom group created?
- $this->assertElementContainsText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
+ $this->waitForText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
//for checkbox 1
$checkLabel1 = 'Custom Check One Text_' . substr(sha1(rand()), 0, 4);
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$checkLabel1' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$checkLabel1' has been saved.");
$returnArray[1] = array($customGroupTitle, $checkLabel1);
// create another custom field - Integer Radio
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$checkLabel2' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$checkLabel2' has been saved.");
$returnArray[2] = array($customGroupTitle, $checkLabel2);
// create another custom field - Integer Radio
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$dateFieldLabel' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$dateFieldLabel' has been saved.");
$returnArray[3] = array($customGroupTitle, $dateFieldLabel);
// create another custom field - Integer Radio
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$richTextField' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$richTextField' has been saved.");
$returnArray[4] = array($customGroupTitle, $richTextField);
// create another custom field - Integer Radio
$this->waitForPageToLoad($this->getTimeoutMsec());
//Is custom field created
- $this->assertElementContainsText('crm-notification-container', "Your custom field '$radioLabel2' has been saved.");
+ $this->waitForText('crm-notification-container', "Your custom field '$radioLabel2' has been saved.");
$returnArray[6] = array($customGroupTitle, $radioLabel2);
return $returnArray;
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
$individualName = $this->getText("xpath=//div[@class='crm-summary-display_name']");
- $this->assertElementContainsText('crm-notification-container', "$individualName has been created.");
+ $this->waitForText('crm-notification-container', "$individualName has been created.");
// submit dupe using profile/create as anonymous
$this->openCiviPage('profile/create', 'gid=4&reset=1', '_qf_Edit_next');
$this->waitForPageToLoad($this->getTimeoutMsec());
//check for profile create
- $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
+ $this->waitForText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
//Add field to profile
$this->waitForElementPresent('field_name[0]');
$this->waitForPageToLoad($this->getTimeoutMsec());
//check for profile create
- $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
+ $this->waitForText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
//Add field to profile
$this->click('field_name[0]');
$this->waitForElementPresent('_qf_Group_next-bottom');
$this->click('_qf_Group_next-bottom');
$this->waitForElementPresent('newCiviCRMProfile-bottom');
- $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been deleted.");
+ $this->waitForText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been deleted.");
}
}
$this->waitForPageToLoad($this->getTimeoutMsec());
//check for profile create
- $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
+ $this->waitForText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
//Add email field to profile
$this->click('field_name[0]');
$this->waitForElementPresent('_qf_Group_next-bottom');
$this->click('_qf_Group_next-bottom');
$this->waitForElementPresent('newCiviCRMProfile-bottom');
- $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been deleted.");
+ $this->waitForText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been deleted.");
}
}
$this->waitForPageToLoad($this->getTimeoutMsec());
//check for profile create
- $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
+ $this->waitForText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
// Get profile id (gid) from URL
$elements = $this->parseURL();
$this->click('_qf_Field_next_new-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
//check for field add
- $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile Field 'Last Name' has been saved to '$profileTitle'.");
- $this->assertElementContainsText('crm-notification-container', 'You can add another profile field.');
+ $this->waitForText('crm-notification-container', "Your CiviCRM Profile Field 'Last Name' has been saved to '$profileTitle'.");
+ $this->waitForText('crm-notification-container', 'You can add another profile field.');
// Add Email field.
$this->click('field_name[0]');
$this->click('_qf_Field_next_new-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
//check for field add
- $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile Field 'Email' has been saved to '$profileTitle'.");
- $this->assertElementContainsText('crm-notification-container', 'You can add another profile field.');
+ $this->waitForText('crm-notification-container', "Your CiviCRM Profile Field 'Email' has been saved to '$profileTitle'.");
+ $this->waitForText('crm-notification-container', 'You can add another profile field.');
// Add Sample Custom Field.
$this->click('field_name[0]');
$this->assertTrue($this->isElementPresent("visibility"), 'Visibility field not present when editing existing profile field.');
$this->click("xpath=//tr[@id='profile_visibility']/td[1]/a");
$this->waitForElementPresent("xpath=//div[@id='crm-notification-container']/div/div[2]/p[2]");
- $this->assertElementContainsText('crm-notification-container', 'Is this field hidden from other users');
+ $this->waitForText('crm-notification-container', 'Is this field hidden from other users');
$this->select('visibility', 'value=Public Pages and Listings');
}
}