Skip to content

Commit 8477603

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

File tree

7 files changed

+25
-18
lines changed

7 files changed

+25
-18
lines changed

composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
}
2929
},
3030
"scripts": {
31+
"post-autoload-dump": [
32+
"@prepare"
33+
],
34+
"build": [
35+
"@vue:build"
36+
],
37+
"prepare": "@php vendor/bin/testbench package:discover --ansi",
3138
"vue:build": [
3239
"cd \"./vendor/laravel/vue-starter-kit\" && composer remove --dev \"laravel/sail\" --no-update",
3340
"cd \"./vendor/laravel/vue-starter-kit\" && composer install",

tests/Browser/Auth/AuthenticationTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
visit(route('login'))
2222
->fill('email', $user->email)
2323
->fill('password', 'password')
24-
->press('Log in')
24+
->press('@login-button')
2525
->assertUrlIs(route('dashboard'))
2626
->assertNoConsoleLogs()
2727
->assertNoJavaScriptErrors();
@@ -35,7 +35,7 @@
3535
visit(route('login'))
3636
->fill('email', $user->email)
3737
->fill('password', 'wrong-password')
38-
->press('Log in')
38+
->press('@login-button')
3939
->assertUrlIs(route('login'))
4040
->assertSee('These credentials do not match our records.')
4141
->assertNoConsoleLogs()
@@ -67,7 +67,7 @@
6767
visit(route('login'))
6868
->fill('email', $user->email)
6969
->fill('password', 'wrong-password')
70-
->press('Log in')
70+
->press('@login-button')
7171
->assertUrlIs(route('login'))
7272
->assertSee('Too many login attempts. Please try again in')
7373
->assertNoConsoleLogs()

tests/Browser/Auth/PasswordConfirmationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
visit(route('password.confirm'))
2121
->fill('password', 'password')
22-
->press('Confirm Password')
22+
->press('@confirm-password-button')
2323
->assertUrlIs(route('dashboard'))
2424
->assertNoConsoleLogs()
2525
->assertNoJavaScriptErrors();
@@ -30,7 +30,7 @@
3030

3131
visit(route('password.confirm'))
3232
->fill('password', 'wrong-password')
33-
->press('Confirm Password')
33+
->press('@confirm-password-button')
3434
->assertUrlIs(route('password.confirm'))
3535
->assertSee('The provided password is incorrect.')
3636
->assertNoConsoleLogs()

tests/Browser/Auth/PasswordResetTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
visit(route('password.request'))
2323
->fill('email', $user->email)
24-
->press('Email password reset link')
24+
->press('@email-password-reset-link-button')
2525
->assertSee('A reset link will be sent if the account exists.')
2626
->assertNoConsoleLogs()
2727
->assertNoJavaScriptErrors();
@@ -58,7 +58,7 @@
5858
->fill('password_confirmation', 'password')
5959
->assertNoConsoleLogs()
6060
->assertNoJavaScriptErrors()
61-
->press('Reset password')
61+
->press('@reset-password-button')
6262
->assertUrlIs(route('home'))
6363
->assertNoConsoleLogs()
6464
->assertNoJavaScriptErrors();

tests/Browser/Auth/RegistrationTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
->fill('email', '[email protected]')
2020
->fill('password', 'password')
2121
->fill('password_confirmation', 'password')
22-
->press('Create account')
22+
->press('@register-user-button')
2323
->assertPathEndsWith('/dashboard')
2424
->assertNoConsoleLogs()
2525
->assertNoJavaScriptErrors();
@@ -38,7 +38,7 @@
3838
->fill('email', '[email protected]')
3939
->fill('password', 'password')
4040
->fill('password_confirmation', 'password')
41-
->press('Create account')
41+
->press('@register-user-button')
4242
->assertSee('The email has already been taken.')
4343
->assertNoConsoleLogs()
4444
->assertNoJavaScriptErrors();
@@ -52,7 +52,7 @@
5252
->fill('email', '[email protected]')
5353
->fill('password', 'password')
5454
->fill('password_confirmation', 'secret')
55-
->press('Create account')
55+
->press('@register-user-button')
5656
->assertSee('The password field confirmation does not match.')
5757
->assertNoConsoleLogs()
5858
->assertNoJavaScriptErrors();

tests/Browser/Settings/PasswordUpdateTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
->fill('current_password', 'password')
2323
->fill('password', 'new-password')
2424
->fill('password_confirmation', 'new-password')
25-
->press('Save password')
25+
->press('@update-password-button')
2626
->assertSee('Saved.')
2727
->assertUrlIs(route('password.edit'))
2828
->assertNoConsoleLogs()
@@ -38,7 +38,7 @@
3838
->fill('current_password', 'wrong-password')
3939
->fill('password', 'new-password')
4040
->fill('password_confirmation', 'new-password')
41-
->press('Save password')
41+
->press('@update-password-button')
4242
->assertSee('The password is incorrect.')
4343
->assertUrlIs(route('password.edit'))
4444
->assertNoConsoleLogs()

tests/Browser/Settings/ProfileUpdateTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
->assertSee('Update your name and email address')
2727
->fill('name', 'Test User')
2828
->fill('email', '[email protected]')
29-
->press('Save')
29+
->press('@update-profile-button')
3030
->assertSee('Saved.')
3131
->assertUrlIs(route('profile.edit'))
3232
->assertNoConsoleLogs()
@@ -47,7 +47,7 @@
4747
->assertSee('Update your name and email address')
4848
->fill('name', 'Test User')
4949
->fill('email', $user->email)
50-
->press('Save')
50+
->press('@update-profile-button')
5151
->assertSee('Saved.')
5252
->assertUrlIs(route('profile.edit'))
5353
->assertNoConsoleLogs()
@@ -60,10 +60,10 @@
6060
actingAs($user = User::factory()->create());
6161

6262
visit(route('profile.edit'))
63-
->press('@delete-user')
63+
->press('@delete-user-button')
6464
->assertSee('Are you sure you want to delete your account?')
6565
->fill('password', 'password')
66-
->press('@confirm-delete-user')
66+
->press('@confirm-delete-user-button')
6767
->assertUrlIs(route('home'))
6868
->assertNoConsoleLogs()
6969
->assertNoJavaScriptErrors();
@@ -76,10 +76,10 @@
7676
actingAs($user = User::factory()->create());
7777

7878
visit(route('profile.edit'))
79-
->press('@delete-user')
79+
->press('@delete-user-button')
8080
->assertSee('Are you sure you want to delete your account?')
8181
->fill('password', 'wrong-password')
82-
->press('@confirm-delete-user')
82+
->press('@confirm-delete-user-button')
8383
->assertUrlIs(route('profile.edit'))
8484
->assertNoConsoleLogs()
8585
->assertNoJavaScriptErrors();

0 commit comments

Comments
 (0)