From 482a29d67e889c71f78593ef46a6a330dbd58d35 Mon Sep 17 00:00:00 2001 From: Web Access Date: Mon, 16 Mar 2015 18:35:01 +0530 Subject: [PATCH] Webtest Fixes --- tests/phpunit/WebTest/Campaign/ActivityTest.php | 2 +- tests/phpunit/WebTest/Campaign/MembershipTest.php | 4 ++-- tests/phpunit/WebTest/Contact/GroupAddTest.php | 2 +- tests/phpunit/WebTest/Event/AddPricesetTest.php | 2 +- tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/phpunit/WebTest/Campaign/ActivityTest.php b/tests/phpunit/WebTest/Campaign/ActivityTest.php index a26f74f112..b8c015405b 100644 --- a/tests/phpunit/WebTest/Campaign/ActivityTest.php +++ b/tests/phpunit/WebTest/Campaign/ActivityTest.php @@ -200,7 +200,7 @@ 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=//div[@class='ui-dialog-buttonset']/button[3]"); + $this->waitForElementPresent("xpath=//form[@id='Activity']/div[2]/table/tbody/tr[5]/td[2]/span"); // verify Activity created $this->verifyText("xpath=//form[@id='Activity']/div[2]/table/tbody/tr[5]/td[2]/span", $campaignTitle); diff --git a/tests/phpunit/WebTest/Campaign/MembershipTest.php b/tests/phpunit/WebTest/Campaign/MembershipTest.php index 70a2fb3eb2..946ca3f62f 100644 --- a/tests/phpunit/WebTest/Campaign/MembershipTest.php +++ b/tests/phpunit/WebTest/Campaign/MembershipTest.php @@ -104,8 +104,8 @@ class WebTest_Campaign_MembershipTest extends CiviSeleniumTestCase { $this->waitForText('crm-notification-container', "Campaign $title"); - $this->waitForElementPresent("//div[@id='campaignList']/div/table/tbody/tr/td[3]/div[text()='{$campaignTitle}']/../../td[1]"); - $id = (int) $this->getText("//div[@id='campaignList']/div/table/tbody/tr/td[3]/div[text()='{$campaignTitle}']/../../td[1]"); + $this->waitForElementPresent("//div[@id='campaignList']/div/table[@class='campaigns dataTable no-footer']/tbody/tr/td[3]/div[text()='{$campaignTitle}']/../../td[1]" + $id = (int) $this->getText("//div[@id='campaignList']/div/table[@class='campaigns dataTable no-footer']/tbody/tr/td[3]/div[text()='{$campaignTitle}']/../../td[1]"); $this->memberAddTest($campaignTitle, $id); } diff --git a/tests/phpunit/WebTest/Contact/GroupAddTest.php b/tests/phpunit/WebTest/Contact/GroupAddTest.php index d37f48b98c..95ce5b74e7 100644 --- a/tests/phpunit/WebTest/Contact/GroupAddTest.php +++ b/tests/phpunit/WebTest/Contact/GroupAddTest.php @@ -96,7 +96,7 @@ class WebTest_Contact_GroupAddTest extends CiviSeleniumTestCase { $this->waitForElementPresent("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td/span[contains(text(), '{$params['name']}')]/../following-sibling::td[2]/a[text()='{$createdBy}']"); //check link of the contact who created the group - $this->clickLink("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody//tr/td[1]/span[contains(text(),'{$params['name']}')]/../following-sibling::td[2]/a", "css=div.crm-summary-display_name"); + $this->clickLink("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody//tr/td[1]/span[contains(text(),'{$params['name']}')]/../following-sibling::td[2]/a", "css=div.crm-summary-display_name", FALSE); $name = explode(',', $createdBy); $name1 = isset($name[1]) ? trim($name[1]) : NULL; $name0 = trim($name[0]); diff --git a/tests/phpunit/WebTest/Event/AddPricesetTest.php b/tests/phpunit/WebTest/Event/AddPricesetTest.php index b26c56621b..c1b312d6bb 100644 --- a/tests/phpunit/WebTest/Event/AddPricesetTest.php +++ b/tests/phpunit/WebTest/Event/AddPricesetTest.php @@ -494,7 +494,7 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase { //click through to the participant view screen $this->click("xpath=//form[@class='CRM_Event_Form_Search crm-search-form']/table/tbody/tr[1]/td[8]/span/a[text()='View']"); - $this->waitForElementPresent('_qf_ParticipantView_cancel-bottom'); + $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[3]/span[2]"); } /** diff --git a/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php b/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php index 111462e08c..27d349b477 100644 --- a/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php +++ b/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php @@ -96,10 +96,10 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase { // page was loaded $this->waitForTextPresent($sourceText); - $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[1][text()='View']"); + $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table[@class='display dataTable no-footer']/tbody/tr/td[9]/span[1]/a[1][text()='View']"); // click through to the membership view screen - $this->click("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[1][text()='View']"); + $this->click("xpath=//div[@id='memberships']/div/table[@class='display dataTable no-footer']/tbody/tr/td[9]/span[1]/a[1][text()='View']"); $this->waitForElementPresent('_qf_MembershipView_cancel-bottom'); -- 2.25.1