diff options
author | Olivier Paroz <github@oparoz.com> | 2015-08-11 03:34:03 +0300 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-08-11 03:34:03 +0300 |
commit | b84508a0b687b91b623c6f81ea99e5fe40daa846 (patch) | |
tree | fdc2ffb7294a715d6f0a20d35fc135030d905aa6 /tests/acceptance | |
parent | a8b1af48860f359435fa451fa9c765c420b3dd33 (diff) |
1st acceptance and api tests
Diffstat (limited to 'tests/acceptance')
-rw-r--r-- | tests/acceptance/LoginCept.php | 9 | ||||
-rw-r--r-- | tests/acceptance/SignInAsUserCept.php | 18 | ||||
-rw-r--r-- | tests/acceptance/_bootstrap.php | 2 |
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 |