| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
require_once 'CiviTest/CiviSeleniumTestCase.php';
parent::setUp();
}
- function testIndividualAdd() {
+ public function testIndividualAdd() {
$this->webtestLogin();
$groupName = $this->WebtestAddGroup();
$this->waitForText('crm-notification-container', "Contact Saved");
}
- function testHouseholdAdd() {
+ public function testHouseholdAdd() {
$this->webtestLogin();
$groupName = $this->WebtestAddGroup();
$this->select("phone_1_phone_type_id", "value=" . $this->webtestGetFirstValueForOptionGroup('phone_type'));
//fill in IM
- $this->assertElementContainsText('im_1_provider_id', "Yahoo MSN AIM GTalk Jabber Skype");
+ foreach (array('Yahoo', 'MSN', 'AIM', 'GTalk', 'Jabber', 'Skype') as $option) {
+ $this->assertSelectHasOption('im_1_provider_id', $option);
+ }
$this->type("im_1_name", "testSkype");
$this->select("im_1_location_type_id", "value=3");
$this->select("im_1_provider_id", "value=6");
$this->waitForText('crm-notification-container', "Contact Saved");
}
- function testOrganizationAdd() {
+ public function testOrganizationAdd() {
$this->webtestLogin();
$groupName = $this->WebtestAddGroup();
$this->waitForText('crm-notification-container', "Contact Saved");
}
- function testIndividualAddWithSharedAddress() {
+ public function testIndividualAddWithSharedAddress() {
$this->webtestLogin();
$this->openCiviPage('contact/add', "reset=1&ct=Individual");
//create new current employer
$currentEmployer = substr(sha1(rand()), 0, 7) . "Web Access";
-
//fill in email
$this->type("email_1_email", substr(sha1(rand()), 0, 7) . "john@gmail.com");
$this->click("_qf_Edit_next");
- // Is new contact created?
- $this->waitForText("css=div.crm-status-box-msg", "$currentEmployer Created");
$this->select2('employer_id', $currentEmployer);
//make sure shared address is selected
$this->click("_qf_Edit_next");
- // Is new contact created?
- $this->waitForText("css=div.crm-status-box-msg", "$sharedHousehold Created");
-
//make sure shared address is selected
$this->waitForElementPresent('selected_shared_address-2');
$this->assertElementContainsText('DataTables_Table_0', 'Employee of');
$this->assertElementContainsText('DataTables_Table_0', 'Household Member of');
}
-}
+}