added pricing, orgs
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-04 20:34:19 -07:00
parent 999d5ad28d
commit 2ca3860557
52 changed files with 3467 additions and 47 deletions
+51
View File
@@ -607,6 +607,57 @@ test('dragging accounts for the pagination offset', function () {
expect($todoTwelve->fresh()->position)->toBe(10);
});
test('the table re-renders in the new order after a drag', function () {
$user = User::factory()->create();
$this->actingAs($user);
$folder = Folder::factory()->for($user)->create(['name' => 'Work']);
$first = Todo::factory()->recycle($user)->for($folder)->create(['description' => 'First todo', 'position' => 0]);
$second = Todo::factory()->recycle($user)->for($folder)->create(['description' => 'Second todo', 'position' => 1]);
$third = Todo::factory()->recycle($user)->for($folder)->create(['description' => 'Third todo', 'position' => 2]);
Livewire::test('pages::dashboard')
->assertSeeInOrder(['First todo', 'Second todo', 'Third todo'])
->call('handleSort', $first->id, 2)
->assertSeeInOrder(['Second todo', 'Third todo', 'First todo']);
});
test('the table re-renders in the new order after moving a todo', function () {
$user = User::factory()->create();
$this->actingAs($user);
$folder = Folder::factory()->for($user)->create(['name' => 'Work']);
$first = Todo::factory()->recycle($user)->for($folder)->create(['description' => 'First todo', 'position' => 0]);
Todo::factory()->recycle($user)->for($folder)->create(['description' => 'Second todo', 'position' => 1]);
Livewire::test('pages::dashboard')
->assertSeeInOrder(['First todo', 'Second todo'])
->call('moveTodo', $first->id, 'down')
->assertSeeInOrder(['Second todo', 'First todo']);
});
test('reordering while filtered keeps the order of the todos the filter hides', function () {
$user = User::factory()->create();
$this->actingAs($user);
$work = Folder::factory()->for($user)->create(['name' => 'Work']);
$home = Folder::factory()->for($user)->create(['name' => 'Home']);
Todo::factory()->recycle($user)->for($home)->create(['description' => 'Home one', 'position' => 0]);
Todo::factory()->recycle($user)->for($home)->create(['description' => 'Home two', 'position' => 1]);
$workOne = Todo::factory()->recycle($user)->for($work)->create(['description' => 'Work one', 'position' => 2]);
Todo::factory()->recycle($user)->for($work)->create(['description' => 'Work two', 'position' => 3]);
Livewire::test('pages::dashboard')
->set('folderId', $work->id)
->call('handleSort', $workOne->id, 1);
Livewire::test('pages::dashboard')
->assertSeeInOrder(['Home one', 'Home two', 'Work two', 'Work one']);
});
test('completed todos sort last regardless of their position', function () {
$user = User::factory()->create();
$this->actingAs($user);