From ad7f3fc22ea9d585db88449de4bbcc951031a644 Mon Sep 17 00:00:00 2001 From: Eleazar Resendez Date: Tue, 1 Sep 2026 10:42:59 -0600 Subject: [PATCH 1/2] fix(users): show job title validation errors --- resources/views/admin/users/edit.blade.php | 2 ++ resources/views/profile/edit.blade.php | 2 ++ resources/views/shared/users/profile.blade.php | 4 ++++ tests/Feature/Admin/UserTest.php | 14 ++++++++++++++ 4 files changed, 22 insertions(+) diff --git a/resources/views/admin/users/edit.blade.php b/resources/views/admin/users/edit.blade.php index 180739726b..741a449382 100644 --- a/resources/views/admin/users/edit.blade.php +++ b/resources/views/admin/users/edit.blade.php @@ -263,6 +263,7 @@ username: null, firstname: null, lastname: null, + title: null, email: null, password: null, status: null, @@ -444,6 +445,7 @@ username: null, firstname: null, lastname: null, + title: null, email: null, password: null, status: null diff --git a/resources/views/profile/edit.blade.php b/resources/views/profile/edit.blade.php index 6154ab5dc5..a9f56fee55 100644 --- a/resources/views/profile/edit.blade.php +++ b/resources/views/profile/edit.blade.php @@ -168,6 +168,7 @@ username: null, firstname: null, lastname: null, + title: null, email: null, password: null, status: null @@ -240,6 +241,7 @@ username: null, firstname: null, lastname: null, + title: null, email: null, password: null, status: null diff --git a/resources/views/shared/users/profile.blade.php b/resources/views/shared/users/profile.blade.php index ab98ec366a..2e5e7f1a81 100644 --- a/resources/views/shared/users/profile.blade.php +++ b/resources/views/shared/users/profile.blade.php @@ -27,10 +27,14 @@ id="title" class="mb-2" v-model="formData.title" + :state="errors.title ? false : null" type="text" required placeholder="Job Title" > +
{{__('Contact Information')}}
diff --git a/tests/Feature/Admin/UserTest.php b/tests/Feature/Admin/UserTest.php index 6dd0f18530..ea6290fb12 100644 --- a/tests/Feature/Admin/UserTest.php +++ b/tests/Feature/Admin/UserTest.php @@ -76,4 +76,18 @@ public function testCannotSeeAditionalInformationInProfileRoute() $response->assertViewIs('profile.edit'); $response->assertDontSee('Additional Information'); } + + public function testJobTitleValidationFeedbackIsRenderedInUserEditForms(): void + { + $userId = User::factory()->create()->id; + + foreach (["/admin/users/{$userId}/edit", '/profile/edit'] as $url) { + $response = $this->webCall('GET', $url); + + $response->assertStatus(200); + $response->assertSee(':state="errors.title ? false : null"', false); + $response->assertSee('v-if="errors.title"', false); + $response->assertSee('@{{errors.title[0]}}', false); + } + } } From 2417e148df05ad5275c618f1783556ace4c658b4 Mon Sep 17 00:00:00 2001 From: Eleazar Resendez Date: Tue, 1 Sep 2026 13:46:25 -0600 Subject: [PATCH 2/2] test(users): fix job title feedback assertion --- tests/Feature/Admin/UserTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Feature/Admin/UserTest.php b/tests/Feature/Admin/UserTest.php index ea6290fb12..f738e464ea 100644 --- a/tests/Feature/Admin/UserTest.php +++ b/tests/Feature/Admin/UserTest.php @@ -87,7 +87,7 @@ public function testJobTitleValidationFeedbackIsRenderedInUserEditForms(): void $response->assertStatus(200); $response->assertSee(':state="errors.title ? false : null"', false); $response->assertSee('v-if="errors.title"', false); - $response->assertSee('@{{errors.title[0]}}', false); + $response->assertSee('{{errors.title[0]}}', false); } } }