Should work better.
This commit is contained in:
parent
3a3d473161
commit
b70255da84
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
require_once 'vendor/autoload.php';
|
require_once 'vendor/autoload.php';
|
||||||
|
|
||||||
class WebDriverDemo extends Sauce\Sausage\WebDriverTestCase
|
class Cops extends Sauce\Sausage\WebDriverTestCase
|
||||||
{
|
{
|
||||||
public static $browsers = array(
|
public static $browsers = array(
|
||||||
// run FF15 on Windows 8 on Sauce
|
// run FF15 on Windows 8 on Sauce
|
||||||
|
@ -74,17 +74,21 @@ class WebDriverDemo extends Sauce\Sausage\WebDriverTestCase
|
||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
|
if (isset ($_SERVER["TRAVIS_JOB_NUMBER"])) {
|
||||||
$caps = $this->getDesiredCapabilities();
|
$caps = $this->getDesiredCapabilities();
|
||||||
$caps['build'] = getenv ("TRAVIS_JOB_NUMBER");
|
$caps['build'] = getenv ("TRAVIS_JOB_NUMBER");
|
||||||
//$caps['tunnel_id'] = getenv ("TRAVIS_JOB_NUMBER");
|
|
||||||
$caps['name'] = "COPS ";
|
|
||||||
$this->setDesiredCapabilities($caps);
|
$this->setDesiredCapabilities($caps);
|
||||||
|
}
|
||||||
parent::setUp ();
|
parent::setUp ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setUpPage()
|
public function setUpPage()
|
||||||
{
|
{
|
||||||
|
if (isset ($_SERVER["TRAVIS_JOB_NUMBER"])) {
|
||||||
$this->url('http://127.0.0.1:8888/index.php');
|
$this->url('http://127.0.0.1:8888/index.php');
|
||||||
|
} else {
|
||||||
|
$this->url('http://cops-demo.slucas.fr/index.php');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function string_to_ascii($string)
|
public function string_to_ascii($string)
|
||||||
|
@ -108,27 +112,24 @@ class WebDriverDemo extends Sauce\Sausage\WebDriverTestCase
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
$this->spinAssert("Home Title", $title_test, [ "COPS" ]);
|
$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 ();
|
||||||
|
|
||||||
$this->spinAssert("Author Title", $title_test, [ "AUTHORS" ]);
|
$this->spinAssert("Author Title", $title_test, [ "AUTHORS" ]);
|
||||||
|
}
|
||||||
|
|
||||||
// $cog = $this->byId ("searchImage");
|
public function testCog()
|
||||||
// try {
|
{
|
||||||
// $search = $this->byName ("query");
|
$cog = $this->byId ("searchImage");
|
||||||
// $this->fail ();
|
|
||||||
// }
|
|
||||||
// catch (Exception $e) {
|
|
||||||
// }
|
|
||||||
|
|
||||||
// $search = $this->byName ("query");
|
$search = $this->byName ("query");
|
||||||
// $this->assertFalse ($search->displayed ());
|
$this->assertFalse ($search->displayed ());
|
||||||
|
|
||||||
// $cog->click ();
|
$cog->click ();
|
||||||
|
|
||||||
// $search = $this->byName ("query");
|
$search = $this->byName ("query");
|
||||||
// $this->assertTrue ($search->displayed ());
|
$this->assertTrue ($search->displayed ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
/*
|
/*
|
||||||
* Catalog's title
|
* Catalog's title
|
||||||
*/
|
*/
|
||||||
$config['cops_title_default'] = "COPS";
|
$config['cops_title_default'] = "COPS DEMO";
|
||||||
|
|
||||||
// $config['cops_server_side_render'] = ".";
|
// $config['cops_server_side_render'] = ".";
|
||||||
|
|
Loading…
Reference in a new issue