+--------------------------------------------------------------------+
*/
-
require_once 'CiviTest/CiviSeleniumTestCase.php';
class WebTest_Case_CaseDashboardTest extends CiviSeleniumTestCase {
// The header text of the table changes too
$this->assertElementContainsText('crm-container', "Summary of Case Involvement");
- $this->click("name=allupcoming value=1");
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForElementPresent("css=a.button");
+ $this->clickLink("name=allupcoming value=1", "css=a.button");
$this->assertTrue($this->isChecked("name=allupcoming value=1"), 'Selection of All Cases failed.');
$this->assertElementContainsText('crm-container', "Summary of All Cases");
$this->openCiviPage('case', 'reset=1', 'css=a.button');
// Click on find my cases and check if right radio is checked
- $this->click("name=find_my_cases");
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForElementPresent("css=input.form-submit");
+ $this->clickLink("name=find_my_cases", "css=input.form-submit");
$this->assertTrue($this->isChecked("name=case_owner value=2"), 'Find my cases button not properly setting search form value to my cases.');
// Go back to dashboard
$this->openCivipage('case', 'reset=1', 'css=a.button');
// Click on a drilldown cell and check if right radio is checked
- $this->click("css=a.crm-case-summary-drilldown");
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForElementPresent("css=input.form-submit");
+ $this->clickLink("css=a.crm-case-summary-drilldown", "css=input.form-submit");
$this->assertTrue($this->isChecked("name=case_owner value=1"), 'Drilldown on dashboard summary cells not properly setting search form value to all cases.');
// Go back to dashboard and reset to my cases
$this->openCiviPage('case', 'reset=1', 'css=a.button');
- $this->click("name=allupcoming value=0");
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForElementPresent("css=a.button");
+ $this->clickLink("name=allupcoming value=0", "css=a.button");
// Click on a drilldown cell and check if right radio is checked
- $this->click("css=a.crm-case-summary-drilldown");
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForElementPresent("css=input.form-submit");
+ $this->clickLink("css=a.crm-case-summary-drilldown", "css=input.form-submit");
$this->assertTrue($this->isChecked("name=case_owner value=2"), 'Drilldown on dashboard summary cells not properly setting search form value to my cases.');
}
}