forked from laravel/breeze
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version bump + Improved Dusk tests + Native Password Confirmation (#13)
- Loading branch information
1 parent
561ae13
commit 6acdce6
Showing
13 changed files
with
40 additions
and
48 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
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
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ public function test_registration_screen_can_be_rendered() | |
$this->browse(function (Browser $browser) { | ||
$browser->logout() | ||
->visit('/register') | ||
->waitForInput('name') | ||
->assertInputPresent('name') | ||
->assertInputPresent('email') | ||
->assertInputPresent('password') | ||
|
@@ -28,6 +29,7 @@ public function test_new_users_can_register() | |
$this->browse(function (Browser $browser) { | ||
$browser->logout() | ||
->visit('/register') | ||
->waitForInput('name') | ||
->type('name', 'Test User') | ||
->type('email', '[email protected]') | ||
->type('password', 'password') | ||
|
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 |
---|---|---|
|
@@ -18,6 +18,7 @@ public function test_profile_page_is_displayed() | |
|
||
$browser->loginAs($user) | ||
->visit('/profile') | ||
->waitForText('Profile Information') | ||
->assertInputPresent('current_password'); | ||
}); | ||
} | ||
|
@@ -29,6 +30,7 @@ public function test_profile_information_can_be_updated() | |
$this->browse(function (Browser $browser) use ($user) { | ||
$browser->loginAs($user) | ||
->visit('/profile') | ||
->waitForText('Profile Information') | ||
->within('@update-profile-information', function (Browser $browser) { | ||
$browser->type('name', 'Test User') | ||
->type('email', '[email protected]') | ||
|
@@ -51,6 +53,7 @@ public function test_email_verification_status_is_unchanged_when_the_email_addre | |
$this->browse(function (Browser $browser) use ($user) { | ||
$browser->loginAs($user) | ||
->visit('/profile') | ||
->waitForText('Profile Information') | ||
->within('@update-profile-information', function (Browser $browser) use ($user) { | ||
$browser->type('name', 'Test User') | ||
->type('email', $user->email) | ||
|
@@ -71,16 +74,17 @@ public function test_user_can_delete_their_account() | |
$this->browse(function (Browser $browser) use ($user) { | ||
$browser->loginAs($user) | ||
->visit('/profile') | ||
->waitForText('Delete Account') | ||
->scrollTo('@delete-user') | ||
->click('@open-delete-modal') | ||
->waitFor('@confirm-user-deletion') | ||
->within('@confirm-user-deletion', function (Browser $browser) { | ||
$browser->waitForText('Are you sure') | ||
->press('Delete Account') | ||
->waitForText('Are you sure you want to delete your account?') | ||
->within('#headlessui-portal-root', function (Browser $browser) { | ||
$browser | ||
->type('password', 'wrong_password') | ||
->press('@confirm-delete-account') | ||
->waitForText('The password is incorrect.') | ||
->press('Delete Account') | ||
->waitForText('The provided password is incorrect.') | ||
->type('password', 'password') | ||
->press('@confirm-delete-account') | ||
->press('Delete Account') | ||
->waitForLocation('/') | ||
->assertGuest(); | ||
}); | ||
|
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