updated backup script to include vendor directory added git suggestion and also spell check on comments
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* TicketBranchCommandUiFilesTest.php
|
||||
*
|
||||
* Guards the ticket-level Git activity branch command builder and comment UI polish.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Helpdesk\Tests\Feature;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class TicketBranchCommandUiFilesTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Ensure ticket Git activity exposes a professional branch command copy workflow.
|
||||
*/
|
||||
public function test_ticket_git_activity_has_branch_command_builder_and_copy_button(): void
|
||||
{
|
||||
$viewPath = dirname(__DIR__, 2) . '/Resources/views/livewire/ticket-show.blade.php';
|
||||
|
||||
self::assertFileExists($viewPath);
|
||||
|
||||
$view = file_get_contents($viewPath);
|
||||
|
||||
self::assertIsString($view);
|
||||
self::assertStringContainsString('data-helpdesk-branch-command', $view);
|
||||
self::assertStringContainsString('git checkout -b bugfix/{{ $ticket->reference }}-', $view);
|
||||
self::assertStringContainsString('data-helpdesk-branch-suffix', $view);
|
||||
self::assertStringContainsString('data-helpdesk-copy-branch-command', $view);
|
||||
self::assertStringContainsString('copyHelpdeskBranchCommand', $view);
|
||||
self::assertStringContainsString('normaliseHelpdeskBranchSuffix', $view);
|
||||
self::assertStringContainsString('Copied to clipboard.', $view);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure visibility selectors keep their accent backgrounds during interaction.
|
||||
*/
|
||||
public function test_visibility_controls_keep_accent_backgrounds_on_hover_and_focus(): void
|
||||
{
|
||||
$ticketViewPath = dirname(__DIR__, 2) . '/Resources/views/livewire/ticket-show.blade.php';
|
||||
$threadViewPath = dirname(__DIR__, 2) . '/Resources/views/partials/comment-thread.blade.php';
|
||||
|
||||
$ticketView = file_get_contents($ticketViewPath);
|
||||
$threadView = file_get_contents($threadViewPath);
|
||||
|
||||
self::assertIsString($ticketView);
|
||||
self::assertIsString($threadView);
|
||||
self::assertStringContainsString('hover:bg-emerald-100/80', $ticketView);
|
||||
self::assertStringContainsString('focus-within:bg-emerald-100/80', $ticketView);
|
||||
self::assertStringContainsString('hover:bg-purple-100/80', $ticketView);
|
||||
self::assertStringContainsString('focus-within:bg-purple-100/80', $ticketView);
|
||||
self::assertStringContainsString('hover:bg-emerald-100/80', $threadView);
|
||||
self::assertStringContainsString('hover:bg-purple-100/80', $threadView);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure ticket comments and threaded replies expose browser spelling hints.
|
||||
*/
|
||||
public function test_ticket_comment_subjects_and_bodies_enable_spellcheck(): void
|
||||
{
|
||||
$ticketViewPath = dirname(__DIR__, 2) . '/Resources/views/livewire/ticket-show.blade.php';
|
||||
$threadViewPath = dirname(__DIR__, 2) . '/Resources/views/partials/comment-thread.blade.php';
|
||||
|
||||
$ticketView = file_get_contents($ticketViewPath);
|
||||
$threadView = file_get_contents($threadViewPath);
|
||||
|
||||
self::assertIsString($ticketView);
|
||||
self::assertIsString($threadView);
|
||||
self::assertStringContainsString('data-helpdesk-comment-subject', $ticketView);
|
||||
self::assertStringContainsString('spellcheck="true" lang="en-GB" autocorrect="on" autocomplete="on" autocapitalize="sentences" inputmode="text"', $ticketView);
|
||||
self::assertStringContainsString('role="textbox" aria-multiline="true" spellcheck="true"', $ticketView);
|
||||
self::assertStringContainsString('id="reply-subject-{{ $comment->id }}"', $threadView);
|
||||
self::assertStringContainsString('spellcheck="true" lang="en-GB" autocorrect="on" autocomplete="on" autocapitalize="sentences" inputmode="text"', $threadView);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user