Files
WMS/Modules/Helpdesk/Tests/Feature/TicketTimerLiveDisplayFilesTest.php
2026-09-21 10:14:57 +01:00

25 lines
986 B
PHP
Executable File

<?php
namespace Modules\Helpdesk\Tests\Feature;
use Tests\TestCase;
class TicketTimerLiveDisplayFilesTest extends TestCase
{
/**
* The timer display must tick in the browser from the database-backed started_at value.
*/
public function test_timer_view_has_browser_side_running_display_without_local_storage(): void
{
$view = (string) file_get_contents(base_path('Modules/Helpdesk/resources/views/livewire/ticket-timer.blade.php'));
$this->assertStringContainsString('data-helpdesk-live-elapsed', $view);
$this->assertStringContainsString('Date.parse', $view);
$this->assertStringContainsString('setInterval', $view);
$this->assertStringContainsString('data-helpdesk-started-at', $view);
$this->assertStringContainsString('data-dusk="ticket-running-time"', $view);
$this->assertStringNotContainsString('localStorage', $view);
$this->assertStringNotContainsString('sessionStorage', $view);
}
}