From d64cbda3e8013a08dc9234cf040837363224cc59 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 11 Aug 2026 12:18:35 +0200 Subject: [PATCH] fix(profile): remove redundant 2FA enabled badge --- .../views/livewire/profile/index.blade.php | 23 ++++++++----------- .../ProfileAppearanceNavigationTest.php | 7 ++++++ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/resources/views/livewire/profile/index.blade.php b/resources/views/livewire/profile/index.blade.php index 8ad2e9207..000b9d3d0 100644 --- a/resources/views/livewire/profile/index.blade.php +++ b/resources/views/livewire/profile/index.blade.php @@ -261,19 +261,16 @@ @elseif (request()->user()->two_factor_confirmed_at)
-
- -
-
- @csrf - Regenerate recovery codes -
-
- @csrf - @method('DELETE') - Disable 2FA -
-
+
+
+ @csrf + Regenerate recovery codes +
+
+ @csrf + @method('DELETE') + Disable 2FA +
@if (session('status') === 'two-factor-authentication-confirmed' || session('status') === 'recovery-codes-generated') diff --git a/tests/Feature/ProfileAppearanceNavigationTest.php b/tests/Feature/ProfileAppearanceNavigationTest.php index 84ab89689..3318ae684 100644 --- a/tests/Feature/ProfileAppearanceNavigationTest.php +++ b/tests/Feature/ProfileAppearanceNavigationTest.php @@ -27,6 +27,13 @@ it('opens the email change form without a Livewire request', function () { ->not->toContain('wire:click="showEmailChangeForm"'); }); +it('does not show a redundant enabled badge for two-factor authentication', function () { + $profileView = file_get_contents(resource_path('views/livewire/profile/index.blade.php')); + + expect($profileView) + ->not->toContain(''); +}); + it('keeps color theme preferences on the profile appearance view without page width or density controls', function () { $appearanceView = file_get_contents(resource_path('views/livewire/profile/appearance.blade.php'));