From 75339f53cd4e5d27cd78bfc7d7b1a8a696bfb661 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Thu, 9 Apr 2015 16:49:03 +0530 Subject: [PATCH] webtest to verify membership dates as per the contribution receive_date --- .../Member/OnlineMembershipCreateTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php b/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php index c331b19ebc..af869d9230 100644 --- a/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php +++ b/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php @@ -162,6 +162,23 @@ class WebTest_Member_OnlineMembershipCreateTest extends CiviSeleniumTestCase { } $this->webtestVerifyTabularData($verifyData); + //CRM-15735 - verify membership dates gets changed w.r.t receive_date of contribution. + if ($payLater) { + $receiveDate = date('F jS, Y', strtotime("-1 month")); + $endDate = date('F jS, Y', strtotime("+1 year -1 month -1 day")); + $this->clickAjaxLink("xpath=//button//span[contains(text(),'Edit')]", 'receive_date'); + $this->select('contribution_status_id', 'Completed'); + $this->webtestFillDate('receive_date', '-1 month'); + $this->clickAjaxLink("xpath=//button//span[contains(text(),'Save')]", "xpath=//div[@class='ui-dialog-buttonset']/button[3]/span[2]"); + $updatedData = array( + 'Status' => 'New', + 'Member Since' => $receiveDate, + 'Start date' => $receiveDate, + 'End date' => $endDate, + ); + $this->webtestVerifyTabularData($updatedData); + } + // CRM-8141 signup for membership 2 with same anonymous user info (should create 2 separate membership records because membership orgs are different) //logout $this->webtestLogout(); -- 2.25.1