seedLookupData(); $user = $this->admin(); $ticket = $this->ticket([ 'owner' => $user, 'status_id' => $lookups['open']->id, 'priority_id' => $lookups['high']->id, 'subject' => 'Kanban visible ticket', ]); $this->actingAs($user); Livewire::test(KanbanBoard::class) ->assertSee('Kanban board') ->assertSee($ticket->reference) ->assertSee('Kanban visible ticket') ->assertSee('High'); } /** @test */ public function kanban_board_can_move_ticket_to_closed_status(): void { $lookups = $this->seedLookupData(); $user = $this->admin(); $ticket = $this->ticket([ 'owner' => $user, 'status_id' => $lookups['open']->id, 'priority_id' => $lookups['normal']->id, ]); $this->actingAs($user); Livewire::test(KanbanBoard::class) ->call('moveTicket', $ticket->id, $lookups['closed']->id) ->assertHasNoErrors(); $ticket->refresh(); $this->assertSame($lookups['closed']->id, $ticket->status_id); $this->assertNotNull($ticket->completed_at); } }