$this->waitForPageToLoad($this->getTimeoutMsec());
// Visit contact search page.
- $this->open($this->sboxPath . "civicrm/contact/search?reset=1");
+ $this->openCiviPage("contact/search", "reset=1");
$this->waitForPageToLoad($this->getTimeoutMsec());
// Select contact type as Indiividual.
// We're using Quick Add block on the main page for this.
$houseHold = 'H' . substr(sha1(rand()), 0, 5) . ' House';
- $this->open($this->sboxPath . 'civicrm/contact/add?reset=1&ct=Household');
+ $this->openCiviPage("contact/add", "reset=1&ct=Household");
$this->click('household_name');
$this->type('household_name', $houseHold);
$firstName2 = 'bb' . substr(sha1(rand()), 0, 5);
- $this->open($this->sboxPath . 'civicrm/contact/add?reset=1&ct=Individual');
- $this->waitForElementPresent('_qf_Contact_upload_view-bottom');
+ $this->openCiviPage("contact/add", "reset=1&ct=Individual", "_qf_Contact_upload_view-bottom");
$this->type('first_name', $firstName2);
$this->type('last_name', "Smith");
$this->type('email_1_email', "{$firstName2}.smith@example.org");
$this->click("_qf_GroupContact_next");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->open($this->sboxPath . "civicrm/contact/search?reset=1");
+ $this->openCiviPage("contact/search", "reset=1");
$this->waitForPageToLoad($this->getTimeoutMsec());
// Select group.
}
function addContactGroup($groupName = 'New Group', $parentGroupName = "- select -") {
- $this->open($this->sboxPath . "civicrm/group/add?reset=1");
-
- // As mentioned before, waitForPageToLoad is not always reliable. Below, we're waiting for the submit
- // button at the end of this page to show up, to make sure it's fully loaded.
- $this->waitForElementPresent("_qf_Edit_upload");
+ $this->openCiviPage("group/add", "reset=1", "_qf_Edit_upload");
// Fill group name.
$this->type("title", $groupName);
// We're using Quick Add block on the main page for this.
$contactFirstName2 = substr(sha1(rand()), 0, 7);
$this->webtestAddContact($contactFirstName2, "Anderson", TRUE);
- $this->open($this->sboxPath . "civicrm/activity?reset=1&action=add&context=standalone");
+ $this->openCiviPage("activity", "reset=1&action=add&context=standalone", "_qf_Activity_upload");
- // make sure the form loaded, check the end element
- $this->waitForElementPresent("_qf_Activity_upload");
$this->select("activity_type_id", "label=Meeting");
$this->click("css=tr.crm-activity-form-block-target_contact_id input#token-input-contact_1");
function testContributionDashboard() {
$this->login();
// Enable CiviContribute module if necessary
- $this->open($this->sboxPath . "civicrm/admin/setting/component?reset=1");
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForElementPresent("_qf_Component_next-bottom");
+ $this->openCiviPage("admin/setting/component", "reset=1", "_qf_Component_next-bottom");
$enabledComponents = $this->getSelectOptions("enableComponents-t");
if (!in_array("CiviContribute", $enabledComponents)) {
$this->addSelection("enableComponents-f", "label=CiviContribute");
$this->login();
// Enable CiviEvent module if necessary
- $this->open($this->sboxPath . "civicrm/admin/setting/component?reset=1");
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForElementPresent("_qf_Component_next-bottom");
+ $this->openCiviPage("admin/setting/component", "reset=1", "_qf_Component_next-bottom");
$enabledComponents = $this->getSelectOptions("enableComponents-t");
if (!in_array("CiviEvent", $enabledComponents)) {
$this->addSelection("enableComponents-f", "label=CiviEvent");
$this->login();
// Enable CiviMember module if necessary
- $this->open($this->sboxPath . "civicrm/admin/setting/component?reset=1");
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForElementPresent("_qf_Component_next-bottom");
+ $this->openCiviPage("admin/setting/component", "reset=1", "_qf_Component_next-bottom");
$enabledComponents = $this->getSelectOptions("enableComponents-t");
if (!in_array("CiviMember", $enabledComponents)) {
$this->addSelection("enableComponents-f", "label=CiviMember");
$this->login();
// Enable CiviContribute module if necessary
- $this->open($this->sboxPath . "civicrm/admin/setting/component?reset=1");
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForElementPresent("_qf_Component_next-bottom");
+ $this->openCiviPage("admin/setting/component", "reset=1", "_qf_Component_next-bottom");
$enabledComponents = $this->getSelectOptions("enableComponents-t");
if (!in_array("CiviContribute", $enabledComponents)) {
$this->addSelection("enableComponents-f", "label=CiviContribute");
$this->login();
// Enable CiviMail module if necessary
- $this->open($this->sboxPath . "civicrm/admin/setting/component?reset=1");
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForElementPresent("_qf_Component_next-bottom");
+ $this->openCiviPage("admin/setting/component", "reset=1", "_qf_Component_next-bottom");
$enabledComponents = $this->getSelectOptions("enableComponents-t");
if (!in_array("CiviMail", $enabledComponents)) {
$this->addSelection("enableComponents-f", "label=CiviMail");
}
// configure default mail-box
- $this->open($this->sboxPath . "civicrm/admin/mailSettings?action=update&id=1&reset=1");
- $this->waitForElementPresent('_qf_MailSettings_cancel-bottom');
+ $this->openCiviPage("admin/mailSettings", "action=update&id=1&reset=1", "_qf_MailSettings_cancel-bottom");
$this->type('name', 'Test Domain');
$this->type('domain', 'example.com');
$this->select('protocol', 'value=1');