*/
function checkForErrorsOnPage() {
foreach (array('Access denied', 'Page not found') as $err) {
- if ($this->isElementPresent("xpath=//h1[text()='$err']")) {
- $this->fail("\"$err\" encountered at " . $this->getLocation());
+ if ($this->isElementPresent("xpath=//h1[contains(., '$err')]")) {
+ $this->fail("'$err' encountered at " . $this->getLocation() . "\nwhile logged in as '{$this->loggedInAs}'");
}
}
if ($this->isElementPresent("xpath=//span[text()='Sorry but we are not able to provide this at the moment.']")) {
}
function testCreateCampaign() {
-
- $this->webtestLogin();
+ // Fixme: testing a theory that this test was failing due to permissions
+ $this->webtestLogin('admin');
// Create new group
$title = substr(sha1(rand()), 0, 7);
);
$this->changePermissions($permissions);
- // Log in as demo user
- $this->webtestLogin();
+ // Fixme: testing a theory that this test was failing due to permissions
+ //$this->webtestLogin();
// Create new group
$title = substr(sha1(rand()), 0, 7);