update plans; assign lifetime;kanban; column sort;
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-04 11:10:05 -08:00
parent 177f122c10
commit 31a80ec4d1
26 changed files with 2984 additions and 672 deletions
+34
View File
@@ -670,3 +670,37 @@ test('completed todos sort last regardless of their position', function () {
Livewire::test('pages::dashboard')
->assertSeeInOrder(['Pending task', 'Finished task']);
});
test('dashboard todos can be sorted by a column', function () {
$this->travelTo('2026-09-18 09:00:00');
$user = User::factory()->create();
$this->actingAs($user);
$folder = Folder::factory()->for($user)->create(['name' => 'Work']);
Todo::factory()->recycle($user)->for($folder)->create([
'description' => 'Later task',
'due_date' => today()->addDays(2),
'position' => 0,
]);
Todo::factory()->recycle($user)->for($folder)->create([
'description' => 'Sooner task',
'due_date' => today()->addDay(),
'position' => 1,
]);
Todo::factory()->recycle($user)->for($folder)->noDueDate()->create([
'description' => 'No due task',
'position' => 2,
]);
Livewire::test('pages::dashboard')
->assertSeeInOrder(['Later task', 'Sooner task', 'No due task'])
->call('sort', 'due_date')
->assertSet('sortBy', 'due_date')
->assertSet('sortDirection', 'asc')
->assertSeeInOrder(['Sooner task', 'Later task', 'No due task'])
->call('sort', 'due_date')
->assertSet('sortDirection', 'desc')
->assertSeeInOrder(['Later task', 'Sooner task', 'No due task']);
});