Use a specialty dropdown when adding practitioners.
Deploy Ladill Care / deploy (push) Successful in 26s
Deploy Ladill Care / deploy (push) Successful in 26s
Replace free-text specialty on practitioner and team-invite forms with a shared selectable list so clinicians pick a known specialty. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -24,14 +24,14 @@ class CarePractitionerBranchesTest extends TestCase
|
||||
$this->actingAs($owner)
|
||||
->post(route('care.practitioners.store'), [
|
||||
'name' => 'Dr. Tele',
|
||||
'specialty' => 'General',
|
||||
'specialty' => 'General Practice',
|
||||
])
|
||||
->assertSessionHasErrors('branch_ids');
|
||||
|
||||
$this->actingAs($owner)
|
||||
->post(route('care.practitioners.store'), [
|
||||
'name' => 'Dr. Tele',
|
||||
'specialty' => 'General',
|
||||
'specialty' => 'General Practice',
|
||||
'branch_ids' => [$east->id, $west->id],
|
||||
])
|
||||
->assertRedirect(route('care.practitioners.index'));
|
||||
@@ -51,6 +51,37 @@ class CarePractitionerBranchesTest extends TestCase
|
||||
->assertDontSee('All branches');
|
||||
}
|
||||
|
||||
public function test_practitioner_create_form_uses_specialty_dropdown(): void
|
||||
{
|
||||
$this->withoutMiddleware(EnsurePlatformSession::class);
|
||||
|
||||
[$owner] = $this->seedOrg();
|
||||
|
||||
$this->actingAs($owner)
|
||||
->get(route('care.practitioners.create'))
|
||||
->assertOk()
|
||||
->assertSee('name="specialty"', false)
|
||||
->assertSee('<select name="specialty"', false)
|
||||
->assertSee('General Practice')
|
||||
->assertSee('Dentistry')
|
||||
->assertDontSee('placeholder="General practice"', false);
|
||||
}
|
||||
|
||||
public function test_practitioner_rejects_unknown_specialty(): void
|
||||
{
|
||||
$this->withoutMiddleware(EnsurePlatformSession::class);
|
||||
|
||||
[$owner, $organization, $east] = $this->seedOrg();
|
||||
|
||||
$this->actingAs($owner)
|
||||
->post(route('care.practitioners.store'), [
|
||||
'name' => 'Dr. Unknown',
|
||||
'specialty' => 'Not A Real Specialty',
|
||||
'branch_ids' => [$east->id],
|
||||
])
|
||||
->assertSessionHasErrors('specialty');
|
||||
}
|
||||
|
||||
public function test_doctor_with_multiple_assigned_branches_can_switch_among_them_only(): void
|
||||
{
|
||||
$this->withoutMiddleware(EnsurePlatformSession::class);
|
||||
|
||||
Reference in New Issue
Block a user