fix(ui): prevent dragging completed tasks in the task list
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
2b7b58be37
commit
b776fd28d8
@@ -347,6 +347,27 @@ public class TasksIslandRegroupTests : IDisposable
|
||||
Assert.Equal(new[] { "t2", "t3", "t1" }, vm.Rows.OfType<TaskRowViewModel>().Select(r => r.Id));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ReorderAsync_WithDoneSourceOrTarget_IsNoOp()
|
||||
{
|
||||
await SeedTasksAsync(
|
||||
("t1", TaskStatus.Idle, null, 0),
|
||||
("t2", TaskStatus.Idle, null, 1),
|
||||
("t3", TaskStatus.Done, null, 2));
|
||||
|
||||
var vm = BuildViewModel();
|
||||
await LoadAndWaitAsync(vm, UserList("list1", "Default"));
|
||||
|
||||
var t1 = vm.Items.First(r => r.Id == "t1");
|
||||
var t3 = vm.Items.First(r => r.Id == "t3");
|
||||
var before = vm.Items.Select(r => r.Id).ToList();
|
||||
|
||||
await vm.ReorderAsync(t1, t3, placeBelow: true);
|
||||
await vm.ReorderAsync(t3, t1, placeBelow: false);
|
||||
|
||||
Assert.Equal(before, vm.Items.Select(r => r.Id));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task SetScheduledForAsync_LocalDateTime_PersistsAsUtc()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user