X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FGeneric%2FCheckDashboardTest.php;h=131a9a8904ae4a9073c6d8d813b55b0c620845f5;hb=a953e3e44d504c65ced19fac8c7ab8087d5f2072;hp=081669ebb9348a80e33c5cdd5f548836e95ae892;hpb=d668c0e4e0671c69677d3b9975f1341e9b0492cf;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Generic/CheckDashboardTest.php b/tests/phpunit/WebTest/Generic/CheckDashboardTest.php index 081669ebb9..131a9a8904 100644 --- a/tests/phpunit/WebTest/Generic/CheckDashboardTest.php +++ b/tests/phpunit/WebTest/Generic/CheckDashboardTest.php @@ -1,9 +1,9 @@ waitForElementPresent("css=li#widget-2 a.fullscreen-icon"); $this->click("css=li#widget-2 a.fullscreen-icon"); $this->waitForElementPresent("ui-id-1"); - $this->assertTrue($this->isTextPresent($widgetTitle)); + $this->waitForTextPresent("$widgetTitle"); // Because it tends to cause problems, all uses of sleep() must be justified in comments // Sleep should never be used for wait for anything to load from the server // Justification for this instance: FIXME sleep(5); - $this->click("link=close"); + $this->click("xpath=//*[@class='ui-button-text'][contains(text(), 'close')]"); } + /** + * @param $widgetConfigureID + * @param $widgetEnabledSelector + */ function _testRemoveDashboardElement($widgetConfigureID, $widgetEnabledSelector) { $this->click("link=Configure Your Dashboard"); $this->waitForElementPresent("dashlets-header-col-0"); @@ -137,7 +149,7 @@ class WebTest_Generic_CheckDashboardTest extends CiviSeleniumTestCase { } else { // click 'Delete Activity' link - $this->click("//table[@id='contact-activity-selector-dashlet']/tbody/tr[1]/td[9]/span//a[text()='Delete']"); + $this->click("//table[@id='contact-activity-selector-dashlet']/tbody/tr[1]/td[8]/span//a[text()='Delete']"); } $this->waitForPageToLoad($this->getTimeoutMsec()); $this->waitForElementPresent("_qf_Activity_next-bottom"); @@ -157,4 +169,3 @@ class WebTest_Generic_CheckDashboardTest extends CiviSeleniumTestCase { } } -