summaryrefslogtreecommitdiff
path: root/tests/functional/BasicTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/BasicTest.php')
-rw-r--r--tests/functional/BasicTest.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/functional/BasicTest.php b/tests/functional/BasicTest.php
new file mode 100644
index 000000000..58041ac32
--- /dev/null
+++ b/tests/functional/BasicTest.php
@@ -0,0 +1,46 @@
+<?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('/index.php');
+
+ $this->byName("login")->value('admin');
+ $this->byName("password")->value('password');
+ $this->byCssSelector('#dijit_form_Button_0_label')->click();
+
+ $this->byCssSelector('#feedTree')->displayed();
+ }
+
+ 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" => []]);
+ }
+
+ public function testOpenFeed() {
+ $this->testLogin();
+
+ $this->byCssSelector('#dijit__TreeNode_3')->click();
+
+ $this->byCssSelector('#RROW-1 > div.cdmHeader')->displayed();
+ }
+}