25 lines
986 B
PHP
25 lines
986 B
PHP
<?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);
|
|
}
|
|
}
|