From 88a80394dd9520facf96af10fbdf9aed6c856d44 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Wed, 22 Jun 2016 18:43:32 +0530 Subject: [PATCH] webtest fixes --- tests/phpunit/WebTest/Contact/SearchBuilderTest.php | 2 +- tests/phpunit/WebTest/Contribute/OfflineContributionTest.php | 4 +--- .../WebTest/Contribute/OfflineRecurContributionTest.php | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/phpunit/WebTest/Contact/SearchBuilderTest.php b/tests/phpunit/WebTest/Contact/SearchBuilderTest.php index 76e1c85b5b..bfc151bf69 100644 --- a/tests/phpunit/WebTest/Contact/SearchBuilderTest.php +++ b/tests/phpunit/WebTest/Contact/SearchBuilderTest.php @@ -469,7 +469,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase { $this->webtestFillDate('start_date'); // Clicking save. - $this->click("_qf_Membership_upload"); + $this->clickLink("_qf_Membership_upload"); // page was loaded $this->waitForTextPresent("Membership StandaloneAddTest Webtest"); diff --git a/tests/phpunit/WebTest/Contribute/OfflineContributionTest.php b/tests/phpunit/WebTest/Contribute/OfflineContributionTest.php index 6e2d73ae14..1c7b2fc447 100644 --- a/tests/phpunit/WebTest/Contribute/OfflineContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/OfflineContributionTest.php @@ -387,9 +387,7 @@ class WebTest_Contribute_OfflineContributionTest extends CiviSeleniumTestCase { if ($label == 'sort_name') { continue; } - $this->verifyText("xpath=//form[@id='ContributionView']//table/tbody/tr/td[text()='{$label}']/following-sibling::td", - preg_quote($value) - ); + $this->assertElementContainsText("xpath=//form[@id='ContributionView']//table/tbody/tr/td[text()='{$label}']/following-sibling::td", "{$value}"); } // now find contact and go back to contact summary diff --git a/tests/phpunit/WebTest/Contribute/OfflineRecurContributionTest.php b/tests/phpunit/WebTest/Contribute/OfflineRecurContributionTest.php index ad35777aaf..f431101271 100644 --- a/tests/phpunit/WebTest/Contribute/OfflineRecurContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/OfflineRecurContributionTest.php @@ -104,9 +104,7 @@ class WebTest_Contribute_OfflineRecurContributionTest extends CiviSeleniumTestCa ); foreach ($verifyData as $label => $value) { - $this->verifyText("xpath=//form[@id='ContributionView']//table/tbody/tr/td[text()='{$label}']/following-sibling::td", - preg_quote($value) - ); + $this->assertElementContainsText("xpath=//form[@id='ContributionView']//table/tbody/tr/td[text()='{$label}']/following-sibling::td", $value); } } -- 2.25.1