// Test Individual panes.
foreach (array_keys($allpanes) as $pane) {
// Go to the Advance Search
- $this->open($this->sboxPath . 'civicrm/contact/search/advanced?reset=1');
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('contact/search/advanced', 'reset=1');
// Select some fields from pane.
$this->_selectPaneFields($pane);
$allpanes = $this->_advanceSearchPanes();
// Go to the Advance Search
- $this->open($this->sboxPath . 'civicrm/contact/search/advanced?reset=1');
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('contact/search/advanced', 'reset=1');
// Select some fields from all default panes.
foreach (array_keys($allpanes) as $pane) {
$this->_addIndividual($contactsReffOptions['dn_trade_sms']['first_name'], $contactsReffOptions['dn_trade_sms']['last_name'], $privacyOptions['dn_trade_sms']);
//advance search for created contacts
- $this->open($this->sboxPath . "civicrm/contact/search/advanced?reset=1");
- $this->waitForElementPresent('_qf_Advanced_refresh');
+ $this->openCiviPage('contact/search/advanced', 'reset=1', '_qf_Advanced_refresh');
$allPrivacyOptions = array(
'do_not_phone',
'do_not_mail',
function _addIndividual($firstName, $lastName, $options) {
- $this->open($this->sboxPath . "civicrm/contact/add?reset=1&ct=Individual");
+ $this->openCiviPage('contact/add', 'reset=1&ct=Individual');
//fill in first name
$this->type("first_name", $firstName);
// Clicking save.
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertTrue($this->isTextPresent("{$firstName} {$lastName} has been created."));
+ $this->assertElementContainsText('crm-notification-container', "{$firstName} {$lastName} has been created.");
}
}
/* add new group */
- $this->open($this->sboxPath . "civicrm/group/add?&reset=1");
- $this->waitForElementPresent("_qf_Edit_upload");
+ $this->openCiviPage('group/add', 'reset=1', '_qf_Edit_upload');
$groupName = 'group_' . substr(sha1(rand()), 0, 7);
$this->type("title", $groupName);
// Add Custom group //
// Go directly to the URL of the screen that you will be testing (New Custom Group).
- $this->open($this->sboxPath . "civicrm/admin/custom/group?action=add&reset=1");
-
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('admin/custom/group', 'action=add&reset=1');
//fill custom group title
$customGroupTitle = 'custom_' . substr(sha1(rand()), 0, 7);
$this->waitForElementPresent("_qf_Field_cancel-bottom");
//Is custom group created?
- $this->assertTrue($this->isTextPresent("Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now."));
+ $this->assertElementContainsText('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->assertTrue($this->isTextPresent("Your custom field '$contactRefFieldLabel1' has been saved."));
+ $this->assertElementContainsText('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->assertTrue($this->isTextPresent("Your custom field '$contactRefFieldLabel2' has been saved."));
+ $this->assertElementContainsText('crm-notification-container', "Your custom field '$contactRefFieldLabel2' has been saved.");
- $this->open($this->sboxPath . "civicrm/admin/custom/group/field?reset=1&action=browse&gid={$customGroupId}");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('admin/custom/group/field', "reset=1&action=browse&gid={$customGroupId}");
$this->click("xpath=//div[@id='field_page']//table/tbody/tr[1]/td[8]/span[1]/a[text()='Edit Field']");
$this->waitForPageToLoad($this->getTimeoutMsec());
$contactRefFieldID1 = $matches[1];
- $this->open($this->sboxPath . "civicrm/admin/custom/group/field?reset=1&action=browse&gid={$customGroupId}");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('admin/custom/group/field', "reset=1&action=browse&gid={$customGroupId}");
$this->click("xpath=//div[@id='field_page']//table/tbody/tr[2]/td[8]/span[1]/a[text()='Edit Field']");
$this->waitForPageToLoad($this->getTimeoutMsec());
$contactRefFieldID2 = $matches[1];
// Visit custom group preview page
- $this->open($this->sboxPath . "civicrm/admin/custom/group?action=preview&reset=1&id={$customGroupId}");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('admin/custom/group', "action=preview&reset=1&id={$customGroupId}");
$this->type("custom_{$contactRefFieldID1}_-1", "Anderson");
$this->fireEvent("custom_{$contactRefFieldID1}_-1", "focus");
$this->click("custom_{$contactRefFieldID1}_-1");
$this->waitForElementPresent("css=div.ac_results-inner li");
- $this->assertTrue($this->isTextPresent("{$contact1}@example.com"));
- $this->assertTrue(!($this->isTextPresent("{$contact2}@example.com")));
+ $this->assertElementContainsText("css=div.ac_results-inner li", "{$contact1}@example.com");
+ $this->assertElementNotContainsText("css=div.ac_results-inner ul li", "{$contact2}@example.com");
- $this->open($this->sboxPath . "civicrm/admin/custom/group?action=preview&reset=1&id={$customGroupId}");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('admin/custom/group', "action=preview&reset=1&id={$customGroupId}");
$this->type("custom_{$contactRefFieldID2}_-1", $org1);
$this->fireEvent("custom_{$contactRefFieldID2}_-1", "focus");
$this->click("custom_{$contactRefFieldID2}_-1");
$this->waitForElementPresent("css=div.ac_results-inner li");
- $this->assertTrue($this->isTextPresent("{$org1}@example.com"));
+ $this->assertElementContainsText("css=div.ac_results-inner li", "{$org1}@example.com");
}
}
$this->assertType('numeric', $cid);
//got to the new cms user form
- $this->open($this->sboxPath . "civicrm/contact/view/useradd?reset=1&action=add&cid=" . $cid);
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('contact/view/useradd', "reset=1&action=add&cid={$cid}");
return array($cid, $firstName, $lastName, $email);
}
$this->webtestLogin();
// Go directly to the URL of the screen that you will be testing (New Custom Group).
- $this->open($this->sboxPath . "civicrm/admin/custom/group?action=add&reset=1");
-
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('admin/custom/group', 'action=add&reset=1');
//fill custom group title
$customGroupTitle = 'custom_' . substr(sha1(rand()), 0, 7);
$this->waitForElementPresent("_qf_Field_cancel-bottom");
//Is custom group created?
- $this->assertTrue($this->isTextPresent("Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now."));
+ $this->assertElementContainsText('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->assertTrue($this->isTextPresent("Your custom field '$checkboxFieldLabel' has been saved."));
+ $this->assertElementContainsText('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->assertTrue($this->isTextPresent("Your custom field '$radioFieldLabel' has been saved."));
+ $this->assertElementContainsText('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->waitForPageToLoad($this->getTimeoutMsec());
// Go directly to the URL of the screen that you will be testing (New Custom Group).
- $this->open($this->sboxPath . "civicrm/admin/custom/group?action=add&reset=1");
-
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('admin/custom/group', 'action=add&reset=1');
//fill custom group title
$customGroupTitle = 'custom_' . substr(sha1(rand()), 0, 7);
$this->waitForElementPresent("_qf_Field_cancel-bottom");
//Is custom group created?
- $this->assertTrue($this->isTextPresent("Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now."));
+ $this->assertElementContainsText('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->assertTrue($this->isTextPresent("Your custom field '$moneyTextFieldLabel' has been saved."));
+ $this->assertElementContainsText('crm-notification-container', "Your custom field '$moneyTextFieldLabel' has been saved.");
//Get the customFieldsetID
- $this->open($this->sboxPath . "civicrm/admin/custom/group?reset=1");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('admin/custom/group', 'reset=1');
$customFieldsetId = explode('&gid=', $this->getAttribute("xpath=//div[@id='custom_group']//table/tbody//tr/td/span[text()='$customGroupTitle']/../../td[7]/span/a@href"));
$customFieldsetId = $customFieldsetId[1];
$this->webtestLogin();
//enable logging
- $this->open($this->sboxPath . "civicrm/admin/setting/misc?reset=1");
+ $this->openCiviPage('admin/setting/misc', 'reset=1');
$this->click("CIVICRM_QFID_1_logging");
- $this->waitForPageToLoad($this->getTimeoutMsec());
$this->click("_qf_Miscellaneous_next-top");
// adding sleep here since enabling logging takes lot of time
// increased the time since we now also add a lot of triggers and create tables
// the first time around
- sleep(60);
- $this->waitForTextPresent("Your changes have been saved");
+ sleep(40);
+ $this->waitForTextPresent("Changes Saved");
// Create new Custom Field Set
- $this->open($this->sboxPath . 'civicrm/admin/custom/group?reset=1');
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('admin/custom/group', 'reset=1');
$this->click("css=#newCustomDataGroup > span");
$this->waitForElementPresent('_qf_Group_next-bottom');
$customFieldSet = 'Fieldset' . rand();
$this->click("id=collapse_display");
$this->click("id=_qf_Group_next-bottom");
$this->waitForElementPresent('_qf_Field_next-bottom');
- $this->assertTrue($this->isTextPresent("Your custom field set '$customFieldSet' has been added."));
+ $this->assertElementContainsText('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->assertTrue($this->isTextPresent("Your custom field '$customField' has been saved."));
+ $this->assertElementContainsText('crm-notification-container', "Your custom field '$customField' has been saved.");
// Go directly to the URL of the screen that you will be testing (New Individual).
- $this->open($this->sboxPath . "civicrm/contact/add?reset=1&ct=Individual");
+ $this->openCiviPage('contact/add', 'reset=1&ct=Individual');
//contact details section
//fill in first name
$this->click("address_1_country_id");
$this->select("address_1_country_id", "value=1228");
- if ($this->isTextPresent("Latitude")) {
+ if ($this->assertElementContainsText("address_1", "Latitude")) {
$this->type("address_1_geo_code_1", "1234");
$this->type("address_1_geo_code_2", "5678");
}
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertTrue($this->isTextPresent("{$firstName} {$lastName} has been created."));
+ $this->assertElementContainsText('crm-notification-container', "{$firstName} {$lastName} has been created.");
//Update the custom field
$this->click("css=a.edit.button");
$this->assertTrue($this->isElementPresent("xpath=//form[@id='LoggingDetail']/div[2]/table/tbody/tr/td[3][contains(text(), '$value1')]"));
//disable logging
- $this->open($this->sboxPath . "civicrm/admin/setting/misc?reset=1");
+ $this->openCiviPage('admin/setting/misc', 'reset=1');
$this->click("CIVICRM_QFID_0_logging");
$this->click("_qf_Miscellaneous_next-top");
//adding sleep here since disabling logging takes lot of time
- sleep(40);
+ sleep(20);
$this->waitForTextPresent("Changes Saved");
}
}
// Advanced Search
- $this->open($this->sboxPath . 'civicrm/contact/search/advanced?reset=1');
- $this->waitForElementPresent('_qf_Advanced_refresh');
+ $this->openCiviPage('contact/search/advanced', 'reset=1', '_qf_Advanced_refresh');
// Select the group and check deceased contacts
$this->select('crmasmSelect1', "label={$groupName}");
// Remove contacts from group
$this->waitForElementPresent('Go');
- $this->assertTrue($this->isTextPresent('2 Contacts'));
+ $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("xpath=//div[@id='search-status']/table/tbody/tr[3]/td/ul/input[2]");
$this->waitForElementPresent('_qf_RemoveFromGroup_back-bottom');
- $this->assertTrue($this->isTextPresent('Number of selected contacts: 2'));
+ $this->assertElementContainsText('crm-container', 'Number of selected contacts: 2');
$this->select('group_id', "label={$groupName}");
$this->click('_qf_RemoveFromGroup_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertTrue($this->isTextPresent("2 contacts removed from '{$groupName}'"));
+ $this->assertElementContainsText('crm-notification-container', "2 contacts removed from '{$groupName}'");
// Search for the contacts who are not deceased
- $this->open($this->sboxPath . 'civicrm/contact/search/advanced?reset=1');
- $this->waitForElementPresent('_qf_Advanced_refresh');
+ $this->openCiviPage('contact/search/advanced', 'reset=1', '_qf_Advanced_refresh');
$this->select('crmasmSelect1', "label={$groupName}");
$this->click('_qf_Advanced_refresh');
// Check if non-deceased contacts are still present
$this->waitForElementPresent('Go');
- $this->assertTrue($this->isTextPresent('3 Contacts'));
+ $this->assertElementContainsText('search-status', '3 Contacts');
}
function _testAddContact($firstName, $lastName, $email, $groupName, $deceased = FALSE) {
$this->webtestLogin();
// Go directly to the URL of New Individual.
- $this->open($this->sboxPath . "civicrm/contact/add?reset=1&ct=Individual");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('contact/add', 'reset=1&ct=Individual');
$firstName = substr(sha1(rand()), 0, 7);
$lastName1 = substr(sha1(rand()), 0, 7);
$this->assertElementContainsText('crm-notification-container', "Contact Saved");
// Go directly to the URL of New Individual.
- $this->open($this->sboxPath . "civicrm/contact/add?reset=1&ct=Individual");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('contact/add' , 'reset=1&ct=Individual');
//contact details section
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->isTextPresent("Please correct the following errors in the form fields below: One matching contact was found. You can View or Edit the existing contact, or Merge this contact with an existing contact.");
+ $this->assertElementContainsText("css=.notify-content", "Please correct the following errors in the form fields below: One matching contact was found. You can View or Edit the existing contact.");
}
}
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertTrue($this->isTextPresent("The Group '{$params['name']}' has been saved."));
+ $this->assertElementContainsText('crm-notification-container', "The Group '{$params['name']}' has been saved.");
- $this->open($this->sboxPath . "civicrm/group?reset=1");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('group', 'reset=1');
$this->type('title', $params['name']);
$this->click('_qf_Search_refresh');
$this->waitForElementPresent("xpath=//table[@id='crm-group-selector']/tbody/tr/td[3]/a");
$this->waitForElementPresent("xpath=//form[@id='Edit']/div[2]/div/table[2]/tbody/tr/td[2]/select");
//assert created by in the edit page
- $this->assertTrue($this->isElementPresent("xpath=//form[@id='Edit']/div[2]/div/table/tbody/tr[2]/td[1][text()='Created By']/following-sibling::td[text()='{$createdBy}']"));
- $this->open($this->sboxPath . "civicrm/group?reset=1");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->assertTrue($this->isElementPresent("xpath=//form[@id='Edit']/div[2]/div/table/tbody/tr[2]/td[contains(text(),'Created By')]/following-sibling::td[contains(text(),'{$createdBy}')]"));
+ $this->openCiviPage('group', 'reset=1');
//search groups using created by
$this->type('created_by', $createdBy);
$this->waitForPageToLoad($this->getTimeoutMsec());
$name = explode(',', $createdBy);
$displayName = isset($name[1]) ? "{$name[1]} {$name[0]}" : "{$name[0]}";
- $this->assertTrue($this->isTextPresent($displayName));
+ $this->assertElementContainsText("css=div.crm-summary-display_name",$displayName);
}
function testGroupReserved() {
$this->changePermissions($permissions);
// Now logout as admin, login as regular user and verify that Group settings, delete and disable links are not available
- $this->open($this->sboxPath . "civicrm/logout?reset=1");
+ $this->openCiviPage('logout', 'reset=1', NULL);
$this->open($this->sboxPath);
$this->waitForElementPresent('edit-submit');
$this->type('edit-name', $user);
$this->click('edit-submit');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->open($this->sboxPath . "civicrm/group?&reset=1");
+ $this->openCiviPage('group', 'reset=1');
$this->type('title', $params['name']);
$this->click('_qf_Search_refresh');
$this->waitForTextPresent("Adding new reserved group.");
// Settings link should NOT be included in selector after search returns with only the reserved group.
- $this->assertFalse($this->isTextPresent("Settings"));
+ $this->assertElementNotContainsText("css=td.crm-group-group_links", "Settings");
//login as admin and delete the role
- $this->open($this->sboxPath . "civicrm/logout?reset=1");
+ $this->openCiviPage('logout', 'reset=1', NULL);
$this->open($this->sboxPath);
$this->webtestLogin(TRUE);
$this->open($this->sboxPath . "admin/people/permissions/roles");
/* add new group */
- $this->open($this->sboxPath . "civicrm/group/add?&reset=1");
- $this->waitForElementPresent("_qf_Edit_upload");
+ $this->openCiviPage('group/add', 'reset=1', '_qf_Edit_upload');
$groupName = 'group_' . substr(sha1(rand()), 0, 7);
$this->type("title", $groupName);
$this->assertElementContainsText('crm-notification-container', "Added to Group");
// Search contacts
- $this->open($this->sboxPath . "civicrm/contact/search?reset=1");
- $this->waitForElementPresent("_qf_Basic_refresh");
+ $this->openCiviPage('contact/search', 'reset=1', '_qf_Basic_refresh');
$this->select('group', "label={$groupName}");
$this->click("_qf_Basic_refresh");
$this->waitForPageToLoad(2 * $this->getTimeoutMsec());
- $this->assertTrue($this->isTextPresent("3 Contacts"));
+ $this->assertElementContainsText('search-status', "3 Contacts");
$this->click("xpath=//div[@class='crm-search-results']//table/tbody/tr[1]/td[3]/a");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertTrue($this->isTextPresent("{$contact1} AAA"));
- $this->assertTrue($this->isTextPresent("Next"));
+ $this->assertElementContainsText('css=div.crm-summary-display_name', "{$contact1} AAA");
+ $this->assertElementContainsText('css=li.crm-next-action a span', "Next");
$this->click("xpath=//ul[@id='actions']/li[@class='crm-next-action']/a");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertTrue($this->isTextPresent("{$contact2} BBB"));
- $this->assertTrue($this->isTextPresent("Next"));
- $this->assertTrue($this->isTextPresent("Previous"));
+ $this->assertElementContainsText('css=div.crm-summary-display_name', "{$contact2} BBB");
+ $this->assertElementContainsText('css=li.crm-next-action a span', "Next");
+ $this->assertElementContainsText('css=li.crm-previous-action a span', "Previous");
$this->click("xpath=//ul[@id='actions']/li[@class='crm-next-action']/a");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertTrue($this->isTextPresent("{$contact3} CCC"));
- $this->assertTrue($this->isTextPresent("Previous"));
+ $this->assertElementContainsText('css=div.crm-summary-display_name', "{$contact3} CCC");
+ $this->assertElementContainsText('css=li.crm-previous-action a span', "Previous");
$this->click("xpath=//ul[@id='actions']/li[@class='crm-previous-action']/a");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertTrue($this->isTextPresent("{$contact2} BBB"));
- $this->assertTrue($this->isTextPresent("Next"));
- $this->assertTrue($this->isTextPresent("Previous"));
+ $this->assertElementContainsText('css=div.crm-summary-display_name', "{$contact2} BBB");
+ $this->assertElementContainsText('css=li.crm-next-action a span', "Next");
+ $this->assertElementContainsText('css=li.crm-previous-action a span', "Previous");
$this->click("xpath=//ul[@id='actions']/li[@class='crm-previous-action']/a");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertTrue($this->isTextPresent("{$contact1} AAA"));
- $this->assertTrue($this->isTextPresent("Next"));
+ $this->assertElementContainsText('css=div.crm-summary-display_name', "{$contact1} AAA");
+ $this->assertElementContainsText('css=li.crm-next-action a span', "Next");
}
}
// Go to Advance search.
- $this->open($this->sboxPath . "civicrm/contact/search/advanced?reset=1");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('contact/search/advanced', 'reset=1');
// Check both the tagset.
$this->assertTrue($this->isElementPresent("token-input-contact_taglist_{$tagSet1}"));
$this->waitForPageToLoad(2 * $this->getTimeoutMsec());
// Check result.
- $this->assertTrue($this->isTextPresent("2 Contacts"));
- $this->assertTrue($this->isTextPresent("Anderson, $contact1"));
- $this->assertTrue($this->isTextPresent("Anderson, $contact2"));
+ $this->assertElementContainsText('search-status', "2 Contacts");
+ $this->assertElementContainsText('css=.crm-search-results table.selector', "Anderson, $contact1");
+ $this->assertElementContainsText('css=.crm-search-results table.selector', "Anderson, $contact2");
}
function _testAddTagSet() {
// Go to add tag set url.
- $this->open($this->sboxPath . "civicrm/admin/tag?action=add&reset=1&tagset=1");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->openCiviPage('admin/tag', 'action=add&reset=1&tagset=1');
// take a tagset name
$tagSetName = 'tagset_' . substr(sha1(rand()), 0, 7);
$this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
- $this->assertTrue($this->isTextPresent("The tag '$tagSetName' has been saved."));
+ $this->assertElementContainsText('crm-notification-container', "The tag '$tagSetName' has been saved.");
// sort by ID desc
$this->click("xpath=//table//tr/th[text()=\"ID\"]");