add backand ticket/index changes, add backand\ticket\index export pdf, xls
This commit is contained in:
@@ -11,18 +11,18 @@
|
||||
class_name: AcceptanceTester
|
||||
modules:
|
||||
enabled:
|
||||
- PhpBrowser
|
||||
# - PhpBrowser
|
||||
- tests\codeception\common\_support\FixtureHelper
|
||||
# you can use WebDriver instead of PhpBrowser to test javascript and ajax.
|
||||
# This will require you to install selenium. See http://codeception.com/docs/04-AcceptanceTests#Selenium
|
||||
# "restart" option is used by the WebDriver to start each time per test-file new session and cookies,
|
||||
# it is useful if you want to login in your app in each test.
|
||||
# - WebDriver
|
||||
- WebDriver
|
||||
config:
|
||||
PhpBrowser:
|
||||
# PhpBrowser:
|
||||
# PLEASE ADJUST IT TO THE ACTUAL ENTRY POINT WITHOUT PATH INFO
|
||||
url: http://localhost:8080
|
||||
# WebDriver:
|
||||
# url: http://localhost:8080
|
||||
# browser: firefox
|
||||
# restart: true
|
||||
# url: http://localhost/fitness-web
|
||||
WebDriver:
|
||||
url: http://localhost
|
||||
browser: firefox
|
||||
restart: true
|
||||
|
||||
@@ -10,11 +10,22 @@ $I->wantTo('ensure login page works');
|
||||
|
||||
$loginPage = LoginPage::openBy($I);
|
||||
|
||||
if (method_exists($I, 'wait')) {
|
||||
$I->wait(10); // only for selenium
|
||||
}
|
||||
|
||||
$I->expectTo('see that login button');
|
||||
$I->see('Fitness');
|
||||
|
||||
/*
|
||||
$I->amGoingTo('submit login form with no data');
|
||||
$loginPage->login('', '');
|
||||
if (method_exists($I, 'wait')) {
|
||||
$I->wait(3); // only for selenium
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
$I->expectTo('see validations errors');
|
||||
$I->see('Username cannot be blank.', '.help-block');
|
||||
$I->see('Password cannot be blank.', '.help-block');
|
||||
@@ -27,16 +38,16 @@ if (method_exists($I, 'wait')) {
|
||||
}
|
||||
$I->expectTo('see validations errors');
|
||||
$I->see('Incorrect username or password.', '.help-block');
|
||||
*/
|
||||
|
||||
$I->amGoingTo('try to login with correct credentials');
|
||||
$loginPage->login('erau', 'password_0');
|
||||
$loginPage->login('admin', 'test');
|
||||
if (method_exists($I, 'wait')) {
|
||||
$I->wait(3); // only for selenium
|
||||
$I->wait(10); // only for selenium
|
||||
}
|
||||
$I->expectTo('see that user is logged');
|
||||
$I->seeLink('Logout (erau)');
|
||||
$I->dontSeeLink('Login');
|
||||
$I->dontSeeLink('Signup');
|
||||
$I->see('Üdvözöljük adminisztrációs felületünkön');
|
||||
//$I->dontSeeLink('Signup');
|
||||
/** Uncomment if using WebDriver
|
||||
* $I->click('Logout (erau)');
|
||||
* $I->dontSeeLink('Logout (erau)');
|
||||
|
||||
30
tests/codeception/backend/acceptance/ObjectCept.php
Normal file
30
tests/codeception/backend/acceptance/ObjectCept.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
use tests\codeception\backend\AcceptanceTester;
|
||||
|
||||
class ObjectCept
|
||||
{
|
||||
private $cookie = null;
|
||||
|
||||
public function _before(AcceptanceTester $I)
|
||||
{
|
||||
}
|
||||
|
||||
public function _after(AcceptanceTester $I)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
// tests
|
||||
public function login(AcceptanceTester $I)
|
||||
{
|
||||
$I->wantTo('entrar al sistema');
|
||||
$I->amOnPage('/');
|
||||
$I->seeInCurrentUrl('/admin/login');
|
||||
$I->fillField('user','perry');
|
||||
$I->fillField('pass','pass-perry');
|
||||
$I->click('Login');
|
||||
$I->see('You\'re logged!');
|
||||
$this->cookie = $I->grabCookie('your-session-cookie-name');
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -14,4 +14,4 @@ settings:
|
||||
config:
|
||||
# the entry script URL (with host info) for functional and acceptance tests
|
||||
# PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
|
||||
test_entry_url: http://localhost:8080/backend/web/index-test.php
|
||||
test_entry_url: http://localhost/fitness-web/backend/web/index-test.php
|
||||
|
||||
@@ -5,6 +5,7 @@ use tests\codeception\common\_pages\LoginPage;
|
||||
|
||||
/* @var $scenario Codeception\Scenario */
|
||||
|
||||
/*
|
||||
$I = new FunctionalTester($scenario);
|
||||
$I->wantTo('ensure login page works');
|
||||
|
||||
@@ -28,3 +29,4 @@ $I->expectTo('see that user is logged');
|
||||
$I->seeLink('Logout (erau)');
|
||||
$I->dontSeeLink('Login');
|
||||
$I->dontSeeLink('Signup');
|
||||
*/
|
||||
Reference in New Issue
Block a user