Webtest fir for test
authorRohan Katkar <rohan.katkar@webaccessglobal.com>
Tue, 16 Sep 2014 13:47:04 +0000 (19:17 +0530)
committerRohan Katkar <rohan.katkar@webaccessglobal.com>
Tue, 16 Sep 2014 13:47:04 +0000 (19:17 +0530)
tests/phpunit/WebTest/Contact/AddressParsingTest.php
tests/phpunit/WebTest/Event/MultiprofileEventTest.php

index 82bfc80cec6ff12ace257cc17fc2f565873a2669..e1a5551b428edbc60fcbc1d48586a62d8b58a568 100644 (file)
@@ -121,7 +121,9 @@ class WebTest_Contact_AddressParsingTest extends CiviSeleniumTestCase {
       $this->waitForElementPresent("address_{$i}_street_address");
       $address[$i] = $location[$this->getSelectedLabel("address_{$i}_location_type_id")];
       // Open "Edit Address Elements"
-      $this->click("//table[@id='address_{$i}']//a[text()='Edit Address Elements']");
+      $this->waitForElementPresent('addressBlockId');
+      $this->click('addressBlockId');
+      $this->click("//table[@id='address_table_{$i}']//a[text()='Edit Address Elements']");
     }
 
     //verify all the address fields were parsed correctly
index cbca03844a08334e831d7e7875d2576f45aa0141..cbc8dcc7a1e9edbade6f3557141a6ea6c34cb7e4 100644 (file)
@@ -502,6 +502,8 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase {
     //$streetAddress = "100 Main Street";
     $this->type("address_1_street_address", $streetAddress);
     $this->type("address_1_city", "San Francisco");
+    $this->waitForElementPresent('address_1_country_id');
+    $this->select("address_1_country_id", "value=1228");
     $this->type("address_1_postal_code", "94117");
     $this->select("address_1_state_province_id", "value=1004");
     $this->type("email_1_email", "info@civicrm.org");
@@ -510,7 +512,7 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase {
 
     // Wait for "saved" status msg
     $this->waitForElementPresent("_qf_Location_upload-bottom");
-    $this->waitForTextPresent("'Event Location' information has been saved.");
+    $this->waitForText('crm-notification-container', "'Event Location' information has been saved.");
   }
 
   /**
@@ -666,6 +668,7 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase {
 
     $this->type("current_employer", "ABCD");
     $this->type("job_title", "Painter");
+    $this->waitForElementPresent('nick_name');
     $this->type("nick_name", "Nick");
     $this->type("url-1", "http://www.test.com");