Skip to content

Commit 0e7c0a7

Browse files
committed
Added test for same drop target
1 parent 4c94e14 commit 0e7c0a7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/LinkDotNet.Blog.IntegrationTests/Web/Shared/ProfileTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,20 @@ public void ShouldSetNewOrderWhenItemDragAndDropped()
138138
entryToDb.Should().Be(source);
139139
}
140140

141+
[Fact]
142+
public void ShouldNotChangeSortOrderWhenDroppedOnItself()
143+
{
144+
var source = new ProfileInformationEntryBuilder().WithSortOrder(200).Build();
145+
var (repo, _) = RegisterServices();
146+
SetupGetAll(repo, source);
147+
var cut = RenderComponent<Profile>(p => p.Add(s => s.IsAuthenticated, true));
148+
149+
cut.FindAll("li")[0].Drag();
150+
cut.FindAll("li")[0].Drop();
151+
152+
source.SortOrder.Should().Be(200);
153+
}
154+
141155
private static AppConfiguration CreateEmptyConfiguration()
142156
{
143157
return new()

0 commit comments

Comments
 (0)