From: Jitendra Purohit Date: Mon, 28 Jul 2014 10:36:14 +0000 (+0530) Subject: CRM-15021 Web Test Fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=11b9c22df86129e9d84015d3dda4264dbe6654c0;p=civicrm-core.git CRM-15021 Web Test Fix --- diff --git a/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php b/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php index 87bf29c322..26e906d311 100644 --- a/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php +++ b/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php @@ -69,6 +69,19 @@ class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase { foreach ($texts as $text) { $this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text); } + + // Disable and re-enable Other Amounts (verify fix for CRM-15021) + $this->openCiviPage("admin/contribute/amount", "reset=1&action=update&id=$pageId", '_qf_Amount_next-bottom'); + $this->click("is_allow_other_amount"); + $this->clickLink("_qf_Amount_upload_done-bottom"); + $this->openCiviPage("contribute/transact", "reset=1&action=preview&id=$pageId", '_qf_Main_upload-bottom'); + $this->assertFalse($this->isTextPresent('Other Amount'), 'Other Amount present but not expected.'); + $this->openCiviPage("admin/contribute/amount", "reset=1&action=update&id=$pageId", '_qf_Amount_next-bottom'); + $this->click("is_allow_other_amount"); + $this->clickLink("_qf_Amount_upload_done-bottom"); + $this->openCiviPage("contribute/transact", "reset=1&action=preview&id=$pageId", '_qf_Main_upload-bottom'); + $this->assertTrue($this->isTextPresent('Other Amount'), 'Other Amount not present but expected.'); + $this->isElementPresent("xpath=//div[@class='content other_amount-content']/input"); } // CRM-12510 Test copy contribution page