From 60ad1b501ab3c446d851bfa61d48038a80b7807a Mon Sep 17 00:00:00 2001 From: Rohan Katkar Date: Tue, 7 Oct 2014 19:16:01 +0530 Subject: [PATCH] Fixed webtest --- tests/phpunit/WebTest/Admin/RelationshipTypeAddTest.php | 2 +- tests/phpunit/WebTest/Campaign/ActivityTest.php | 4 ++-- .../WebTest/Contact/AdvancedSearchedRelatedContactTest.php | 1 - tests/phpunit/WebTest/Event/AddPricesetTest.php | 5 +++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/phpunit/WebTest/Admin/RelationshipTypeAddTest.php b/tests/phpunit/WebTest/Admin/RelationshipTypeAddTest.php index 055ebcb769..e58b5c1744 100644 --- a/tests/phpunit/WebTest/Admin/RelationshipTypeAddTest.php +++ b/tests/phpunit/WebTest/Admin/RelationshipTypeAddTest.php @@ -74,7 +74,7 @@ class WebTest_Admin_RelationshipTypeAddTest extends CiviSeleniumTestCase { 'Contact Type B' => 'Individual', ); foreach ($data as $param => $val) { - $this->assertElementContainsText('option11', $val, "Could not able to save $param"); + $this->assertElementContainsText("xpath=//table[@class='display dataTable no-footer']", $val, "Could not able to save $param"); } } diff --git a/tests/phpunit/WebTest/Campaign/ActivityTest.php b/tests/phpunit/WebTest/Campaign/ActivityTest.php index 78a9f1762a..47cc062d5e 100644 --- a/tests/phpunit/WebTest/Campaign/ActivityTest.php +++ b/tests/phpunit/WebTest/Campaign/ActivityTest.php @@ -200,10 +200,10 @@ class WebTest_Campaign_ActivityTest extends CiviSeleniumTestCase { // click through to the Activity view screen $this->click("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']/tbody//tr[2]/td[8]/span/a[text()='View']"); $this->waitForElementPresent('_qf_Activity_cancel-bottom'); - $this->waitForElementPresent("xpath=id('Activity')/div[2]/table[1]/tbody/tr[5]/td[2]/span"); + $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[3]"); // verify Activity created - $this->verifyText("xpath=id('Activity')/div[2]/table[1]/tbody/tr[5]/td[2]/span", $campaignTitle); + $this->verifyText("xpath=//form[@id='Activity']/div[2]/table/tbody/tr[5]/td[2]/span", $campaignTitle); } } diff --git a/tests/phpunit/WebTest/Contact/AdvancedSearchedRelatedContactTest.php b/tests/phpunit/WebTest/Contact/AdvancedSearchedRelatedContactTest.php index 74e6c266a4..e1c573dfa0 100644 --- a/tests/phpunit/WebTest/Contact/AdvancedSearchedRelatedContactTest.php +++ b/tests/phpunit/WebTest/Contact/AdvancedSearchedRelatedContactTest.php @@ -299,7 +299,6 @@ class WebTest_Contact_AdvancedSearchedRelatedContactTest extends CiviSeleniumTes $this->waitForElementPresent("event_type_id"); $this->select2("event_type_id", "Conference"); $this->click("_qf_Advanced_refresh"); - $this->waitForPageToLoad($this->getTimeoutMsec()); $this->waitForElementPresent('search-status'); $this->assertElementContainsText('search-status', '2 Contacts'); } diff --git a/tests/phpunit/WebTest/Event/AddPricesetTest.php b/tests/phpunit/WebTest/Event/AddPricesetTest.php index b0a70870d9..c958539a75 100644 --- a/tests/phpunit/WebTest/Event/AddPricesetTest.php +++ b/tests/phpunit/WebTest/Event/AddPricesetTest.php @@ -601,8 +601,9 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase { // Select an event fee $this->waitForElementPresent("xpath=//div[@id='priceset']/div[2]/div[2]"); - $this->type("//div[@id='priceset']/div[2]/div[2]/input", '5'); - $this->fireEvent("//div[@id='priceset']/div[2]/div[2]/input", 'blur'); + $this->type("xpath=//div[@id='priceset']/div[2]/div[2]/input", '5'); + $this->fireEvent("xpath=//div[@id='priceset']/div[2]/div[2]/input", 'blur'); + $this->waitForElementPresent("xpath=//div[@id='priceset']/div[3]/div[2]/div[1]/span/input"); $this->click("xpath=//div[@id='priceset']/div[3]/div[2]/div[1]/span/input"); $this->click("xpath=//div[@id='priceset']/div[4]/div[2]/div[1]/span/input"); $this->click("xpath=//div[@id='priceset']/div[4]/div[2]/div[2]/span/input"); -- 2.25.1