From 3f4fcdb9208a9106cdd8c7969302b8f7df3cb783 Mon Sep 17 00:00:00 2001 From: Rohan Katkar Date: Tue, 9 Sep 2014 13:20:11 +0530 Subject: [PATCH] Additional fix in webtest --- tests/phpunit/WebTest/Case/ActivityToCaseTest.php | 7 +++---- tests/phpunit/WebTest/Pledge/StandaloneAddTest.php | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/WebTest/Case/ActivityToCaseTest.php b/tests/phpunit/WebTest/Case/ActivityToCaseTest.php index df56a55bf8..fe83fcc48e 100644 --- a/tests/phpunit/WebTest/Case/ActivityToCaseTest.php +++ b/tests/phpunit/WebTest/Case/ActivityToCaseTest.php @@ -88,10 +88,10 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase { function testLinkCases() { $this->webtestLogin(); - - // Enable CiviCase module if necessary + + // Enable CiviCase module if necessary $this->enableComponents("CiviCase"); - + //Add Case 1 $this->openCiviPage('case/add', 'reset=1&action=add&atype=13&context=standalone', '_qf_Case_upload-bottom'); @@ -420,7 +420,6 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase { //Is custom field created $this->waitForText('crm-notification-container', "Custom field '$textFieldLabel' has been saved."); - //$this->waitForElementPresent("xpath=//div[@id='field_page']//div//table/tbody//tr/td/span[text()='$textFieldLabel']"); $textFieldId = explode('&id=', $this->getAttribute("xpath=//table[@id='options']/tbody//tr/td[1]/span[text()='$textFieldLabel']/../../td[8]/span/a[1][text()='Edit Field']/@href")); $textFieldId = $textFieldId[1]; diff --git a/tests/phpunit/WebTest/Pledge/StandaloneAddTest.php b/tests/phpunit/WebTest/Pledge/StandaloneAddTest.php index 1cde952df6..1cc7adc45e 100644 --- a/tests/phpunit/WebTest/Pledge/StandaloneAddTest.php +++ b/tests/phpunit/WebTest/Pledge/StandaloneAddTest.php @@ -91,6 +91,8 @@ class WebTest_Pledge_StandaloneAddTest extends CiviSeleniumTestCase { $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a"); $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a"); + $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span[2]/a"); + $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[2]/td[2]/table/tbody/tr[2]/td[8]/a[text()='Record Payment']"); } } -- 2.25.1