From: Web Access Date: Mon, 2 May 2016 13:18:14 +0000 (+0530) Subject: Webtest-CRM-18484 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=47bead505cfff2035f1d735f986a0ccaf29e231c;p=civicrm-core.git Webtest-CRM-18484 --- diff --git a/tests/phpunit/WebTest/Report/DonarReportTest.php b/tests/phpunit/WebTest/Report/DonarReportTest.php index 0070b0ad4f..f5b871ba4d 100644 --- a/tests/phpunit/WebTest/Report/DonarReportTest.php +++ b/tests/phpunit/WebTest/Report/DonarReportTest.php @@ -115,4 +115,40 @@ class WebTest_Report_DonarReportTest extends CiviSeleniumTestCase { $this->verifyText("xpath=//table[@class='report-layout statistics-table']/tbody/tr[3]/td", "Is greater than or equal to 10"); } + /** + * CRM-18484: To check the filter criteria 'is between' + */ + public function testCheckIsBetweenFilter() { + $this->webtestLogin(); + + //add contact + $this->openCiviPage('contact/add', 'reset=1&ct=Individual', '_qf_Contact_cancel-bottom'); + $firstName = 'Jo' . substr(sha1(rand()), 0, 4); + $lastName = 'Ad' . substr(sha1(rand()), 0, 7); + $this->type('first_name', $firstName); + $this->type('last_name', $lastName); + + //address section + $this->click("xpath=//div[@id='addressBlockId']/div"); + $this->waitForElementPresent("address_1_street_address"); + $this->type("address_1_street_address", "902C El Camino Way SW"); + $this->type("address_1_city", "Dumfries"); + $this->type("address_1_postal_code", "1234"); + $this->click("address_1_country_id"); + $this->select("address_1_country_id", "value=" . $this->webtestGetValidCountryID()); + $this->click("_qf_Contact_upload_view-bottom"); + $this->waitForPageToLoad($this->getTimeoutMsec()); + + $this->openCiviPage('report/instance/1', 'reset=1&output=criteria', '_qf_Summary_submit_csv'); + $this->click("fields_postal_code"); + $this->click("xpath=//div[@class='crm-report-criteria']/div[@id='mainTabContainer']/ul//li/a[text()='Filters']"); + $this->waitForElementPresent('gid_value'); + $this->select('postal_code_op', "value=bw"); + $this->waitForElementPresent('postal_code_max'); + $this->type('postal_code_max', '1234'); + $this->click("_qf_Summary_submit"); + $this->waitForPageToLoad($this->getTimeoutMsec()); + $this->assertElementContainsText("xpath=//table[@class='report-layout display']/tbody//tr/td[1]/a", "{$lastName}, {$firstName}"); + } + }