---
url: /reference/testing.md
description: >-
  Test your scheduler rules and Kanban boards with Pest and Livewire: the widget
  endpoints are plain Livewire methods.
---

# Testing

The widgets' endpoints are plain Livewire methods, so you can test your rules directly.

## Scheduler moves

```php
$result = Livewire::test(FrontDeskSchedule::class)->instance()
    ->moveEvent((string) $appointment->id, '2026-09-24T14:00:00', '2026-09-24T15:00:00', (string) $staff->id);

expect($result['ok'])->toBeFalse()
    ->and($result['rejection']['reason'])->toBe('unavailable');
```

## Actions

Create, view, edit and delete are native Filament actions:

```php
use Filament\Actions\Testing\TestAction;

Livewire::test(FrontDeskSchedule::class)
    ->mountAction(TestAction::make('viewEvent')->arguments(['event' => (string) $appointment->id]))
    ->assertMountedActionModalSee($appointment->title);

Livewire::test(FrontDeskSchedule::class)
    ->callAction('editEvent', ['title' => 'Renamed'], ['event' => (string) $appointment->id])
    ->assertNotified();
```

## Kanban

```php
Livewire::test(TaskBoard::class)
    ->callAction('editCard', ['title' => 'Renamed'], ['card' => (string) $task->id]);
```
