From f58bc0ab8b91129a40ef3b0f35fa5261ab2471fa Mon Sep 17 00:00:00 2001 From: Web Access Date: Wed, 1 Jul 2015 12:44:47 +0530 Subject: [PATCH] Webtest fix - 4.6 --- tests/phpunit/WebTest/Event/AdditionalPaymentTest.php | 6 +++--- tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/WebTest/Event/AdditionalPaymentTest.php b/tests/phpunit/WebTest/Event/AdditionalPaymentTest.php index 56f7f6bef7..cf5ceaf3a8 100644 --- a/tests/phpunit/WebTest/Event/AdditionalPaymentTest.php +++ b/tests/phpunit/WebTest/Event/AdditionalPaymentTest.php @@ -109,9 +109,9 @@ class WebTest_Event_AdditionalPaymentTest extends CiviSeleniumTestCase { // Is status message correct? $this->waitForText('crm-notification-container', "Event registration for $displayName has been added"); - $this->waitForElementPresent("xpath=//form[@class='CRM_Event_Form_Search crm-search-form']/table//tbody/tr[1]/td[8]/span/a[text()='View']"); + $this->waitForElementPresent("xpath=//form[@class='CRM_Event_Form_Search crm-search-form']/table//tbody/tr[1]/td[8]/span//a[text()='View']"); //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->click("xpath=//form[@class='CRM_Event_Form_Search crm-search-form']/table/tbody/tr[1]/td[8]/span//a[text()='View']"); $this->waitForElementPresent("xpath=//button//span[contains(text(),'Done')]"); $this->webtestVerifyTabularData( @@ -143,7 +143,7 @@ class WebTest_Event_AdditionalPaymentTest extends CiviSeleniumTestCase { ); $this->clickAjaxLink("xpath=//button//span[contains(text(),'Done')]"); - $this->waitForElementPresent("xpath=id('ParticipantView')/div[2]/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']"); + $this->waitForElementPresent("xpath=//form[@id='ParticipantView']//div/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span//a[text()='View']"); // make additional payment // 1 - check for links presence on participant view and edit page $this->waitForElementPresent("xpath=//form[@id='ParticipantView']//div//table//tbody//td[@id='payment-info']//a[contains(text(), 'Record Payment')]"); diff --git a/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php b/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php index cc28803c01..04cb59052d 100644 --- a/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php +++ b/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php @@ -201,9 +201,9 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase { $this->waitForElementPresent("xpath=//table[@class='display dataTable no-footer']/tbody/tr/td[9]/span/a[contains(text(), 'View')]"); // click through to the membership view screen - $this->click("xpath=//table[@class='display dataTable no-footer']/tbody/tr/td[9]/span/a[contains(text(), 'View')]"); - $this->waitForElementPresent("_qf_MembershipView_cancel-bottom"); + $this->click("xpath=//table[@class='display dataTable no-footer']/tbody/tr/td[9]/span/a[contains(text(), 'View')]"); + $this->waitForElementPresent("xpath=//button//span[contains(text(),'Done')]"); $joinDate = date('F jS, Y'); $startDate = date('F jS, Y', strtotime("+1 month")); -- 2.25.1