foreach($customDataParams['customFields'] as $key => $value){
$this->assertTrue($this->isElementPresent("xpath=//div[@class='crm-summary-row']/div[@class='crm-label'][contains(text(), '$key')]"));
- $this->assertTrue($this->isTextPresent("$value"));
+ $this->assertElementContainsText('address-block-1', "$value");
}
}
function _addCustomData() {
// Go directly to the URL of the screen that you will be testing (New Custom Group).
- $this->open($this->sboxPath . "civicrm/admin/custom/group?reset=1");
+ $this->openCiviPage('admin/custom/group', 'reset=1');
//add new custom data
$this->click("//a[@id='newCustomDataGroup']/span");
$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.");
$url = explode('gid=', $this->getLocation());
$gid = $url[1];
$this->click('_qf_Field_next-bottom');
$this->waitForElementPresent('newCustomField');
- $this->assertTrue($this->isTextPresent("Your custom field '{$customField}' has been saved."));
+ $this->assertElementContainsText('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->assertTrue($this->isTextPresent("Your custom field '{$customField1}' has been saved."));
+ $this->assertElementContainsText('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->assertTrue($this->isTextPresent("Your custom field '{$customField2}' has been saved."));
+ $this->assertElementContainsText('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->assertTrue($this->isTextPresent("Your custom field '{$customField9}' has been saved."));
+ $this->assertElementContainsText('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->assertTrue($this->isTextPresent("Your custom field '{$customField10}' has been saved."));
+ $this->assertElementContainsText('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->assertTrue($this->isTextPresent("Your custom field '{$customFieldName}' has been saved."));
+ $this->assertElementContainsText('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;
* @return int external id
*/
function _addContact($firstName, $lastName, $externalId) {
- $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);
);
}
- $this->open($this->sboxPath . "civicrm/event/add?reset=1&action=add");
-
- $this->waitForElementPresent("_qf_EventInfo_upload-bottom");
+ $this->openCiviPage('event/add', 'reset=1&action=add', '_qf_EventInfo_upload-bottom');
// Let's start filling the form with values.
$this->select("event_type_id", "value={$params['event_type_id']}");
// verify event input on info page
// start at Manage Events listing
- $this->open($this->sboxPath . "civicrm/event/manage?reset=1");
+ $this->openCiviPage('event/manage', 'reset=1');
$this->type("xpath=//div[@class='crm-block crm-form-block crm-event-searchevent-form-block']/table/tbody/tr/td/input",$params['title']);
$this->click("_qf_SearchEvent_refresh");
$this->waitForPageToLoad($this->getTimeoutMsec());
);
}
- $this->open($this->sboxPath . "civicrm/event/add?reset=1&action=add");
-
- $this->waitForElementPresent("_qf_EventInfo_upload-bottom");
+ $this->openCiviPage('event/add', 'reset=1&action=add', '_qf_EventInfo_upload-bottom');
// Let's start filling the form with values.
$this->select("event_type_id", "value={$params['event_type_id']}");
// select newly created processor
$xpath = "xpath=//label[text() = '{$processorName}']/preceding-sibling::input[1]";
- $this->assertTrue($this->isTextPresent($processorName));
+ $this->assertElementContainsText('paymentProcessor', $processorName);
$this->check($xpath);
-
- $this->select("financial_type_id", "value=4");
+ $this->select("financial_type_id", "value=4");
$counter = 1;
foreach ($params['fee_level'] as $label => $amount) {
// verify event input on info page
// start at Manage Events listing
- $this->open($this->sboxPath . "civicrm/event/manage?reset=1");
+ $this->openCiviPage('event/manage', 'reset=1');
$this->click("link=" . $params['title']);
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->click("add");
$this->click("_qf_Summary_submit_save");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->openCiviPage('logout','reset=1');
+ $this->openCiviPage('logout', 'reset=1', NULL);
$this->open($this->sboxPath);
$this->waitForElementPresent('edit-submit');
$this->type('edit-name', $user2);
$this->openCiviPage('report/instance/1', 'reset=1');
$this->assertElementContainsText('crm-container', 'You do not have permission to access this report.');
$this->openCiviPage('report/list', 'reset=1');
- $this->openCiviPage('logout', 'reset=1');
+ $this->openCiviPage('logout', 'reset=1', NULL);
//delete roles
$this->webtestLogin(TRUE);
);
$this->changePermissions($permissions);
- $this->openCiviPage('logout', 'reset=1');
+ $this->openCiviPage('logout', 'reset=1', NULL);
$this->open($this->sboxPath);
$this->waitForElementPresent('edit-submit');
$this->type('edit-name', $user);
//check if the reserved report field is frozen
$this->assertTrue($this->isElementPresent("xpath=//div[@id='instanceForm']//table[3]/tbody//tr/td[2]/tt[text()='[ ]']"));
- $this->openCiviPage('logout', 'reset=1');
+ $this->openCiviPage('logout', 'reset=1', NULL);
$this->open($this->sboxPath);
$this->webtestLogin(TRUE);
// let's give full CiviReport permissions.
$this->click("_qf_Summary_submit_save");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->openCiviPage('logout', 'reset=1');
+ $this->openCiviPage('logout', 'reset=1', NULL);
$this->open($this->sboxPath);
$this->waitForElementPresent('edit-submit');
$this->type('edit-name', $user);
$this->assertTrue($this->isElementPresent("xpath=//form[@id='Summary']//div[@id='instanceForm']/table//input[@id='title']"));
//login as admin and remove reserved permission
- $this->openCiviPage('logout', 'reset=1');
+ $this->openCiviPage('logout', 'reset=1', NULL);
$this->open($this->sboxPath);
$this->webtestLogin(TRUE);
$this->open($this->sboxPath . "admin/people/permissions");
$this->waitForPageToLoad($this->getTimeoutMsec());
//login as user and check for absence of report criteria and settings
- $this->openCiviPage('logout', 'reset=1');
+ $this->openCiviPage('logout', 'reset=1', NULL);
$this->open($this->sboxPath);
$this->waitForElementPresent('edit-submit');
$this->type('edit-name', $user);
$this->assertFalse($this->isElementPresent("xpath=//form[@id='Summary']//div[@id='instanceForm']//input[@id='title']"));
//login as admin and turn the is_reserved flag off for the instance
- $this->openCiviPage('logout', 'reset=1');
+ $this->openCiviPage('logout', 'reset=1', NULL);
$this->open($this->sboxPath);
$this->webtestLogin(TRUE);
$this->openCiviPage('report/instance/1', 'reset=1');
$this->click("_qf_Summary_submit_save");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->openCiviPage('logout', 'reset=1');
+ $this->openCiviPage('logout', 'reset=1', NULL);
$this->open($this->sboxPath);
$this->waitForElementPresent('edit-submit');
$this->type('edit-name', $user);
$this->assertTrue($this->isElementPresent("xpath=//form[@id='Summary']//div[@id='instanceForm']//input[@id='title']"));
//login as admin and delete the role
- $this->openCiviPage('logout', 'reset=1');
+ $this->openCiviPage('logout', 'reset=1', NULL);
$this->open($this->sboxPath);
$this->webtestLogin(TRUE);
$this->open($this->sboxPath . "admin/people/permissions/roles");