-
Notifications
You must be signed in to change notification settings - Fork 643
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed tests and added missing frontend elements
Signed-off-by: Victor Gonzalez <[email protected]>
- Loading branch information
Showing
6 changed files
with
44 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ public function testUserSignup($I, $scenario) | |
$I->wantTo('ensure that signup works'); | ||
|
||
$signupPage = SignupPage::openBy($I); | ||
$I->see('Signup', 'h1'); | ||
$I->see('Sign up', 'h1'); | ||
|
||
$I->amGoingTo('submit signup form with no data'); | ||
|
||
|
@@ -44,24 +44,41 @@ public function testUserSignup($I, $scenario) | |
$I->see('Username cannot be blank.', '.alert.alert-danger'); | ||
$I->see('E-mail cannot be blank.', '.alert.alert-danger'); | ||
$I->see('Password cannot be blank.', '.alert.alert-danger'); | ||
$I->see('Confirm Password cannot be blank.', '.alert.alert-danger'); | ||
|
||
$I->amGoingTo('submit signup form with not correct email'); | ||
$signupPage->submit([ | ||
'username' => 'tester', | ||
'email' => 'tester.email', | ||
'password' => 'tester_password', | ||
'password_confirm' => 'tester_password', | ||
]); | ||
|
||
$I->expectTo('see that email address is wrong'); | ||
$I->dontSee('Username cannot be blank.', '.alert.alert-danger'); | ||
$I->dontSee('Password cannot be blank.', '.alert.alert-danger'); | ||
$I->dontSee('Confirm Password cannot be blank.', '.alert.alert-danger'); | ||
$I->see('E-mail is not a valid email address.', '.alert.alert-danger'); | ||
|
||
$I->amGoingTo('submit signup form with different passwords'); | ||
$signupPage->submit([ | ||
'username' => 'tester', | ||
'email' => '[email protected]', | ||
'password' => 'tester_password', | ||
'password_confirm' => 'wrong_password', | ||
]); | ||
|
||
$I->expectTo('see that confirm password is wrong'); | ||
$I->dontSee('Confirm Password cannot be blank.', '.alert.alert-danger'); | ||
$I->dontSee('Password cannot be blank.', '.alert.alert-danger'); | ||
$I->see('Confirm Password must be equal to "Password".', '.alert.alert-danger'); | ||
|
||
$I->amGoingTo('submit signup form with correct email'); | ||
$signupPage->submit([ | ||
'username' => 'tester', | ||
'email' => '[email protected]', | ||
'password' => 'tester_password', | ||
'password_confirm' => 'tester_password', | ||
]); | ||
if (method_exists($I, 'wait')) { | ||
$I->wait(3); // only for selenium | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ public function testUserSignup($I, $scenario) | |
$I->wantTo('ensure that signup works'); | ||
|
||
$signupPage = SignupPage::openBy($I); | ||
$I->see('Signup', 'h1'); | ||
$I->see('Sign up', 'h1'); | ||
|
||
$I->amGoingTo('submit signup form with no data'); | ||
|
||
|
@@ -58,17 +58,20 @@ public function testUserSignup($I, $scenario) | |
$I->see('Username cannot be blank.', '.alert.alert-danger'); | ||
$I->see('E-mail cannot be blank.', '.alert.alert-danger'); | ||
$I->see('Password cannot be blank.', '.alert.alert-danger'); | ||
$I->see('Confirm Password cannot be blank.', '.alert.alert-danger'); | ||
|
||
$I->amGoingTo('submit signup form with not correct email'); | ||
$signupPage->submit([ | ||
'username' => 'tester', | ||
'email' => 'tester.email', | ||
'password' => 'tester_password', | ||
'password_confirm' => 'tester_password', | ||
]); | ||
|
||
$I->expectTo('see that email address is wrong'); | ||
$I->dontSee('Username cannot be blank.', '.alert.alert-danger'); | ||
$I->dontSee('Password cannot be blank.', '.alert.alert-danger'); | ||
$I->dontSee('Password Confirm cannot be blank.', '.alert.alert-danger'); | ||
$I->see('E-mail is not a valid email address.', '.alert.alert-danger'); | ||
|
||
|
||
|
@@ -77,6 +80,7 @@ public function testUserSignup($I, $scenario) | |
'username' => 'tester', | ||
'email' => '[email protected]', | ||
'password' => 'tester_password', | ||
'password_confirm' => 'tester_password', | ||
]); | ||
|
||
$I->expectTo('see that user is created'); | ||
|