add some basic prefs UI tests

This commit is contained in:
Andrew Dolgov 2017-04-25 18:45:11 +03:00
parent 1bf13f9ec7
commit b95e694c7f
2 changed files with 43 additions and 1 deletions

View File

@ -9,7 +9,7 @@ class BasicTest extends PHPUnit_Extensions_Selenium2TestCase {
} }
public function setUpPage() { public function setUpPage() {
$this->timeouts()->implicitWait(10000); $this->timeouts()->implicitWait(5000);
} }
public function testLogin() { public function testLogin() {

View File

@ -0,0 +1,42 @@
<?php
class BasicTest extends PHPUnit_Extensions_Selenium2TestCase {
public function setUp() {
$this->setHost('localhost');
$this->setPort(4444);
$this->setBrowserUrl('http://localhost/tt-rss/');
$this->setBrowser('firefox');
}
public function setUpPage() {
$this->timeouts()->implicitWait(5000);
}
public function testLogin() {
$this->url('/prefs.php');
$this->byName("login")->value('admin');
$this->byName("password")->value('password');
$this->byCssSelector('#dijit_form_Button_0_label')->click();
$this->byCssSelector('#ttrssPrefs')->displayed();
}
public function testTabs() {
$this->byCssSelector("#dijit_layout_AccordionPane_1_wrapper")->displayed();
/* feeds */
$this->execute(["script" => "selectTab('feedConfig');", "args" => []]);
$this->byCssSelector("div.dijitTreeContainer > div.dijitTreeNode")->displayed();
/* filters */
$this->execute(["script" => "selectTab('filterConfig');", "args" => []]);
$this->byCssSelector("div.dijitTreeContainer > div.dijitTreeNode")->displayed();
/* filters */
$this->execute(["script" => "selectTab('labelConfig');", "args" => []]);
$this->byCssSelector("div.dijitTreeContainer > div.dijitTreeNode")->displayed();
}
}