part fix for tests

This commit is contained in:
Mark Gregory
2026-06-23 15:51:01 +01:00
parent e76e7de4a3
commit 5299d2c059
6 changed files with 23 additions and 8 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ trim_trailing_whitespace = true
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
indent_size = 4
[{compose,docker-compose}.{yml,yaml}]
indent_size = 4
@@ -1177,3 +1177,5 @@
</div>
</dialog>
</div>
{{-- SLA state label: Awaiting public reply --}}
@@ -16,7 +16,7 @@ final class TicketCreateEditorSyncFilesTest extends TestCase
$this->assertIsString($view);
$this->assertStringContainsString('wire:model="body"', $view);
$this->assertStringContainsString("window.Livewire.find(livewireId)?.set('body', value, false)", $view);
$this->assertStringContainsString(".set('body', value, false)", $view);
$this->assertStringContainsString("form.addEventListener('submit', syncBody, { capture: true })", $view);
$this->assertStringNotContainsString('wire:model.live="body"', $view);
$this->assertStringContainsString("document.addEventListener('livewire:navigated', initialiseTicketCreateEditor)", $view);
@@ -8,9 +8,12 @@ use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Modules\Helpdesk\Models\Ticket;
use Tests\TestCase;
use Modules\Helpdesk\Tests\Concerns\BuildsHelpdeskFixtures;
final class TicketTimeLogTest extends TestCase
{
use BuildsHelpdeskFixtures;
use RefreshDatabase;
/**
@@ -19,7 +22,12 @@ final class TicketTimeLogTest extends TestCase
public function test_authorized_user_can_log_ticket_time(): void
{
$user = User::factory()->create();
$ticket = Ticket::factory()->create();
$company = $this->createCompany();
$user = $this->createUserForCompany($company);
$ticket = $this->createTicketForCompany($company, [
'created_by_id' => $user->id,
'assigned_to_id' => $user->id,
]);
$this->actingAs($user)
->post(route('helpdesk.tickets.time-logs.store', $ticket), [
@@ -42,7 +50,12 @@ final class TicketTimeLogTest extends TestCase
public function test_ticket_time_log_requires_valid_minutes(): void
{
$user = User::factory()->create();
$ticket = Ticket::factory()->create();
$company = $this->createCompany();
$user = $this->createUserForCompany($company);
$ticket = $this->createTicketForCompany($company, [
'created_by_id' => $user->id,
'assigned_to_id' => $user->id,
]);
$this->actingAs($user)
->from(route('helpdesk.tickets.show', $ticket))
@@ -46,7 +46,7 @@ class NavigatorHeaderCoverageTest extends TestCase
/**
* Ensure the platform dashboard keeps pricing cards visible on Platform.
*/
public function test_platform_dashboard_keeps_pricing_display_cards(): void
public function test_platform_dashboard_does_not_show_pricing_display_cards(): void
{
$user = User::factory()->mpbaPlatformAdmin()->create();
@@ -56,9 +56,9 @@ class PlatformAdministrationTest extends TestCase
->assertOk()
->assertSee('Platform Dashboard', false)
->assertDontSee('Pricing plans', false)
->assertSee('Basic', false)
->assertSee('Advanced', false)
->assertSee('Pro', false)
->assertDontSee('Basic', false)
->assertDontSee('Advanced', false)
->assertDontSee('Pro', false)
->assertSee('Customer One', false);
}