Try to correctly set the home page.
This commit is contained in:
parent
31954249b3
commit
2f6676760f
|
@ -89,6 +89,14 @@ class Cops extends Sauce\Sausage\WebDriverTestCase
|
||||||
} else {
|
} else {
|
||||||
$this->url('http://cops-demo.slucas.fr/index.php');
|
$this->url('http://cops-demo.slucas.fr/index.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$driver = $this;
|
||||||
|
$title_test = function($value) use ($driver) {
|
||||||
|
$text = $driver->byXPath('//h1')->text ();
|
||||||
|
return $text == $value;
|
||||||
|
};
|
||||||
|
|
||||||
|
$this->spinAssert("Home Title", $title_test, [ "COPS DEMO" ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function string_to_ascii($string)
|
public function string_to_ascii($string)
|
||||||
|
@ -110,10 +118,7 @@ class Cops extends Sauce\Sausage\WebDriverTestCase
|
||||||
$text = $driver->byXPath('//h1')->text ();
|
$text = $driver->byXPath('//h1')->text ();
|
||||||
return $text == $value;
|
return $text == $value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
$this->spinAssert("Home Title", $title_test, [ "COPS DEMO" ]);
|
|
||||||
|
|
||||||
$author = $this->byXPath ('//h2[contains(text(), "Authors")]');
|
$author = $this->byXPath ('//h2[contains(text(), "Authors")]');
|
||||||
$author->click ();
|
$author->click ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue