fillField() public method

Fills a text field or textarea with the given string. php fillField("//input[@type='text']", "Hello World!"); $I->fillField(['name' => 'email'], 'jon@mail.com'); ?>
See also: Codeception\Lib\InnerBrowser::fillField()
public fillField ( $field, $value )
$field
$value
Exemplo n.º 1
0
 /**
  * Executes a search on Google's home page using return key.
  *
  * @covers SauceExtension
  */
 public function testGoogleSearchResults()
 {
     $this->webGuy->am('Anonymous User');
     $this->webGuy->wantTo('execute search on home page');
     $this->webGuy->amOnPage('/');
     $this->webGuy->canSeeInTitle('Google');
     $this->webGuy->fillField('#gbqfq', 'dogecoin');
     $this->webGuy->pressKey('#gbqfq', WebDriverKeys::ENTER);
     $this->webGuy->canSeeInField('input#gbqfq', 'dogecoin');
     $this->webGuy->canSeeInTitle('dogecoin - Google Search');
 }
Exemplo n.º 2
0
 /**
  * Test for requirement 130 of SLC
  * @param  WebGuy $I [description]
  */
 public function gebruikerKoppelenAanCursus(\WebGuy $I)
 {
     $I->amOnPage('/login');
     $I->see('Uren');
     $I->fillField('Username', 'slc');
     $I->fillField('Password', 'slc');
     $I->click('Login');
     $I->amOnPage('/slc/3');
     $I->amOnPage('/slc/3/course/students/1');
     $I->click('Voeg toe');
     $I->amOnPage('/slc/3/course/students/1');
     $I->see('student');
 }
Exemplo n.º 3
0
<?php

$I = new WebGuy($scenario);
$I->wantTo('log in');
$I->amOnPage('users/login');
$I->fillField('email', '*****@*****.**');
$I->fillField('password', 'admin');
$I->click('button[type=submit]');
$I->dontSeeInCurrentUrl('users/login');
<?php

/**
* Testing /clients/create form
* For now do not tests all fields in Form.
**/
$I = new WebGuy($scenario);
$I->wantTo('Test Form:New Client. /clients/create');
$I->amOnPage('/');
$I->click('#startButton');
$I->amOnPage('/clients/create');
$I->click('Add contact');
$I->fillField('input#email0', '*****@*****.**');
$I->fillField('input#email1', '*****@*****.**');
$I->click('Remove contact');
$I->click('Add contact');
$I->fillField('input#email1', '*****@*****.**');
$I->seeInField('input#email0', '*****@*****.**');
$I->seeInField('input#email1', '*****@*****.**');
//-----------Fields done-----
//add more fields
$I->fillField('input#name', 'Some User');
$I->fillField('input#website', 'http://google.com');
$I->fillField('input#work_phone', '+308123456789');
$I->fillField('input#address1', 'Test Address 1');
$I->fillField('input#address2', 'Test Address 2 APPTMT SUITE');
$I->fillField('input#city', 'Zaporozhe');
$I->fillField('input#state', 'Test Province');
$I->fillField('input#postal_code', 'postcode 123455677');
$option = 'Net 7';
$I->selectOption("#payment_terms", $option);
Exemplo n.º 5
0
<?php

$I = new WebGuy($scenario);
include 'constant.php';
$I->wantTo('Reset my password');
$I->amOnPage('/');
$I->click(LoginPopUp::$loginPopup);
$I->waitForText('Create account');
$I->click(ForgotPopUp::$passwordLink);
$I->waitForText('Forgot password');
$I->wait(1);
$I->waitForElement(ForgotPopUp::$emailField);
$I->seeElement(ForgotPopUp::$emailField);
$I->seeElement(ForgotPopUp::$resetButton);
$I->fillField(ForgotPopUp::$emailField, $email);
$I->click(ForgotPopUp::$resetButton);
$I->waitForText('Reset password link was sent on your e-mail address');
<?php

$I = new WebGuy($scenario);
$I->wantTo('create and edit Pages as pagewriter user');
$I->loginAs($users['pagewriter']);
$I->see('New Page');
$I->click('New Page');
$I->see('Actions for this Page');
$I->fillField('title', 'A page I made');
$I->fillField('teaser', 'Woop woop woop! Crazy nice stuff inside!');
$I->fillField('body', 'Take it, take it! I have three more of these!');
$I->click('Save Page');
$I->see('A page I made');
$I->see('Woop woop woop');
 * @author Brett O'Donnell <*****@*****.**>
 * @author Zain Ul abidin <*****@*****.**>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-account-module
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-account-module/master/LICENSE
 *
 * @package yii-account-module
 */
$I = new WebGuy($scenario);
$I->wantTo('ensure AccountAccountController update works');
// check we are not logged in
$I->amOnPage('/');
$I->see('Hello guest');
// login
$I->amOnPage('/account/account/login');
$I->fillField('AccountLogin_username', 'admin');
$I->fillField('AccountLogin_password', 'admin');
$I->click('Login');
$I->see('You have successfully logged in.');
// update details with empty fields
$I->amOnPage('/account/account/update');
$I->fillField('AccountUpdate_first_name', '');
$I->fillField('AccountUpdate_last_name', '');
$I->fillField('AccountUpdate_email', '');
$I->fillField('AccountUpdate_username', '');
$I->click('Save');
$I->see('Please fix the following input errors:');
$I->see('Email cannot be blank.');
$I->see('Username cannot be blank.');
$I->see('First Name cannot be blank.');
// update details with invalid email
<?php

$foobar = array('username' => 'foobar', 'password' => 'foobar123');
$I = new WebGuy($scenario);
$I->wantTo('Create a user');
$I->loginAs($users['admin']);
$I->click('Users');
$I->click('New user');
$I->see("Create a new user");
$I->fillField('form[username]', $foobar['username']);
$I->fillField('form[password]', $foobar['password']);
$I->fillField('form[password_confirmation]', $foobar['password']);
$I->fillField('form[email]', '*****@*****.**');
$I->fillField('form[displayname]', 'Foo Bar');
$I->click('input[type=submit]');
$I->see("has been saved");
$I->click('Logout');
$I->loginAs($foobar);
$I->see('Dashboard');
Exemplo n.º 9
0
<?php

$I = new WebGuy($scenario);
$WP = new wordpress_controller($I);
$I->wantTo('Test the Authentication Plugin');
$WP->admin_login('admin', 'password');
$I->resizeWindow(1280, 1024);
$I->see('Dashboard');
$WP->enable_plugins($plugins);
$WP->logout();
foreach ($affiliates as $a) {
    $I->amGoingTo('Input settings for the base plugin');
    $WP->admin_login();
    $I->amOnPage($plugins['base']['admin_page']);
    // Fill out the form
    $I->fillField('agora_core_framework_config[prod_token]', $mw_settings[$a]['prod_token']);
    $I->fillField('agora_core_framework_config[uat_token]', $mw_settings[$a]['uat_token']);
    $I->click('Save');
    $I->amGoingTo('Configure some Authcodes');
    $I->amOnPage($plugins['auth']['admin_page']);
    $I->see('Add new Authentication Code');
    foreach ($pubcodes[$a] as $authcode) {
        $I->fillField('#add_new_authcode .authcode_name', $authcode['name']);
        $I->fillField('#add_new_authcode .authcode_advantage_code', $authcode['advantage_code']);
        $I->fillField('#add_new_authcode .authcode_description', $authcode['description']);
        $I->selectOption('#add_new_authcode .authcode_type', $authcode['auth_type']);
        $I->click('Add New', '#add_new_authcode');
        $I->waitForJS('return jQuery.active == 0', 5);
        $I->see($authcode['description']);
    }
    $I->amGoingTo('Insert some Test Content');
 * @author Brett O'Donnell <*****@*****.**>
 * @author Zain Ul abidin <*****@*****.**>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-account-module
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-account-module/master/LICENSE
 *
 * @package yii-account-module
 */
$I = new WebGuy($scenario);
$I->wantTo('ensure AccountAccountController change password works');
// check we are not logged in
$I->amOnPage('/');
$I->see('Hello guest');
// login
$I->amOnPage('/account/account/login');
$I->fillField('AccountLogin_username', 'admin');
$I->fillField('AccountLogin_password', 'admin');
$I->click('Login');
$I->see('You have successfully logged in.');
// change password with empty fields
$I->amOnPage('/account/account/password');
$I->fillField('AccountChangePassword_current_password', '');
$I->fillField('AccountChangePassword_new_password', '');
$I->fillField('AccountChangePassword_confirm_password', '');
$I->click('Save');
$I->see('Please fix the following input errors:');
$I->see('Current Password cannot be blank.');
$I->see('New Password cannot be blank.');
$I->see('Confirm Password cannot be blank.');
// change password with incorrect current password
$I->amOnPage('/account/account/password');
Exemplo n.º 11
0
<?php

$I = new WebGuy($scenario);
$I->wantTo('click invoice now');
$I->amOnPage('/');
$I->click('#startButton');
$I->seeInDatabase('users', ['id' => 1]);
$I->wantTo('create a client');
$I->click('#createClientLink');
$I->fillField('input#email', '*****@*****.**');
$I->click('#clientDoneButton');
$I->click('#saveButton');
$I->seeInDatabase('contacts', ['email' => '*****@*****.**']);
$I->seeInField('input#email', '*****@*****.**');
Exemplo n.º 12
0
<?php

$I = new WebGuy($scenario);
use Codeception\Util\Locator;
$I->wantTo('sing in google');
$I->amOnPage('/');
$I->see('Увійти');
$I->click('Увійти');
$I->appendField('#Email', 'anton.sylantiev');
$I->seeInField('#Email', 'anton.sylantiev');
$I->see('Один обліковий запис. Усі сервіси Google.');
$I->see('Один обліковий запис Google для всіх служб Google');
$I->seeLink('Потрібна допомога?');
$I->see('Створити обліковий запис');
$I->seeElement("//*[@id='next']");
$I->click('Далі');
$I->seeCheckboxIsChecked('#PersistentCookie');
$I->see('Забули пароль?');
include 'const.php';
$I->fillField('Пароль', $pass);
$I->see('Увійти');
$I->click('Увійти');
$I->see('Anton');
$I->click(".//*[@id='gbw']/div/div/div[2]/div[4]/div[1]/a/span");
$I->see('Anton Sylantiev');
$I->see('*****@*****.**');
Exemplo n.º 13
0
<?php

$I = new WebGuy($scenario);
include 'constant.php';
$I->wantTo('Login to muzza.life');
$I->amOnPage(LoginPopUp::$URL);
$I->click(LoginPopUp::$loginPopup);
$I->waitForText(LoginPopUp::$createAccountLink);
$I->see(LoginPopUp::$createAccountLink);
$I->see(LoginPopUp::$createAccountLink);
$I->seeElement(LoginPopUp::$emailField);
$I->seeElement(LoginPopUp::$passwordField);
$I->seeElement(LoginPopUp::$loginButton);
$I->fillField(LoginPopUp::$emailField, $email);
$I->fillField(LoginPopUp::$passwordField, $pass);
$I->click(LoginPopUp::$loginButton);
$I->waitForText($username);
$I->wait(3);
///
Exemplo n.º 14
0
 /**
  * Test for requirement 90 of docent
  * @param  WebGuy $I [description]
  * @return [type]    [description]
  */
 public function gebruikersProfielInzien(\WebGuy $I)
 {
     $I->wantTo('Gebruikers profiel inzien');
     $I->amOnPage('/login');
     $I->see('Uren');
     $I->fillField('Username', 'docent');
     $I->fillField('Password', 'docent');
     $I->click('Login');
     $I->amOnPage('/docent/2');
     $I->see('Docent Page');
     $I->click('Gebruikersbeheer');
     $I->amOnPage('/docent/2/gebruikers');
     $I->amOnPage('/docent/2/gebruikers/1');
     $I->see('Student');
     $I->see('10');
     $I->see('*****@*****.**');
     $I->see('I12R');
 }
Exemplo n.º 15
0
<?php

$I = new WebGuy($scenario);
include 'constant.php';
$I->wantTo('Check My mail Box');
$I->amOnUrl('http://temp-mail.ru/option/change');
$I->fillField('//*[@id="input_mail"]', $mail);
$I->click('//*[@id="postbut"]');
$I->wait(1);
$I->click('//*[@id="click-to-refresh"]');
$I->click('//*[@id="mails"]/tbody/tr/td[2]/a');
$I->waitForElement('//*[@id="templateBody"]/tbody/tr/td/table/tbody/tr[2]/td/table/tbody/tr/td/div/a');
$I->click('//*[@id="templateBody"]/tbody/tr/td/table/tbody/tr[2]/td/table/tbody/tr/td/div/a');
$I->waitForText('Create account');
$I->see('Create account');
$I->see('Forgot password?');
$I->seeElement('#email');
$I->seeElement('$password');
$I->seeElement('#loginButton');
<?php

$I = new WebGuy($scenario);
$I->wantTo('find facebook/php-webdriver on GitHub');
$I->amOnPage('/');
$I->fillField('.js-site-search-focus', 'php-webdriver');
$I->pressKey('.js-site-search-focus', WebDriverKeys::ENTER);
$I->seeLink('facebook', '/facebook/php-webdriver');
Exemplo n.º 17
0
<?php

// Login requires 2 steps
// 1. step: load front page
$I = new WebGuy($scenario);
$I->wantTo('ensure the standard login works');
$I->amOnPage('/index.php');
$I->see('Login');
// 2. step: continue to login form
$I->click('Login');
$I->amOnPage('/index.php');
$I->see('Herzlich willkommen');
$I->fillField('loginname', 'test_autor');
$I->fillField('password', 'testing');
$I->click('button[name=Login]');
// test, that we are really logged in and see typical elements
$I->see('Meine Startseite');
<?php

$I = new WebGuy($scenario);
$I->wantTo('install component/module/plugin');
// Direct install URL call
$I->amOnPage('/administrator/index.php?option=com_installer');
// Login first
$I->fillField("#mod-login-username", 'TestAdmin');
$I->fillField("#mod-login-password", 'PassAdmin');
$I->click('Log in');
// Where i want to be
$I->see('Extension Manager: Install');
// Move "directory tab" into foreground
$I->seeLink('Install from Directory');
$I->click('Install from Directory');
// -> find input button (Can be found twice)
// <div id="directory"
//     <fieldset class="uploadform">
//         <div class="form-actions">
//             <input class="btn btn-primary" type="button" onclick="Joomla.submitbutton3()" value="Install">
$I->seeElement('#directory > fieldset > div > input');
$I->click('#directory > fieldset > div > input');
$I->see('was successful');
Exemplo n.º 19
0
<?php

$I = new WebGuy($scenario);
$I->wantTo('update a page');
$I->amOnPage('users/login');
$I->fillField('email', '*****@*****.**');
$I->fillField('password', 'admin');
$I->click('button[type=submit]');
$I->amOnPage('/admin/pages/1/edit');
$I->fillField('fr[title]', 'title test');
$I->click('Save and exit');
$I->seeCurrentUrlEquals('/admin/pages');
$I->amOnPage('/');
$I->see('Hello guest');
// check the form is there
$I->amOnPage('/account/account/login');
$I->see('Username');
$I->see('Password');
$I->see('Remember me next time');
// login with empty details
$I->amOnPage('/account/account/login');
$I->click('Login');
$I->see('Please fix the following input errors:');
$I->see('Username cannot be blank.');
$I->see('Password cannot be blank.');
// login with empty password
$I->amOnPage('/account/account/login');
$I->fillField('AccountLogin_username', 'admin');
$I->click('Login');
$I->see('Please fix the following input errors:');
$I->dontSee('Username cannot be blank.');
$I->see('Password cannot be blank.');
// login with empty username
$I->amOnPage('/account/account/login');
$I->fillField('AccountLogin_password', 'admin');
$I->click('Login');
$I->see('Please fix the following input errors:');
$I->see('Username cannot be blank.');
$I->dontSee('Password cannot be blank.');
// login with correct username
$I->amOnPage('/account/account/login');
$I->fillField('AccountLogin_username', 'admin');
$I->fillField('AccountLogin_password', 'admin');
$I->see('Email');
$I->see('Username');
$I->see('Password');
$I->see('Confirm Password');
// signup with empty details
$I->amOnPage('/account/account/signUp');
$I->click('Sign Up');
$I->see('Please fix the following input errors:');
$I->see('Email cannot be blank.');
$I->see('First Name cannot be blank.');
$I->see('Username cannot be blank.');
$I->see('Password cannot be blank.');
$I->see('Confirm Password cannot be blank.');
// signup with invalid email
$I->amOnPage('/account/account/signUp');
$I->fillField('AccountSignUp_first_name', 'demo_first_name');
$I->fillField('AccountSignUp_last_name', 'demo_last_name');
$I->fillField('AccountSignUp_email', 'demo!mailinator.com');
$I->fillField('AccountSignUp_username', 'demo');
$I->fillField('AccountSignUp_password', 'demo123');
$I->fillField('AccountSignUp_confirm_password', 'demo123');
$I->click('Sign Up');
$I->see('Please fix the following input errors:');
$I->dontSee('Email cannot be blank.');
$I->dontSee('First Name cannot be blank.');
$I->dontSee('Username cannot be blank.');
$I->dontSee('Password cannot be blank.');
$I->dontSee('Confirm Password cannot be blank.');
$I->dontSee('Password cannot be blank.');
$I->see('Email is not a valid email address.');
// signup with mismatching password
Exemplo n.º 22
0
 /**
  * Test for requirement 50 of student
  * @param  WebGuy $I [description]
  * @return [type]    [description]
  */
 public function profielInzienStudent(\WebGuy $I)
 {
     $I->amOnPage('/login');
     $I->see('Uren');
     $I->fillField('Username', 'student');
     $I->fillField('Password', 'student');
     $I->click('Login');
     $I->amOnPage('/student/1');
     $I->see('Student Page');
     $I->wantTo('Profiel Inzien');
     $I->click('Profiel');
     $I->amOnPage('/student/1/profiel');
     $I->see('student');
     $I->see('I12R');
 }
Exemplo n.º 23
0
$I->click("Bid on this Contract");
$I->see("New Bid", "h5");
$I->fillField("bid[approach]", "Approach.");
$I->fillField("bid[previous_work]", "Previous work.");
$I->fillField("bid[employee_details]", "Employee details.");
$I->click("Submit Bid");
$I->see("Thanks for submitting your bid.");
$I->see("Approach.", 'p');
$I->see("Previous work.", 'p');
$I->see("Employee details.", 'p');
$I->click("Sign Out");
/** Officer Sanity **/
$I = new WebGuy($scenario);
$I->amOnPage('/signin');
/* Officer login succeeds */
$I->fillField('email', '*****@*****.**');
$I->fillField('password', 'password');
$I->click('button.btn');
$I->see('My Projects', 'h4');
$I->amOnPage("/notifications");
$I->see("{$vendorName} has submitted a bid", ".line1");
$I->click("submitted a bid");
$I->see("Bid from", "h1");
$I->click("(view profile)");
$I->see("Contact Name");
$I->see("SAM.gov");
$I->see("DSBS");
$I->click('Projects');
$I->see('My Projects', 'h4');
$I->click('API for SBA.gov Dynamic Small Business Search');
$I->see('Bids awaiting review', 'h5');
Exemplo n.º 24
0
<?php

$I = new WebGuy($scenario);
$I->wantTo('register with existing email');
$I->amOnPage('users/register');
$I->fillField('email', '*****@*****.**');
$I->fillField('first_name', 'Samuel');
$I->fillField('last_name', 'De Backer');
$I->fillField('password', 'trucmuche');
$I->fillField('password_confirmation', 'trucmuche');
$I->click('Register');
$I->amOnPage('users/register');
$I->see('Hello guest');
// add user to the database
$I->haveInDatabase('account_user', array('username' => 'demo-activate', 'password' => '$2a$13$.m7wlozeIJuRtKp01lR4peYybArVLdO6Pf1JsPSnX6eISL9GXDWBu', 'first_name' => 'demo-activate', 'last_name' => 'demo-activate', 'email' => '*****@*****.**', 'activated' => 0));
// add a token to the database
$I->haveInDatabase('token', array('token' => '$2a$13$lRkdb6kwbIC9aGTkdei2h.NQNlZht9Bpdo2J0PqsJ3tHAFsYJNg7C', 'model_name' => 'AccountActivate', 'model_id' => 2, 'uses_allowed' => 1, 'uses_remaining' => 1, 'expires' => strtotime('+1day'), 'created' => time()));
// check with invalid token
$I->amOnPage('/account/account/activate/user_id/2/token/test-invalid-token');
$I->see('Invalid token.');
// reset password with empty details
$I->amOnPage('/account/account/activate/user_id/2/token/test-token');
$I->see('Your account has been activated and you have been logged in.');
// check login
$I->amOnPage('/');
$I->see('Hello demo-activate');
// logout
$I->amOnPage('/account/account/logout');
$I->see('Your have been logged out.');
// ensure token is expired
$I->amOnPage('/account/account/activate/user_id/2/token/test-token');
$I->see('Invalid token.');
// check login
$I->amOnPage('/account/account/login');
$I->fillField('AccountLogin_username', 'demo-activate');
$I->fillField('AccountLogin_password', 'demo-activate');
$I->click('Login');
$I->see('You have successfully logged in.');
$I->amOnPage('/');
$I->see('Hello demo-activate');
// logout
$I->amOnPage('/account/account/logout');
$I->see('Your have been logged out.');
Exemplo n.º 26
0
<?php

$I = new WebGuy($scenario);
$I->wantTo('submit contact form');
$I->amOnPage('fr/contact');
$I->selectOption('Titre', 'M.');
$I->fillField('first_name', 'John');
$I->fillField('last_name', 'Doe');
$I->fillField('email', '*****@*****.**');
$I->fillField('message', 'Hello');
$I->click('Envoyer');
$I->amOnPage('fr/contact');
Exemplo n.º 27
0
<?php

$I = new WebGuy($scenario);
/* Vendor login with wrong password fails */
$I->amOnPage('/signin');
$I->fillField('email', '*****@*****.**');
$I->fillField('password', 'wrongpassword');
$I->click('button.btn');
$I->see('Login incorrect', '.alert');
$I = new WebGuy($scenario);
/* Vendor login succeeds */
$I->fillField('email', '*****@*****.**');
$I->fillField('password', 'password');
$I->click('button.btn');
$I->see('Projects', 'h4');
/* Signout works */
$I->click('Sign Out');
$I->see('RFP-EZ Marketplace');
/* Officer login wrong password fails */
$I->amOnPage('/signin');
$I->fillField('email', '*****@*****.**');
$I->fillField('password', 'wrongpassword');
$I->click('button.btn');
$I->see('Login incorrect', '.alert');
/* Then officer login works */
$I->fillField('email', '*****@*****.**');
$I->fillField('password', 'password');
$I->click('button.btn');
$I->see('My Projects', 'h4');
<?php

$I = new WebGuy($scenario);
$I->wantTo('login and see result');
$I->amOnPage('WelcomePage');
$I->fillField('username', '*****@*****.**');
$I->fillField('Password', '');
$I->click('Submit');
$I->see('Passaword', '#login-result');
Exemplo n.º 29
0
<?php

$I = new WebGuy($scenario);
include 'constant.php';
$I->wantTo('Register new user');
$I->amOnPage("/");
$I->see('Registration');
$I->see('Login');
$I->see('Genre');
$I->see('Stations');
$I->click(Registration::$registrationlink);
$I->waitForText('Sign Up');
$I->see('Sign Up');
$I->seeElement(Registration::$username);
$I->seeElement(Registration::$emailField);
$I->seeElement(Registration::$passwordField);
$I->seeElement(Registration::$confirmPasswordField);
$I->seeElement(Registration::$registrationButton);
$I->fillField(Registration::$username, $username);
$I->fillField(Registration::$emailField, $email);
$I->fillField(Registration::$passwordField, $pass);
$I->fillField(Registration::$confirmPasswordField, $pass_conf);
$I->click(Registration::$registrationButton);
 * @author Brett O'Donnell <*****@*****.**>
 * @author Zain Ul abidin <*****@*****.**>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-account-module
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-account-module/master/LICENSE
 *
 * @package yii-account-module
 */
$I = new WebGuy($scenario);
$I->wantTo('ensure AccountAccountController lost password works');
// check we are not logged in
$I->amOnPage('/');
$I->see('Hello guest');
// lost password with invalid username
$I->amOnPage('/account/account/lostPassword');
$I->fillField('AccountLostPassword_email_or_username', 'admin123');
$I->click('Recover Password');
$I->see('Please fix the following input errors:');
$I->see('Username does not exist.');
// lost password with invalid email
$I->amOnPage('/account/account/lostPassword');
$I->fillField('AccountLostPassword_email_or_username', '*****@*****.**');
$I->click('Recover Password');
$I->see('Please fix the following input errors:');
$I->see('Email does not exist.');
// lost password with correct username
$I->amOnPage('/account/account/lostPassword');
$I->fillField('AccountLostPassword_email_or_username', 'admin');
$I->click('Recover Password');
$I->see('Password reset instructions have been sent to admin@mailinator.com. Please check your email.');
$I->seeInDatabase('email_spool', array('template' => 'account_lost_password', 'status' => 'pending', 'model_name' => 'AccountUser', 'model_id' => 1, 'to_address' => '{"*****@*****.**":"admin admin"}', 'from_address' => '{"webmaster@localhost":"My Application"}'));