Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-08-11 03:34:03 +0300
committerOlivier Paroz <github@oparoz.com>2015-08-11 03:34:03 +0300
commitb84508a0b687b91b623c6f81ea99e5fe40daa846 (patch)
treefdc2ffb7294a715d6f0a20d35fc135030d905aa6 /tests/acceptance
parenta8b1af48860f359435fa451fa9c765c420b3dd33 (diff)
1st acceptance and api tests
Diffstat (limited to 'tests/acceptance')
-rw-r--r--tests/acceptance/LoginCept.php9
-rw-r--r--tests/acceptance/SignInAsUserCept.php18
-rw-r--r--tests/acceptance/_bootstrap.php2
3 files changed, 29 insertions, 0 deletions
diff --git a/tests/acceptance/LoginCept.php b/tests/acceptance/LoginCept.php
new file mode 100644
index 00000000..c0ab83ed
--- /dev/null
+++ b/tests/acceptance/LoginCept.php
@@ -0,0 +1,9 @@
+<?php
+use Page\Login as LoginPage;
+
+$I = new AcceptanceTester($scenario);
+$I->am('A standard user');
+$I->wantTo('ensure that I can see the login page');
+
+$I->amOnPage(LoginPage::$URL);
+$I->seeElement(LoginPage::$loginButton);
diff --git a/tests/acceptance/SignInAsUserCept.php b/tests/acceptance/SignInAsUserCept.php
new file mode 100644
index 00000000..75c08325
--- /dev/null
+++ b/tests/acceptance/SignInAsUserCept.php
@@ -0,0 +1,18 @@
+<?php
+use \Page\Acceptance\Login;
+use \Page\Gallery as GalleryPage;
+
+$I = new AcceptanceTester($scenario);
+$I->am('A standard user');
+$I->wantTo('load the Gallery app');
+$I->lookForwardTo('seeing my holiday pictures');
+
+$loginPage = new Login($I);
+$loginPage->login('admin', 'admin');
+$loginPage->confirmLogin();
+
+
+$I->click('.menutoggle');
+$I->click('Gallery', '#navigation');
+$I->seeCurrentUrlEquals(GalleryPage::$URL);
+$I->seeElement(GalleryPage::$contentDiv);
diff --git a/tests/acceptance/_bootstrap.php b/tests/acceptance/_bootstrap.php
new file mode 100644
index 00000000..8a885558
--- /dev/null
+++ b/tests/acceptance/_bootstrap.php
@@ -0,0 +1,2 @@
+<?php
+// Here you can initialize variables that will be available to your tests