From 5175c5ab1ef226e7f12034ec6197656afebaed57 Mon Sep 17 00:00:00 2001 From: Web Access Date: Thu, 19 Mar 2015 18:46:09 +0530 Subject: [PATCH] Webtest Fixes --- tests/phpunit/WebTest/Campaign/ActivityTest.php | 2 +- tests/phpunit/WebTest/Campaign/OnlineEventRegistrationTest.php | 2 +- tests/phpunit/WebTest/Event/AdditionalPaymentTest.php | 2 +- tests/phpunit/WebTest/Event/PricesetMaxCountTest.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/WebTest/Campaign/ActivityTest.php b/tests/phpunit/WebTest/Campaign/ActivityTest.php index 8fb39de06c..1e9ede236a 100644 --- a/tests/phpunit/WebTest/Campaign/ActivityTest.php +++ b/tests/phpunit/WebTest/Campaign/ActivityTest.php @@ -202,7 +202,7 @@ class WebTest_Campaign_ActivityTest extends CiviSeleniumTestCase { $this->waitForElementPresent("xpath=//button//span[contains(text(),'Done')]"); // verify Activity created - $this->verifyText("xpath=//form[@id='Activity']/div[2]/table/tbody/tr[5]/td[2]/span", $campaignTitle); + $this->verifyText("xpath=//form[@id='Activity']//div/table/tbody/tr[5]/td[2]/span", $campaignTitle); } } diff --git a/tests/phpunit/WebTest/Campaign/OnlineEventRegistrationTest.php b/tests/phpunit/WebTest/Campaign/OnlineEventRegistrationTest.php index aca32ca74b..46ba415927 100644 --- a/tests/phpunit/WebTest/Campaign/OnlineEventRegistrationTest.php +++ b/tests/phpunit/WebTest/Campaign/OnlineEventRegistrationTest.php @@ -360,7 +360,7 @@ class WebTest_Campaign_OnlineEventRegistrationTest extends CiviSeleniumTestCase $this->waitForElementPresent("xpath=//div[@id='participantSearch']"); $this->click("xpath=//div[@id='participantSearch']/table/tbody/tr/td[11]/span[1]/a[2][text()='Edit']"); $this->waitForElementPresent("_qf_Participant_cancel-bottom"); - $this->assertElementContainsText("xpath=//form[@id='Participant']/div[2]/div/table[@class='form-layout-compressed']/tbody/tr[4]/td[2]/select", "$campaignTitle"); + $this->assertElementContainsText("xpath=//form[@id='Participant']//div/div/table/tbody//tr/td[2]/select", "$campaignTitle"); } } diff --git a/tests/phpunit/WebTest/Event/AdditionalPaymentTest.php b/tests/phpunit/WebTest/Event/AdditionalPaymentTest.php index 43b21610a4..b9322d5dc0 100644 --- a/tests/phpunit/WebTest/Event/AdditionalPaymentTest.php +++ b/tests/phpunit/WebTest/Event/AdditionalPaymentTest.php @@ -145,7 +145,7 @@ class WebTest_Event_AdditionalPaymentTest extends CiviSeleniumTestCase { $this->waitForElementPresent("xpath=id('ParticipantView')/div[2]/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=id('ParticipantView')//td[@id='payment-info']//a[contains(text(), 'Record Payment')]"); + $this->waitForElementPresent("xpath=//form[@id='ParticipantView']//div//table//tbody//td[@id='payment-info']//a[contains(text(), 'Record Payment')]"); $this->click("xpath=id('ParticipantView')//div[@class='action-link']/div/a/span[contains(text(), 'Edit')]"); $this->waitForElementPresent("xpath=id('ParticipantView')//td[@id='payment-info']//a[contains(text(), 'Record Payment')]"); $this->clickLinkSuppressPopup("xpath=id('ParticipantView')//td[@id='payment-info']//a[contains(text(), 'Record Payment')]", 'AdditionalPayment'); diff --git a/tests/phpunit/WebTest/Event/PricesetMaxCountTest.php b/tests/phpunit/WebTest/Event/PricesetMaxCountTest.php index 512e3de4ce..8412042e99 100644 --- a/tests/phpunit/WebTest/Event/PricesetMaxCountTest.php +++ b/tests/phpunit/WebTest/Event/PricesetMaxCountTest.php @@ -1111,7 +1111,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { // Go to Fees tab $this->click('link=Fees'); $this->waitForElementPresent('_qf_Fee_upload-bottom'); - $this->click('xpath=//form[@id="Fee"]/div[2]/table/tbody/tr[2]/td[2]/label[contains(text(), "Yes")]'); + $this->click('xpath=//form[@id="Fee"]//div/table/tbody//tr//td/label[contains(text(), "Yes")]'); $processorName = $params['payment_processor']; $this->click("xpath=//tr[@class='crm-event-manage-fee-form-block-payment_processor']/td[2]/label[text()='$processorName']"); $this->select('financial_type_id', 'value=4'); -- 2.25.1