From 4e38284c8e689def12eeaa00433692bc2077fdb2 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Tue, 7 Oct 2014 18:33:25 +0530 Subject: [PATCH] webtest fixes 4.5 --- tests/phpunit/WebTest/Event/AddEventTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/WebTest/Event/AddEventTest.php b/tests/phpunit/WebTest/Event/AddEventTest.php index 5cf3610f26..1674118335 100644 --- a/tests/phpunit/WebTest/Event/AddEventTest.php +++ b/tests/phpunit/WebTest/Event/AddEventTest.php @@ -808,6 +808,7 @@ class WebTest_Event_AddEventTest extends CiviSeleniumTestCase { $this->select2("event_id", $eventTitle, FALSE); $this->click("xpath=//td[@class='crm-event-form-block-participant_status']/div[@class='listing-box']//div/label[text()='Pending from pay later']"); $this->clickLink('_qf_Search_refresh'); + $this->waitForElementPresent("xpath=//div[@id='participantSearch']/table/tbody//tr/td[11]/span/a[text()='Edit']"); $uRL = $this->getAttribute("xpath=//div[@id='participantSearch']/table/tbody//tr/td[11]/span/a[text()='Edit']@href"); $this->click("xpath=//div[@id='participantSearch']/table/tbody//tr/td[11]/span/a[text()='Edit']"); @@ -821,8 +822,10 @@ class WebTest_Event_AddEventTest extends CiviSeleniumTestCase { $contributionID = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_ParticipantPayment', $pID, 'contribution_id', 'participant_id'); $this->click('_qf_Participant_upload-top'); $this->waitForElementPresent("xpath=//div[@id='participantSearch']/table/tbody//tr/td[11]/span/a[text()='Edit']"); + $this->waitForElementPresent("xpath=//div[@id='participantSearch']/table/tbody//tr/td[11]/span/a[text()='View']"); $this->click("xpath=//div[@id='participantSearch']/table/tbody//tr/td[11]/span/a[text()='View']"); $this->waitForElementPresent("css=.ui-dialog"); + $this->waitForAjaxContent(); $this->verifyFinancialRecords($contributionID); // add participant and 3 additional participant and change status of participant from edit contribution @@ -832,8 +835,8 @@ class WebTest_Event_AddEventTest extends CiviSeleniumTestCase { $this->openCiviPage("event/search?reset=1", "reset=1"); $this->select2("event_id", $eventTitle, FALSE); $this->click("xpath=//td[@class='crm-event-form-block-participant_status']/div[@class='listing-box']//div/label[text()='Pending from pay later']"); - $this->click('_qf_Search_refresh'); - $this->waitForPageToLoad($this->getTimeoutMsec()); + $this->clickLink('_qf_Search_refresh'); + $this->waitForElementPresent("xpath=//div[@id='participantSearch']/table/tbody//tr/td[11]/span/a[text()='View']"); $uRL = $this->getAttribute("xpath=//div[@id='participantSearch']/table/tbody//tr/td[11]/span/a[text()='View']@href"); $this->click("xpath=//div[@id='participantSearch']/table/tbody//tr/td[11]/span/a[text()='View']"); $pID = $this->urlArg('id', $uRL); @@ -843,6 +846,7 @@ class WebTest_Event_AddEventTest extends CiviSeleniumTestCase { $this->waitForElementPresent("_qf_Contribution_upload-bottom"); $this->select('contribution_status_id', 'label=Completed'); $this->clickLink('_qf_Contribution_upload-bottom', '_qf_ParticipantView_cancel-bottom', FALSE); + $this->waitForAjaxContent(); $this->verifyFinancialRecords($contributionID); } -- 2.25.1