From: jitendrapurohit Date: Fri, 2 Jan 2015 12:34:12 +0000 (+0530) Subject: webtest fixes 4.6 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=687bced05c15702d7704f27215cc9f50ed89f660;p=civicrm-core.git webtest fixes 4.6 --- diff --git a/tests/phpunit/WebTest/Contribute/AddPricesetTest.php b/tests/phpunit/WebTest/Contribute/AddPricesetTest.php index a85e9411c6..37159d902f 100644 --- a/tests/phpunit/WebTest/Contribute/AddPricesetTest.php +++ b/tests/phpunit/WebTest/Contribute/AddPricesetTest.php @@ -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); diff --git a/tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php b/tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php index c66110e3dd..6b08711fd5 100644 --- a/tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/OnlineRecurContributionTest.php @@ -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); diff --git a/tests/phpunit/WebTest/Event/PCPAddTest.php b/tests/phpunit/WebTest/Event/PCPAddTest.php index 27998b7164..fddc73fd24 100644 --- a/tests/phpunit/WebTest/Event/PCPAddTest.php +++ b/tests/phpunit/WebTest/Event/PCPAddTest.php @@ -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( diff --git a/tests/phpunit/WebTest/Report/RolePermissionReportTest.php b/tests/phpunit/WebTest/Report/RolePermissionReportTest.php index a3a23aa006..1dc6e8f1df 100644 --- a/tests/phpunit/WebTest/Report/RolePermissionReportTest.php +++ b/tests/phpunit/WebTest/Report/RolePermissionReportTest.php @@ -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');