Chore: Upgrade to Laravel 12 + remove Mary and Jetstream dependencies (#141)

* docs: remove requirement for setting APP_KEY manually

* optimize date picker

* clean up modals

* spot light working

* reorganization

* add lazy load

* wip

* remove filament

* styling
This commit is contained in:
hackerESQ
2025-09-26 17:41:28 -05:00
committed by GitHub
parent 910d426ad4
commit e6f38d9481
146 changed files with 5443 additions and 3909 deletions
+4 -13
View File
@@ -7,9 +7,8 @@ namespace Tests;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Str;
use Laravel\Jetstream\Features;
use Laravel\Jetstream\Http\Livewire\ApiTokenManager;
use Livewire\Livewire;
use Livewire\Volt\Volt;
class ApiTokenPermissionsTest extends TestCase
{
@@ -18,10 +17,6 @@ class ApiTokenPermissionsTest extends TestCase
public function test_api_tokens_can_be_deleted(): void
{
if (! Features::hasApiFeatures()) {
$this->markTestSkipped('API support is not enabled.');
}
$this->actingAs($user = User::factory()->create());
$token = $user->tokens()->create([
@@ -30,7 +25,7 @@ class ApiTokenPermissionsTest extends TestCase
'abilities' => [],
]);
Livewire::test(ApiTokenManager::class)
Livewire::test('api-token-manager')
->set(['apiTokenIdBeingDeleted' => $token->id])
->call('deleteApiToken');
@@ -40,13 +35,9 @@ class ApiTokenPermissionsTest extends TestCase
public function test_api_tokens_can_be_created(): void
{
if (! Features::hasApiFeatures()) {
$this->markTestSkipped('API support is not enabled.');
}
$this->actingAs($user = User::factory()->create());
Livewire::test(ApiTokenManager::class)
Livewire::test('api-token-manager')
->set(['createApiTokenForm' => [
'name' => 'Test Token',
'permissions' => [],
@@ -71,7 +62,7 @@ class ApiTokenPermissionsTest extends TestCase
// 'abilities' => ['create', 'read'],
// ]);
// Livewire::test(ApiTokenManager::class)
// Volt::test('api-token-manager')
// ->set(['managingPermissionsFor' => $token])
// ->set(['updateApiTokenForm' => [
// 'permissions' => [],
-25
View File
@@ -1,25 +0,0 @@
<?php
declare(strict_types=1);
namespace Tests;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Laravel\Jetstream\Http\Livewire\LogoutOtherBrowserSessionsForm;
use Livewire\Livewire;
class BrowserSessionsTest extends TestCase
{
use RefreshDatabase;
public function test_other_browser_sessions_can_be_logged_out(): void
{
$this->actingAs(User::factory()->create());
Livewire::test(LogoutOtherBrowserSessionsForm::class)
->set('password', 'password')
->call('logoutOtherBrowserSessions')
->assertSuccessful();
}
}
+4 -12
View File
@@ -6,8 +6,6 @@ namespace Tests;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Laravel\Jetstream\Features;
use Laravel\Jetstream\Http\Livewire\DeleteUserForm;
use Livewire\Livewire;
class DeleteAccountTest extends TestCase
@@ -16,13 +14,10 @@ class DeleteAccountTest extends TestCase
public function test_user_accounts_can_be_deleted(): void
{
if (! Features::hasAccountDeletionFeatures()) {
$this->markTestSkipped('Account deletion is not enabled.');
}
$this->actingAs($user = User::factory()->create());
$component = Livewire::test(DeleteUserForm::class)
$component = Livewire::test('delete-user-form')
->set('password', 'password')
->call('deleteUser');
@@ -31,13 +26,10 @@ class DeleteAccountTest extends TestCase
public function test_correct_password_must_be_provided_before_account_can_be_deleted(): void
{
if (! Features::hasAccountDeletionFeatures()) {
$this->markTestSkipped('Account deletion is not enabled.');
}
$this->actingAs($user = User::factory()->create());
Livewire::test(DeleteUserForm::class)
Livewire::test('delete-user-form')
->set('password', 'wrong-password')
->call('deleteUser')
->assertHasErrors(['password']);
+2 -3
View File
@@ -6,7 +6,6 @@ namespace Tests;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Laravel\Jetstream\Http\Livewire\UpdateProfileInformationForm;
use Livewire\Livewire;
class ProfileInformationTest extends TestCase
@@ -17,7 +16,7 @@ class ProfileInformationTest extends TestCase
{
$this->actingAs($user = User::factory()->create());
$component = Livewire::test(UpdateProfileInformationForm::class);
$component = Livewire::test('update-profile-information-form');
$this->assertEquals($user->name, $component->state['name']);
$this->assertEquals($user->email, $component->state['email']);
@@ -27,7 +26,7 @@ class ProfileInformationTest extends TestCase
{
$this->actingAs($user = User::factory()->create());
Livewire::test(UpdateProfileInformationForm::class)
Livewire::test('update-profile-information-form')
->set('state', ['name' => 'Test Name', 'email' => 'test@example.com'])
->call('updateProfileInformation');
@@ -7,7 +7,6 @@ namespace Tests;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Laravel\Fortify\Features;
use Laravel\Jetstream\Http\Livewire\TwoFactorAuthenticationForm;
use Livewire\Livewire;
class TwoFactorAuthenticationSettingsTest extends TestCase
@@ -24,7 +23,7 @@ class TwoFactorAuthenticationSettingsTest extends TestCase
$this->withSession(['auth.password_confirmed_at' => time()]);
Livewire::test(TwoFactorAuthenticationForm::class)
Livewire::test('two-factor-authentication-form')
->call('enableTwoFactorAuthentication');
$user = $user->fresh();
@@ -43,7 +42,7 @@ class TwoFactorAuthenticationSettingsTest extends TestCase
$this->withSession(['auth.password_confirmed_at' => time()]);
$component = Livewire::test(TwoFactorAuthenticationForm::class)
$component = Livewire::test('two-factor-authentication-form')
->call('enableTwoFactorAuthentication')
->call('regenerateRecoveryCodes');
@@ -65,7 +64,7 @@ class TwoFactorAuthenticationSettingsTest extends TestCase
$this->withSession(['auth.password_confirmed_at' => time()]);
$component = Livewire::test(TwoFactorAuthenticationForm::class)
$component = Livewire::test('two-factor-authentication-form')
->call('enableTwoFactorAuthentication');
$this->assertNotNull($user->fresh()->two_factor_secret);
+3 -4
View File
@@ -7,7 +7,6 @@ namespace Tests;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Hash;
use Laravel\Jetstream\Http\Livewire\UpdatePasswordForm;
use Livewire\Livewire;
class UpdatePasswordTest extends TestCase
@@ -18,7 +17,7 @@ class UpdatePasswordTest extends TestCase
{
$this->actingAs($user = User::factory()->create());
Livewire::test(UpdatePasswordForm::class)
Livewire::test('update-password-form')
->set('state', [
'current_password' => 'password',
'password' => 'new-password',
@@ -33,7 +32,7 @@ class UpdatePasswordTest extends TestCase
{
$this->actingAs($user = User::factory()->create());
Livewire::test(UpdatePasswordForm::class)
Livewire::test('update-password-form')
->set('state', [
'current_password' => 'wrong-password',
'password' => 'new-password',
@@ -49,7 +48,7 @@ class UpdatePasswordTest extends TestCase
{
$this->actingAs($user = User::factory()->create());
Livewire::test(UpdatePasswordForm::class)
Livewire::test('update-password-form')
->set('state', [
'current_password' => 'password',
'password' => 'new-password',