+--------------------------------------------------------------------+
*/
-
require_once 'CiviTest/CiviSeleniumTestCase.php';
class WebTest_Contact_AddTest extends CiviSeleniumTestCase {
$this->click("address_1_country_id");
$this->select("address_1_country_id", "value=" . $this->webtestGetValidCountryID());
- if($this->assertElementContainsText('address_1', "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->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
}
function testHouseholdAdd() {
$this->type("phone_1_phone", "444-4444");
$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");
$this->type("im_1_name", "testSkype");
$this->waitForElementPresent("preferred_language");
$this->select("preferred_language", "value=fr_FR");
-
//Notes section
$this->click("notesBlock");
$this->waitForElementPresent("subject");
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
}
function testOrganizationAdd() {
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+ $this->waitForText('crm-notification-container', "Contact Saved");
}
function testIndividualAddWithSharedAddress() {
$this->click("_qf_Edit_next");
// Is new contact created?
- $this->assertElementContainsText('crm-notification-container', "$currentEmployer has been created.",
- "Status message didn't show up after saving!"
- );
+ $this->waitForText('crm-notification-container', "$currentEmployer has been created.");
//make sure shared address is selected
$this->waitForElementPresent('selected_shared_address-1');
$this->click("_qf_Edit_next");
// Is new contact created?
- $this->assertElementContainsText('crm-notification-container', "$sharedHousehold has been created.",
- "Status message didn't show up after saving!"
- );
+ $this->waitForText('crm-notification-container', "$sharedHousehold has been created.");
//make sure shared address is selected
$this->waitForElementPresent('selected_shared_address-2');
$this->click("_qf_Contact_upload_view");
$this->waitForPageToLoad($this->getTimeoutMsec());
$name = $this->getText("xpath=//div[@class='crm-summary-display_name']");
- $this->assertElementContainsText('crm-notification-container', "$name has been created.");
+ $this->waitForText('crm-notification-container', "$name has been created.");
//make sure current employer is set
$this->verifyText("xpath=id('contactinfo-block')/div/div/div[2]/div", 'Employer');
}
}
-