Skip to content

Commit 76fa0f8

Browse files
committed
wip
Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent c56519e commit 76fa0f8

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,38 @@
11
<?php
2+
3+
use App\Models\User;
4+
5+
use function Pest\Laravel\actingAs;
6+
7+
test('confirm password screen can be rendered', function () {
8+
actingAs(User::factory()->create());
9+
10+
visit(route('password.confirm'))
11+
->assertSee('Confirm your password')
12+
->assertSee('This is a secure area of the application. Please confirm your password before continuing.')
13+
->assertNoConsoleLogs()
14+
->assertNoJavaScriptErrors();
15+
});
16+
17+
test('password can be confirmed', function () {
18+
actingAs(User::factory()->create());
19+
20+
visit(route('password.confirm'))
21+
->fill('password', 'password')
22+
->press('Confirm Password')
23+
->assertUrlIs(route('dashboard'))
24+
->assertNoConsoleLogs()
25+
->assertNoJavaScriptErrors();
26+
});
27+
28+
test('password is not confirmed with invalid password', function () {
29+
actingAs(User::factory()->create());
30+
31+
visit(route('password.confirm'))
32+
->fill('password', 'wrong-password')
33+
->press('Confirm Password')
34+
->assertUrlIs(route('password.confirm'))
35+
->assertSee('The provided password is incorrect.')
36+
->assertNoConsoleLogs()
37+
->assertNoJavaScriptErrors();
38+
});
File renamed without changes.

0 commit comments

Comments
 (0)