webtest to verify membership dates as per the contribution receive_date
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Thu, 9 Apr 2015 11:19:03 +0000 (16:49 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Thu, 9 Apr 2015 11:19:03 +0000 (16:49 +0530)
tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php

index c331b19ebc9c3c35d6ac2b42145fb5e4484d70f4..af869d92302c2abfb8b3cec17e5c7ea3d578b7e4 100644 (file)
@@ -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();