add autogenerated comment blocks to tests dir
[civicrm-core.git] / tests / phpunit / WebTest / Report / DonarReportTest.php
index 316cda0fbc56d665719673b896a8d85c7d53c677..24669f882b6cbecd94ac4bd6e4c3952410337dbe 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  +--------------------------------------------------------------------+
 */
 
-
 require_once 'CiviTest/CiviSeleniumTestCase.php';
+
+/**
+ * Class WebTest_Report_DonarReportTest
+ */
 class WebTest_Report_DonarReportTest extends CiviSeleniumTestCase {
 
   protected function setUp() {
@@ -33,21 +36,11 @@ class WebTest_Report_DonarReportTest extends CiviSeleniumTestCase {
   }
 
   function testDonarReportPager() {
-    // This is the path where our testing install resides.
-    // The rest of URL is defined in CiviSeleniumTestCase base class, in
-    // class attributes.
-    $this->open($this->sboxPath);
-
-    // Logging in. Remember to wait for page to load. In most cases,
-    // you can rely on 30000 as the value that allows your test to pass, however,
-    // sometimes your test might fail because of this. In such cases, it's better to pick one element
-    // somewhere at the end of page and use waitForElementPresent on it - this assures you, that whole
-    // page contents loaded and you can continue your test execution.
     $this->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());
@@ -86,7 +79,7 @@ class WebTest_Report_DonarReportTest extends CiviSeleniumTestCase {
     $this->assertElementContainsText('css=div#Contribute > table.report-layout', $reportName);
 
     // Visit report
-    $this->click("link=$reportName");
+    $this->click("xpath=//div[@id='Contribute']//table/tbody//tr/td/a/strong[text() = '$reportName']");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //now select the criteria
@@ -112,4 +105,4 @@ class WebTest_Report_DonarReportTest extends CiviSeleniumTestCase {
     // check if criteria still exits
     $this->assertElementContainsText('css=table.statistics-table', "Is greater than or equal to 10", "Criteria is not selected");
   }
-}
\ No newline at end of file
+}