wantTo('Test the Authentication Flow'); $I->amOnPage('/'); } /** * test if the home page is loaded * @param AcceptanceTester $I * @return void */ public function tryToTestIfWelcomePageIsLoaded(AcceptanceTester $I) { $I->wantTo('Check if the home page works.'); $I->amOnPage('/'); $I->see('SIGN IN'); $I->see('To keep using the service please sign in with your personal info'); $I->see('New Customer? Create Account'); } /** * test if admin can log in * @param AcceptanceTester $I * @return void */ public function tryToTestIfAdminCanLogin(AcceptanceTester $I) { // Fill out the login form $I->fillField('email', 'omair@cief-malaysia.com'); $I->fillField('password', '123456abcabc'); $I->click(['css' => '.btn.btn-block.btn-lg.b-rad-none.no-border']); $I->wait(5); // 2 seconds delay $I->expectTo('be redirected to the dashboard'); $I->seeCurrentUrlEquals('/dashboard'); $I->see('Dashboard'); $I->see('NEW CUSTOMERS'); $I->see('Unclaimed Packing Lists'); $I->see('Identification Verification'); $I->see('ACTIVATED ORDERS'); } }