$this->assertElementContainsText("xpath=//*[@id='$fieldid']/preceding-sibling::div[1]/", $value);
}
}
+
+ /**
+ * Wait for unobtrusive status message as set by CRM.status
+ */
+ function waitForStatusMsg() {
+ $this->waitForElementPresent("css=.crm-status-box-outer.status-success");
+ }
/**
* function to enable or disable Pop-ups via Display Preferences
else {
$this->assertNotChecked('ajaxPopupsEnabled');
}
- $this->click("_qf_Display_next-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Display_next-bottom");
}
}
$this->click("css=li#tab_tag a");
$this->waitForElementPresent("css=div#tagtree");
$this->click("xpath=//ul/li/span/label[text()=\"$tagName\"]");
- $this->waitForElementPresent("css=.success");
-
- // is status message correct?
- $this->waitForTextPresent("Saved");
- $this->waitForText('crm-notification-container', "Saved");
+ $this->waitForStatusMsg();
// go to event tab and register for event ( auto add activity and contribution )
$this->click("css=li#tab_participant a");
// check tag we have created
$this->click("xpath=//ul/li/span/label[text()=\"$tagName\"]");
- $this->waitForElementPresent("css=.success");
-
- // Is status message correct?
- $this->waitForText('crm-notification-container', "Saved");
+ $this->waitForStatusMsg();
}
function testTagSetContact() {
// select tag
$this->click("xpath=//ul/li/span/label[text()=\"$tagName\"]");
- $this->waitForElementPresent("css=.success");
+ $this->waitForStatusMsg();
// visit contact search page
$this->openCiviPage("contact/search", "reset=1");