diff --git a/resources/views/livewire/profile/index.blade.php b/resources/views/livewire/profile/index.blade.php index 95a1dc5669..42be93c5d3 100644 --- a/resources/views/livewire/profile/index.blade.php +++ b/resources/views/livewire/profile/index.blade.php @@ -218,8 +218,9 @@

Two-factor authentication

Add a time-based one-time password to protect your account.

- @if (! request()->user()->two_factor_confirmed_at - && session('status') !== 'two-factor-authentication-enabled') + @if (request()->user()->two_factor_confirmed_at) + + @elseif (session('status') !== 'two-factor-authentication-enabled')
@csrf Configure 2FA diff --git a/tests/Feature/ProfileAppearanceNavigationTest.php b/tests/Feature/ProfileAppearanceNavigationTest.php index a0ee4c30ef..fdba4e9916 100644 --- a/tests/Feature/ProfileAppearanceNavigationTest.php +++ b/tests/Feature/ProfileAppearanceNavigationTest.php @@ -27,11 +27,11 @@ 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 () { +it('shows the two-factor authentication state as a header badge', function () { $profileView = file_get_contents(resource_path('views/livewire/profile/index.blade.php')); expect($profileView) - ->not->toContain(''); + ->toContain(''); }); it('offers full and centered page width preferences on the profile appearance view', function () {