You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.2 KiB
PHTML
47 lines
1.2 KiB
PHTML
8 years ago
|
<?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() {
|
||
8 years ago
|
$this->timeouts()->implicitWait(5000);
|
||
8 years ago
|
}
|
||
|
|
||
|
public function testLogin() {
|
||
|
$this->url('/index.php');
|
||
|
|
||
|
$this->byName("login")->value('admin');
|
||
|
$this->byName("password")->value('password');
|
||
|
$this->byCssSelector('#dijit_form_Button_0_label')->click();
|
||
|
|
||
|
$this->byCssSelector('#feedTree')->displayed();
|
||
|
}
|
||
|
|
||
8 years ago
|
public function testBasicDialogs() {
|
||
|
$this->testLogin();
|
||
|
|
||
|
$this->execute(["script" => "quickAddFilter()", "args" => []]);
|
||
|
$this->byCssSelector("#filterEditDlg")->displayed();
|
||
|
|
||
|
$this->execute(["script" => "dijit.byId('filterEditDlg').hide();", "args" => []]);
|
||
|
|
||
|
$this->execute(["script" => "quickAddFeed()", "args" => []]);
|
||
|
$this->byCssSelector("#feedAddDlg")->displayed();
|
||
|
|
||
|
$this->execute(["script" => "dijit.byId('feedAddDlg').hide();", "args" => []]);
|
||
|
}
|
||
|
|
||
8 years ago
|
public function testOpenFeed() {
|
||
|
$this->testLogin();
|
||
|
|
||
|
$this->byCssSelector('#dijit__TreeNode_3')->click();
|
||
|
|
||
|
$this->byCssSelector('#RROW-1 > div.cdmHeader')->displayed();
|
||
|
}
|
||
8 years ago
|
}
|