From cfa3419fd0d3601a8a55f6558b053e9a9623e4f7 Mon Sep 17 00:00:00 2001 From: Rohan Katkar Date: Tue, 16 Sep 2014 19:17:04 +0530 Subject: [PATCH] Webtest fir for test --- tests/phpunit/WebTest/Contact/AddressParsingTest.php | 4 +++- tests/phpunit/WebTest/Event/MultiprofileEventTest.php | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/WebTest/Contact/AddressParsingTest.php b/tests/phpunit/WebTest/Contact/AddressParsingTest.php index 82bfc80cec..e1a5551b42 100644 --- a/tests/phpunit/WebTest/Contact/AddressParsingTest.php +++ b/tests/phpunit/WebTest/Contact/AddressParsingTest.php @@ -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 diff --git a/tests/phpunit/WebTest/Event/MultiprofileEventTest.php b/tests/phpunit/WebTest/Event/MultiprofileEventTest.php index cbca03844a..cbc8dcc7a1 100644 --- a/tests/phpunit/WebTest/Event/MultiprofileEventTest.php +++ b/tests/phpunit/WebTest/Event/MultiprofileEventTest.php @@ -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"); -- 2.25.1