Collapse the grabbed row out of layout instead of overlapping neighbors with scale/opacity/shadow (the ghost window already shows the moving snapshot). Replace the thin moss drop-hint lines with a dashed placeholder gap sized like a collapsed row. Suppress the ordinary hover highlight and transitions on whatever row is currently the drop target so it doesn't read as "clickable" while dragging.
46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using System.Collections.Generic;
|
|
using ClaudeDo.Data.Models;
|
|
using ClaudeDo.Ui.ViewModels.Islands;
|
|
using Xunit;
|
|
using TaskStatus = ClaudeDo.Data.Models.TaskStatus;
|
|
|
|
namespace ClaudeDo.Worker.Tests.UiVm;
|
|
|
|
public class TaskRowViewModelTests
|
|
{
|
|
[Theory]
|
|
[InlineData(TaskStatus.Running, "running")]
|
|
[InlineData(TaskStatus.WaitingForReview, "review")]
|
|
[InlineData(TaskStatus.Failed, "error")]
|
|
[InlineData(TaskStatus.Done, "done")]
|
|
[InlineData(TaskStatus.Queued, "queued")]
|
|
[InlineData(TaskStatus.Idle, "idle")]
|
|
public void StatusChipClass_Maps_Correctly(TaskStatus s, string expected)
|
|
{
|
|
var vm = new TaskRowViewModel { Id = "t" };
|
|
vm.Status = s;
|
|
Assert.Equal(expected, vm.StatusChipClass);
|
|
}
|
|
|
|
[Fact]
|
|
public void IsDropTarget_Follows_Either_DropHint_And_Raises_PropertyChanged()
|
|
{
|
|
var vm = new TaskRowViewModel { Id = "t" };
|
|
var raised = new List<string?>();
|
|
vm.PropertyChanged += (_, e) => raised.Add(e.PropertyName);
|
|
|
|
Assert.False(vm.IsDropTarget);
|
|
|
|
vm.DropHintAbove = true;
|
|
Assert.True(vm.IsDropTarget);
|
|
Assert.Contains(nameof(TaskRowViewModel.IsDropTarget), raised);
|
|
|
|
vm.DropHintAbove = false;
|
|
vm.DropHintBelow = true;
|
|
Assert.True(vm.IsDropTarget);
|
|
|
|
vm.DropHintBelow = false;
|
|
Assert.False(vm.IsDropTarget);
|
|
}
|
|
}
|