+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
parent::setUp();
}
+ /**
+ * Add a contact via profile
+ */
public function testAddViaCreateProfile() {
- $this->webtestLogin();
-
- $this->openCiviPage('profile/create', 'reset=1&gid=1', '_qf_Edit_next');
-
- $firstName = 'Jo' . substr(sha1(rand()), 0, 4);
- $lastName = 'Ad' . substr(sha1(rand()), 0, 7);
-
- //contact details section
- //fill in first name
- $this->type("first_name", $firstName);
-
- //fill in last name
- $this->type("last_name", $lastName);
-
- //address section
- $this->type("street_address-1", "902C El Camino Way SW");
- $this->type("city-1", "Dumfries");
- $this->type("postal_code-1", "1234");
- $this->assertSelected('country-1', "UNITED STATES");
- $this->select("state_province-1", "value=1019");
-
- // Clicking save.
- $this->click("_qf_Edit_next");
- $this->waitForPageToLoad($this->getTimeoutMsec());
-
- $this->assertElementContainsText('css=.msg-text', "Your information has been saved.");
+ $this->webtestAddViaCreateProfile();
}
}