Repo rebuild
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Helpdesk\Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class TicketTimerCleanUiFilesTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Timer markup should live in one loaded component without duplicated control-panel timer displays.
|
||||
*/
|
||||
public function test_ticket_controls_do_not_duplicate_timer_display_logic(): void
|
||||
{
|
||||
$controls = (string) file_get_contents(base_path('Modules/Helpdesk/resources/views/partials/ticket-controls.blade.php'));
|
||||
$timer = (string) file_get_contents(base_path('Modules/Helpdesk/resources/views/livewire/ticket-timer.blade.php'));
|
||||
$provider = (string) file_get_contents(base_path('Modules/Helpdesk/Providers/HelpdeskServiceProvider.php'));
|
||||
|
||||
$this->assertStringContainsString("@include('helpdesk::partials.ticket-time-timer'", $controls);
|
||||
$this->assertStringNotContainsString('data-helpdesk-running-summary-badge', $controls);
|
||||
$this->assertStringNotContainsString('data-helpdesk-panel-elapsed', $controls);
|
||||
$this->assertStringNotContainsString('MutationObserver', $controls);
|
||||
$this->assertStringContainsString('data-helpdesk-live-elapsed', $timer);
|
||||
$this->assertStringContainsString("Livewire::component('helpdesk.ticket-timer'", $provider);
|
||||
}
|
||||
|
||||
/**
|
||||
* The module must not contain accidental duplicate Blade folders or macOS artefacts.
|
||||
*/
|
||||
public function test_helpdesk_module_does_not_contain_known_rubbish_files(): void
|
||||
{
|
||||
$this->assertDirectoryDoesNotExist(base_path('Modules/Helpdesk/resources/views/views'));
|
||||
$this->assertFileDoesNotExist(base_path('Modules/Helpdesk/.DS_Store'));
|
||||
$this->assertFileDoesNotExist(base_path('Modules/Helpdesk/resources/.DS_Store'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user