48 lines
1.8 KiB
PHP
48 lines
1.8 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Modules\Helpdesk\Tests\Feature;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
final class TicketTimerButtonSizeFilesTest extends TestCase
|
|
{
|
|
/**
|
|
* Ensure the inactive timer action remains readable, single-line, and does not reintroduce unused script files.
|
|
*/
|
|
public function test_start_timer_button_uses_readable_single_line_professional_classes(): void
|
|
{
|
|
$viewPath = dirname(__DIR__, 2) . '/Resources/views/livewire/ticket-timer.blade.php';
|
|
|
|
self::assertFileExists($viewPath);
|
|
|
|
$view = file_get_contents($viewPath);
|
|
|
|
self::assertIsString($view);
|
|
self::assertStringContainsString('data-dusk="start-ticket-timer"', $view);
|
|
self::assertStringContainsString('min-w-[9.5rem]', $view);
|
|
self::assertStringContainsString('whitespace-nowrap rounded-md bg-blue-600 px-4 py-2 text-sm', $view);
|
|
self::assertStringNotContainsString('px-3 py-1.5 text-xs', $view);
|
|
self::assertStringNotContainsString('ticket-timer.js', $view);
|
|
}
|
|
|
|
/**
|
|
* Ensure the active timer action also remains readable and single-line.
|
|
*/
|
|
public function test_end_timer_button_uses_matching_readable_single_line_professional_classes(): void
|
|
{
|
|
$viewPath = dirname(__DIR__, 2) . '/Resources/views/livewire/ticket-timer.blade.php';
|
|
|
|
self::assertFileExists($viewPath);
|
|
|
|
$view = file_get_contents($viewPath);
|
|
|
|
self::assertIsString($view);
|
|
self::assertStringContainsString('data-dusk="end-ticket-timer"', $view);
|
|
self::assertStringContainsString('min-w-[9.5rem] shrink-0 items-center justify-center whitespace-nowrap rounded-md bg-red-600 px-4 py-2 text-sm', $view);
|
|
self::assertStringNotContainsString('rounded-lg bg-red-600 px-4 py-2.5 text-sm', $view);
|
|
self::assertStringNotContainsString('ticket-timer.js', $view);
|
|
}
|
|
}
|