Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions tests/Browser/Auth/AuthenticationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,3 @@

assertGuest();
});

test('users are rate limited', function () {
$user = User::factory()->create();

RateLimiter::increment(implode('|', [$user->email, '127.0.0.1']), amount: 10);

visit(route('login'))
->fill('email', $user->email)
->fill('password', 'wrong-password')
->press('@login-button')
->assertUrlIs(route('login'))
->assertSee('Too many login attempts. Please try again in')
->assertNoConsoleLogs()
->assertNoJavaScriptErrors();
});

2 changes: 1 addition & 1 deletion tests/Browser/Auth/PasswordResetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
visit(route('password.request'))
->fill('email', $user->email)
->press('@email-password-reset-link-button')
->assertSee('A reset link will be sent if the account exists.')
->assertSee('We have emailed your password reset link.')
->assertNoConsoleLogs()
->assertNoJavaScriptErrors();

Expand Down
10 changes: 5 additions & 5 deletions tests/Browser/Settings/PasswordUpdateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
test('password update page is displayed', function () {
actingAs(User::factory()->create());

visit(route('password.edit'))
visit(route('user-password.edit'))
->assertSee('Update password')
->assertSee('Ensure your account is using a long, random password to stay secure')
->assertNoConsoleLogs()
Expand All @@ -18,13 +18,13 @@
test('password can be updated', function () {
actingAs($user = User::factory()->create());

visit(route('password.edit'))
visit(route('user-password.edit'))
->fill('current_password', 'password')
->fill('password', 'new-password')
->fill('password_confirmation', 'new-password')
->press('@update-password-button')
->assertSee('Saved')
->assertUrlIs(route('password.edit'))
->assertUrlIs(route('user-password.edit'))
->assertNoConsoleLogs()
->assertNoJavaScriptErrors();

Expand All @@ -34,13 +34,13 @@
test('correct password must be provided to update password', function () {
actingAs($user = User::factory()->create());

visit(route('password.edit'))
visit(route('user-password.edit'))
->fill('current_password', 'wrong-password')
->fill('password', 'new-password')
->fill('password_confirmation', 'new-password')
->press('@update-password-button')
->assertSee('The password is incorrect.')
->assertUrlIs(route('password.edit'))
->assertUrlIs(route('user-password.edit'))
->assertNoConsoleLogs()
->assertNoJavaScriptErrors();

Expand Down
Loading