You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							25 lines
						
					
					
						
							728 B
						
					
					
				
			
		
		
	
	
							25 lines
						
					
					
						
							728 B
						
					
					
				<?php | 
						|
use tests\functional\_pages\LoginPage; | 
						|
 | 
						|
$I = new TestGuy($scenario); | 
						|
$I->wantTo('ensure that login works'); | 
						|
$loginPage = LoginPage::of($I); | 
						|
 | 
						|
$I->amOnPage(LoginPage::$URL); | 
						|
$I->see('Login', 'h1'); | 
						|
 | 
						|
$I->amGoingTo('try to login with empty credentials'); | 
						|
$loginPage->login('', ''); | 
						|
$I->expectTo('see validations errors'); | 
						|
$I->see('Username cannot be blank.'); | 
						|
$I->see('Password cannot be blank.'); | 
						|
 | 
						|
$I->amGoingTo('try to login with wrong credentials'); | 
						|
$loginPage->login('admin', 'wrong'); | 
						|
$I->expectTo('see validations errors'); | 
						|
$I->see('Incorrect username or password.'); | 
						|
 | 
						|
$I->amGoingTo('try to login with correct credentials'); | 
						|
$loginPage->login('admin', 'admin'); | 
						|
$I->expectTo('see user info'); | 
						|
$I->see('Logout (admin)');
 | 
						|
 |