コード例 #1
0
ファイル: LoginCest.php プロジェクト: inoplate/account
 public function trySigninWithInvalidCredentials(FunctionalTester $I)
 {
     $I->wantTo('Login as user with invalid credentials');
     $I->dontSeeAuthentication();
     $I->amOnPage('/login');
     $I->fillField('identifier', 'spectator');
     $I->fillField('password', 'invalid');
     $I->click('button[type=submit]');
     $I->seeCurrentUrlEquals('/login');
     $I->dontSeeAuthentication();
 }
コード例 #2
0
ファイル: LoginCest.php プロジェクト: oliverpool/tinyissue
 /**
  * @param FunctionalTester $I
  *
  * @return void
  */
 public function invalidUsernamePassword(FunctionalTester $I)
 {
     $I->wantTo('login with invalid username/password');
     $I->amOnAction('HomeController@getIndex');
     $I->dontSeeAuthentication();
     $I->see('Login');
     $I->fillField('Email', '*****@*****.**');
     $I->fillField('Password', '1234');
     $I->click('Login');
     $I->dontSeeAuthentication();
 }
コード例 #3
0
ファイル: AuthCest.php プロジェクト: resulaslan/sample-l4-app
 public function loginUsingCredentials(FunctionalTester $I)
 {
     $I->dontSeeAuthentication();
     $I->haveRecord('users', $this->userAttributes);
     $I->amLoggedAs(['email' => '*****@*****.**', 'password' => 'password']);
     $I->amOnPage(PostsPage::$url);
     $I->seeCurrentUrlEquals(PostsPage::$url);
     $I->seeAuthentication();
     $I->logout();
     $I->dontSeeAuthentication();
 }
コード例 #4
0
 public function requireAuthenticationForRoute(FunctionalTester $I)
 {
     $I->dontSeeAuthentication();
     $I->amOnPage('/secure');
     $I->seeCurrentUrlEquals('/auth/login');
     $I->see('Login');
     $I->amLoggedAs(User::firstOrNew($this->userAttributes));
     $I->amOnPage('/secure');
     $I->seeResponseCodeIs(200);
     $I->see('Hello World');
 }
コード例 #5
0
ファイル: AuthCest.php プロジェクト: mlanin/go
 public function requireAuthenticationForSecureRoute(FunctionalTester $I)
 {
     $I->dontSeeAuthentication();
     $I->amOnPage(LinksPage::$URL);
     $I->seeCurrentUrlEquals(LoginPage::$URL);
     $I->see(LoginPage::$title);
     LoginPage::of($I)->loginByCredentials(env('LDAP_ADMIN_USER'), env('LDAP_ADMIN_PASSWORD'));
     $I->amOnPage(LinksPage::$URL);
     $I->seeResponseCodeIs(200);
     $I->see(LinksPage::$title);
 }
コード例 #6
0
ファイル: RegisterCest.php プロジェクト: inoplate/account
 public function tryRegisterWithIncompleteInput(FunctionalTester $I)
 {
     $I->wantTo('Register a user with incomplete input');
     $I->amOnPage('/register');
     $I->fillField('username', 'usertest');
     $I->fillField('email', '*****@*****.**');
     $I->fillField('password', '123456');
     $I->click('button[type=submit]');
     $I->seeCurrentUrlEquals('/register');
     $I->dontSeeAuthentication();
 }
コード例 #7
0
 public function testSpamRegistration(FunctionalTester $I)
 {
     $I->fillField('name', $this->tester['name']);
     $I->fillField('email', $this->tester['email']);
     $I->fillField('password', $this->tester['password']);
     $I->fillField('password_confirmation', $this->tester['password']);
     $I->fillField('agreement', 'yes');
     $I->click('Register', 'button');
     $I->dontSeeFormErrors();
     $I->click('Logout');
     $I->click('Login');
     $I->fillField('email', $this->tester['email']);
     $I->fillField('password', $this->tester['password']);
     $I->click('Login', 'button');
     $I->seeFormHasErrors();
     $I->dontSeeAuthentication();
 }
コード例 #8
0
<?php

$I = new FunctionalTester($scenario);
$I->wantTo('create a currency without data');
$I->am('a Administrator user');
$I->dontSeeAuthentication();
$I->amLoggedAs(['email' => '*****@*****.**', 'password' => 'admin']);
$I->seeAuthentication();
//When
$I->amOnPage('/settings/currency');
//And
$I->see('Create');
$I->click('Create');
//Then
$I->seeCurrentUrlEquals('/settings/currency/create');
//When
$form = ['name' => '', 'symbol' => ''];
//And
$I->submitForm('//form', $form, 'Create');
//Then
$I->seeFormErrorMessage('name', 'The name field is required.');
//
コード例 #9
0
ファイル: AuthCest.php プロジェクト: richmartell/laravel
 public function loginFailsWhenPasswordIncorrect(FunctionalTester $I)
 {
     $I->amOnPage('/auth/login');
     $I->see('Login');
     $I->fillField('email', '*****@*****.**');
     $I->fillField('password', 'incorrect');
     $I->click('Login');
     $I->seeCurrentUrlEquals('/auth/login');
     $I->dontSeeAuthentication();
     $I->see('These credentials do not match our records.');
 }