test(ui): poll for the debounced skill auto-save instead of a fixed sleep

Task_toggling_a_skill_auto_saves_selection waited a hard 500 ms for a
debounced save. It passed in isolation and in either half of the suite,
but failed in a full run: this batch added three DB-backed UI test
classes whose real SQLite contexts load the thread pool enough that the
timer callback misses the window. Product code is unchanged.

Same assertion, polled with a 5 s deadline - the pattern the newly added
DetailsIsland/TasksIsland tests already use.
This commit is contained in:
mika kuns
2026-08-05 09:43:13 +02:00
parent 48de816051
commit 8d7ba1e314
2 changed files with 8 additions and 4 deletions
@@ -79,7 +79,7 @@ public class DetailsIslandTaskUpdatedTests : IDisposable
new ClaudeDo.Ui.Services.MergeCoordinator());
[Fact]
public async Task TaskUpdated_ForBoundTask_RefreshesStatusAndPickUpInTerminal()
public async Task TaskUpdated_ForBoundTask_RefreshesStatus()
{
await SeedTaskAsync("t-bound-1", TaskStatus.Running);
@@ -88,7 +88,7 @@ public class DetailsIslandTaskUpdatedTests : IDisposable
vm.Bind(new TaskRowViewModel { Id = "t-bound-1", Status = TaskStatus.Running });
await Task.Delay(50);
Assert.False(vm.CanPickUpInTerminal);
Assert.Equal(TaskStatus.Running, vm.Task?.Status);
await using (var db = NewContext())
{
@@ -102,7 +102,6 @@ public class DetailsIslandTaskUpdatedTests : IDisposable
await Task.Delay(25);
Assert.Equal(TaskStatus.WaitingForReview, vm.Task?.Status);
Assert.True(vm.CanPickUpInTerminal);
}
[Fact]