Clarify device registration with type-specific helper text.
Deploy Ladill Frontdesk / deploy (push) Successful in 30s
Deploy Ladill Frontdesk / deploy (push) Successful in 30s
Replace the static kiosk/printer token message with dynamic hints per device type so reception computers are not misread as getting unattended access. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -82,6 +82,31 @@ class FrontdeskPhase7Test extends TestCase
|
||||
$this->assertNotEmpty($device->device_token);
|
||||
}
|
||||
|
||||
public function test_device_create_page_shows_type_specific_registration_hints(): void
|
||||
{
|
||||
$response = $this->actingAs($this->user)->get(route('frontdesk.devices.create'));
|
||||
|
||||
$response->assertOk();
|
||||
$response->assertSee('Tracked for your team only', false);
|
||||
$response->assertSee('Open the kiosk URL on your tablet', false);
|
||||
$response->assertSee('x-model="type"', false);
|
||||
$response->assertDontSee('Kiosks and printers receive a device token for unattended access.', false);
|
||||
}
|
||||
|
||||
public function test_reception_computer_registration_does_not_issue_token(): void
|
||||
{
|
||||
$this->actingAs($this->user)
|
||||
->post(route('frontdesk.devices.store'), [
|
||||
'name' => 'Front desk PC',
|
||||
'type' => 'reception_computer',
|
||||
])
|
||||
->assertRedirect(route('frontdesk.devices.index'));
|
||||
|
||||
$device = Device::first();
|
||||
$this->assertSame('reception_computer', $device->type);
|
||||
$this->assertNull($device->device_token);
|
||||
}
|
||||
|
||||
public function test_kiosk_device_page_works_without_auth(): void
|
||||
{
|
||||
$device = $this->createKioskDevice();
|
||||
|
||||
Reference in New Issue
Block a user