webtest fixes 4.6
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Fri, 2 Jan 2015 12:34:12 +0000 (18:04 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Fri, 2 Jan 2015 12:34:12 +0000 (18:04 +0530)
tests/phpunit/WebTest/Contribute/AddPricesetTest.php
tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php
tests/phpunit/WebTest/Event/PCPAddTest.php
tests/phpunit/WebTest/Report/RolePermissionReportTest.php

index a85e9411c6a523f51db31cb90cd041d0396b2b2a..37159d902f60cf424201aada379c85bc3bd90571 100644 (file)
@@ -427,7 +427,9 @@ class WebTest_Contribute_AddPricesetTest extends CiviSeleniumTestCase {
     $expected = array(
       'From' => "{$firstName} {$lastName}",
       'Financial Type' => $financialType,
-      'Net Amount' => '$ 590.00',
+      // as per changes made in CRM-15407
+      'Fee Amount' => '$ 1.50',
+      'Net Amount' => '$ 588.50',
       'Contribution Status' => 'Completed',
     );
     $this->webtestVerifyTabularData($expected);
@@ -543,7 +545,9 @@ class WebTest_Contribute_AddPricesetTest extends CiviSeleniumTestCase {
     $expected = array(
       'From' => "{$firstName} {$lastName}",
       'Financial Type' => $financialType,
-      'Net Amount' => '$ 65.00',
+      // as per changes made in CRM-15407
+      'Fee Amount' => '$ 1.50',
+      'Net Amount' => '$ 63.50',
       'Contribution Status' => 'Completed',
     );
     $this->webtestVerifyTabularData($expected);
index c66110e3ddd1b79899a93c96c56c619076f761a6..6b08711fd587a213cf26eec6f8289d82c0ecb4ed 100644 (file)
@@ -121,7 +121,7 @@ class WebTest_Contribute_OnlineRecurContributionTest extends CiviSeleniumTestCas
     // Thank-you page
     $this->waitForElementPresent("thankyou_footer");
     $this->assertTrue($this->isElementPresent('tell-a-friend'), 'Missing tell-a-friend div');
-    $text = 'This recurring contribution will be automatically processed every 1 month(s) for a total 12 installments';
+    $text = 'This recurring contribution will be automatically processed every month for a total 12 installments';
     $this->assertTrue($this->isTextPresent($text), 'Missing recurring contribution text (thank-you): ' . $text);
     $this->assertTrue($this->isTextPresent($contributionAmount), 'Missing contribution amount (thank-you): ' . $contributionAmount);
 
index 27998b7164a9c1c548100a065a389b7db1f95313..fddc73fd249dfb26b23fdeae56d0ae350e88f0b4 100644 (file)
@@ -533,6 +533,9 @@ class WebTest_Event_PCPAddTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("xpath=//form[@id='Search']/div[@class='view-content']/table[2]/tbody/tr[@id='rowid']/td/a[text()='$displayName']");
     $this->click("xpath=//form[@id='Search']/div[@class='view-content']/table[2]/tbody/tr[@id='rowid']/td[8]/a[text()='View']");
     $this->waitForPageToLoad($this->getTimeoutMsec());
+    // as per changes made in CRM-15407
+    $feeAmount = 1.50;
+    $amount = $amount - $feeAmount;
 
     $this->webtestVerifyTabularData(
       array(
index a3a23aa006863181299f6acfe5d3b8480be77c1b..1dc6e8f1df46c63527a24c7c294405094d142e12 100644 (file)
@@ -133,7 +133,7 @@ class WebTest_Report_RolePermissionReportTest extends CiviSeleniumTestCase {
     $this->openCiviPage('report/instance/1', 'reset=1');
 
     //check if the reserved report field is frozen
-    $this->assertTrue($this->isElementPresent("xpath=//div[@id='instanceForm']//table[3]/tbody//tr/td[2]/span/tt[text()='[ ]']"));
+    $this->assertTrue($this->isElementPresent("xpath=//div[@id='report-tab-access']/table/tbody//tr/td[2]/span/tt[text()='[ ]']"));
 
     // let's give full CiviReport permissions.
     $permissions = array(
@@ -156,8 +156,8 @@ class WebTest_Report_RolePermissionReportTest extends CiviSeleniumTestCase {
     $this->openCiviPage('report/instance/1', 'reset=1');
 
     //check if the report criteria and settings is accessible
-    $this->assertTrue($this->isElementPresent("xpath=//form[@id='Summary']//div[@id='id_default']//input[@id='fields_email']"));
-    $this->assertTrue($this->isElementPresent("xpath=//form[@id='Summary']//div[@id='instanceForm']/table//input[@id='title']"));
+    $this->assertTrue($this->isElementPresent("xpath=//div[@id='report-tab-col-groups']/table/tbody//tr/td[3]/input[@id='fields_email']"));
+    $this->assertTrue($this->isElementPresent("xpath=//div[@id='report-tab-format']/table/tbody//tr/td[2]/input[@id='title']"));
 
     //login as admin and remove reserved permission
     $this->webtestLogin('admin');
@@ -176,14 +176,14 @@ class WebTest_Report_RolePermissionReportTest extends CiviSeleniumTestCase {
     $this->webtestLogin($user, 'Test12345');
     $this->openCiviPage('report/instance/1', 'reset=1');
 
-    if ($this->isElementPresent("xpath=//form[@id='Summary']/div[2]/div/div/div")) {
-      $this->verifyNotText("xpath=//form[@id='Summary']/div[2]/div/div/div", "Report Criteria");
+    if ($this->isElementPresent("xpath=//div[@id='mainTabContainer']/ul/li")) {
+      $this->verifyNotText("xpath=//div[@id='mainTabContainer']/ul/li/a", "Columns");
     }
-    if ($this->isElementPresent("xpath=//form[@id='Summary']/div[2]/div[2]/div")) {
-      $this->verifyNotText("xpath=//form[@id='Summary']/div[2]/div[2]/div", "Report Settings");
+    if ($this->isElementPresent("xpath=//li[@id='tab_settings']")) {
+      $this->verifyNotText("xpath=//li[@id='tab_settings']/a", "Title and Format");
     }
 
-    $this->assertFalse($this->isElementPresent("xpath=//form[@id='Summary']//div[@id='instanceForm']//input[@id='title']"));
+    $this->assertFalse($this->isElementPresent("xpath=//div[@id='report-tab-format']/table/tbody//tr/td[2]/input[@id='title']"));
 
     //login as admin and turn the is_reserved flag off for the instance
     $this->webtestLogin('admin');
@@ -195,8 +195,8 @@ class WebTest_Report_RolePermissionReportTest extends CiviSeleniumTestCase {
     $this->webtestLogin($user, 'Test12345');
     $this->openCiviPage('report/instance/1', 'reset=1');
 
-    $this->assertTrue($this->isElementPresent("xpath=//form[@id='Summary']//div[@id='id_default']//input[@id='fields_email']"));
-    $this->assertTrue($this->isElementPresent("xpath=//form[@id='Summary']//div[@id='instanceForm']//input[@id='title']"));
+    $this->assertTrue($this->isElementPresent("xpath=//div[@id='report-tab-col-groups']/table/tbody//tr/td[3]/input[@id='fields_email']"));
+    $this->assertTrue($this->isElementPresent("xpath=//div[@id='report-tab-format']/table/tbody//tr/td[2]/input[@id='title']"));
 
     //login as admin and delete the role
     $this->webtestLogin('admin');