webtestLogin(); // now create new donar detail report instance $this->openCiviPage('report/contribute/detail', 'reset=1', '_qf_Detail_submit'); // preview result $this->click("_qf_Detail_submit"); $this->waitForPageToLoad($this->getTimeoutMsec()); // Create report $this->click("css=div.crm-report_setting-accordion div.crm-accordion-header"); $this->waitForElementPresent("title"); $reportName = 'ContributeDetail_' . substr(sha1(rand()), 0, 7); $reportDescription = "New Contribute Detail Report"; // Fill Report Title $this->type("title", $reportName); // Fill Report Description $this->type("description", $reportDescription); // We want navigation menu $this->click("is_navigation"); $this->waitForElementPresent("parent_id"); // Navigation menu under Reports section $this->select("parent_id", "label=Reports"); // Set permission as access CiviCRM $this->select("permission", "value=access CiviCRM"); // click to create report $this->click("_qf_Detail_submit_save"); $this->waitForPageToLoad($this->getTimeoutMsec()); // Open report list $this->openCiviPage('report/list', 'reset=1'); // Is report is resent in list? $this->assertElementContainsText('css=div#Contribute > table.report-layout', $reportName); // Visit report $this->click("xpath=//div[@id='Contribute']//table/tbody//tr/td/a/strong[text() = '$reportName']"); $this->waitForPageToLoad($this->getTimeoutMsec()); //now select the criteria //click report criteria accordian $this->click("css=div.crm-report_criteria-accordion div.crm-accordion-header"); //enter contribution amount $this->select('total_amount_op', "value=gte"); $this->type('total_amount_value', "10"); // click preview $this->click("_qf_Detail_submit"); $this->waitForPageToLoad($this->getTimeoutMsec()); //Is greater than or equal to 100 //check for criteria $this->assertElementContainsText('css=table.statistics-table', "Is greater than or equal to 10", "Criteria is not selected"); //click on next link $this->click("_qf_Detail_submit_save"); $this->waitForPageToLoad($this->getTimeoutMsec()); // check if criteria still exits $this->assertElementContainsText('css=table.statistics-table', "Is greater than or equal to 10", "Criteria is not selected"); } }