Try to correctly set the home page.

This commit is contained in:
Sébastien Lucas 2013-11-29 15:35:12 +01:00
parent 31954249b3
commit 2f6676760f

View file

@ -89,6 +89,14 @@ class Cops extends Sauce\Sausage\WebDriverTestCase
} else {
$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)
@ -110,10 +118,7 @@ class Cops extends Sauce\Sausage\WebDriverTestCase
$text = $driver->byXPath('//h1')->text ();
return $text == $value;
};
$this->spinAssert("Home Title", $title_test, [ "COPS DEMO" ]);
$author = $this->byXPath ('//h2[contains(text(), "Authors")]');
$author->click ();