From 7c437c476caf9345db7f8eb8fb1dee09b1fac233 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 27 Apr 2017 08:47:21 +0300 Subject: rename functional tests --- tests/functional/BasicTest.php | 46 ++++++++++++++++++++++++++++++++++++++++++ tests/functional/PrefsTest.php | 42 ++++++++++++++++++++++++++++++++++++++ tests/functional/basic.php | 46 ------------------------------------------ tests/functional/prefs.php | 42 -------------------------------------- 4 files changed, 88 insertions(+), 88 deletions(-) create mode 100644 tests/functional/BasicTest.php create mode 100644 tests/functional/PrefsTest.php delete mode 100644 tests/functional/basic.php delete mode 100644 tests/functional/prefs.php (limited to 'tests') 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 @@ +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(); + } +} diff --git a/tests/functional/PrefsTest.php b/tests/functional/PrefsTest.php new file mode 100644 index 000000000..4f2dea4b7 --- /dev/null +++ b/tests/functional/PrefsTest.php @@ -0,0 +1,42 @@ +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(); + + } +} diff --git a/tests/functional/basic.php b/tests/functional/basic.php deleted file mode 100644 index 58041ac32..000000000 --- a/tests/functional/basic.php +++ /dev/null @@ -1,46 +0,0 @@ -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(); - } -} diff --git a/tests/functional/prefs.php b/tests/functional/prefs.php deleted file mode 100644 index 4f2dea4b7..000000000 --- a/tests/functional/prefs.php +++ /dev/null @@ -1,42 +0,0 @@ -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(); - - } -} -- cgit v1.2.3