From 80ba14244d828b34ffcb29c677e2ac86fc958fd4 Mon Sep 17 00:00:00 2001 From: Web Access Date: Tue, 1 Dec 2015 18:40:50 +0530 Subject: [PATCH] Webtests fixes- master --- .../WebTest/Contribute/UpdateBatchPendingContributionTest.php | 2 +- tests/phpunit/WebTest/Event/AddPricesetTest.php | 4 ++-- tests/phpunit/WebTest/Mailing/AddMessageTemplateTest.php | 1 + tests/phpunit/WebTest/Member/StandaloneAddTest.php | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/WebTest/Contribute/UpdateBatchPendingContributionTest.php b/tests/phpunit/WebTest/Contribute/UpdateBatchPendingContributionTest.php index cbb65c8cc7..e675d0c7f8 100644 --- a/tests/phpunit/WebTest/Contribute/UpdateBatchPendingContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/UpdateBatchPendingContributionTest.php @@ -50,7 +50,7 @@ class WebTest_Contribute_UpdateBatchPendingContributionTest extends CiviSelenium $this->click('radio_ts', 'ts_all'); $this->select('task', "label=Update pending contribution status"); - $this->clickLink("_qf_Search_next_action"); + $this->click("_qf_Search_next_action"); $this->select('contribution_status_id', 'label=Completed'); $this->click('_qf_Status_next'); $this->waitForElementPresent("_qf_Result_done"); diff --git a/tests/phpunit/WebTest/Event/AddPricesetTest.php b/tests/phpunit/WebTest/Event/AddPricesetTest.php index 7ee69617eb..f69ffdb641 100644 --- a/tests/phpunit/WebTest/Event/AddPricesetTest.php +++ b/tests/phpunit/WebTest/Event/AddPricesetTest.php @@ -538,7 +538,7 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase { $this->_testVerifyPriceSet($validateStrings, $sid); $this->openCiviPage('event/add', 'reset=1&action=add', '_qf_EventInfo_upload-bottom'); - + $this->waitForElementPresent("_qf_EventInfo_upload-bottom"); $eventTitle = 'My Conference - ' . substr(sha1(rand()), 0, 7); $email = 'Smith' . substr(sha1(rand()), 0, 7) . '@example.com'; $eventDescription = 'Here is a description for this conference.'; @@ -681,7 +681,7 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase { $this->openCiviPage('admin/price/field', "reset=1&action=browse&sid={$sid}", 'newPriceField'); $this->click("xpath=//table[@id='options']/tbody/tr[3]/td[8]/a[text()='Edit Price Options']"); $this->waitForElementPresent("xpath=//span[contains(text(), 'Done')]"); - $this->click("xpath=//tr/td/div[text()='First Night']/../following-sibling::td[8]/span/a[text()='Edit Option']"); + $this->click("xpath=//table[@id='options']/tbody/tr/td/div[text()='First Night']/../following-sibling::td[8]/span/a[text()='Edit Option']"); $this->waitForElementPresent("_qf_Option_cancel"); $this->type('label', 'First Night Edited'); $this->click('_qf_Option_next'); diff --git a/tests/phpunit/WebTest/Mailing/AddMessageTemplateTest.php b/tests/phpunit/WebTest/Mailing/AddMessageTemplateTest.php index d91581e466..76c4359464 100644 --- a/tests/phpunit/WebTest/Mailing/AddMessageTemplateTest.php +++ b/tests/phpunit/WebTest/Mailing/AddMessageTemplateTest.php @@ -44,6 +44,7 @@ class WebTest_Mailing_AddMessageTemplateTest extends CiviSeleniumTestCase { $this->openCiviPage("admin/messageTemplates/add", "action=add&reset=1"); + $this->waitForElementPresent("_qf_MessageTemplates_cancel-bottom"); // Fill message title. if (!$msgTitle) { $msgTitle = 'msg_' . substr(sha1(rand()), 0, 7); diff --git a/tests/phpunit/WebTest/Member/StandaloneAddTest.php b/tests/phpunit/WebTest/Member/StandaloneAddTest.php index 1c5d8f5621..5f9878c3d5 100644 --- a/tests/phpunit/WebTest/Member/StandaloneAddTest.php +++ b/tests/phpunit/WebTest/Member/StandaloneAddTest.php @@ -137,8 +137,8 @@ class WebTest_Member_StandaloneAddTest extends CiviSeleniumTestCase { $this->click("_qf_Membership_upload"); //View Membership - $this->waitForElementPresent("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']"); - $this->click("xpath=//div[@id='memberships']//table/tbody/tr[1]/td[9]/span/a[text()='View']"); + $this->waitForElementPresent("xpath=//table[@class='display dataTable no-footer']/tbody/tr[1]/td[9]/span/a[text()='View']"); + $this->click("xpath=xpath=//table[@class='display dataTable no-footer']/tbody/tr[1]/td[9]/span/a[text()='View']"); $this->waitForElementPresent("_qf_MembershipView_cancel-bottom"); // verify soft credit data -- 2.25.1