]> git.wh0rd.org Git - tt-rss.git/blob - tests/functional/BasicTest.php
combined mode (and more) css class name updates
[tt-rss.git] / tests / functional / BasicTest.php
1 <?php
2 class BasicTest extends PHPUnit_Extensions_Selenium2TestCase {
3
4         public function setUp() {
5                 $this->setHost('localhost');
6                 $this->setPort(4444);
7                 $this->setBrowserUrl('http://localhost/tt-rss/');
8                 $this->setBrowser('firefox');
9         }
10
11         public function setUpPage() {
12                 $this->timeouts()->implicitWait(5000);
13         }
14
15         public function testLogin() {
16                 $this->url('/index.php');
17
18                 $this->byName("login")->value('admin');
19                 $this->byName("password")->value('password');
20                 $this->byCssSelector('#dijit_form_Button_0_label')->click();
21
22                 $this->byCssSelector('#feedTree')->displayed();
23         }
24
25         public function testBasicDialogs() {
26                 $this->testLogin();
27
28                 $this->execute(["script" => "quickAddFilter()", "args" => []]);
29                 $this->byCssSelector("#filterEditDlg")->displayed();
30
31                 $this->execute(["script" => "dijit.byId('filterEditDlg').hide();", "args" => []]);
32
33                 $this->execute(["script" => "quickAddFeed()", "args" => []]);
34                 $this->byCssSelector("#feedAddDlg")->displayed();
35
36                 $this->execute(["script" => "dijit.byId('feedAddDlg').hide();", "args" => []]);
37         }
38
39         public function testOpenFeed() {
40                 $this->testLogin();
41
42                 $this->byCssSelector('#dijit__TreeNode_3')->click();
43
44                 $this->byCssSelector('#RROW-1 > .header')->displayed();
45         }
46 }