From fb2cd0696ffae3efecf544da4e3d3959961a746e Mon Sep 17 00:00:00 2001 From: topprogrammer77 Date: Wed, 19 Jul 2023 10:54:05 -0400 Subject: [PATCH] perf: adjust when_disabled test because sometimes it fails --- .../DragAndDropTests/DragDrop_ListViewReorder_Automated.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml/DragAndDropTests/DragDrop_ListViewReorder_Automated.cs b/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml/DragAndDropTests/DragDrop_ListViewReorder_Automated.cs index 6a9719da644c..6afd82e2c299 100644 --- a/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml/DragAndDropTests/DragDrop_ListViewReorder_Automated.cs +++ b/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml/DragAndDropTests/DragDrop_ListViewReorder_Automated.cs @@ -35,10 +35,13 @@ public async Task When_Disabled() // Disable re-ordering mode.SetDependencyPropertyValue("IsChecked", "False"); + // Tap outside the ListView to get rid of PointerOver visual from the step above + var sutBounds = _app.Query(sut).Single().Rect; + _app.TapCoordinates(sutBounds.CenterX, sutBounds.Bottom + 10); + var before = TakeScreenshot("Before", ignoreInSnapshotCompare: true); // Attempt to re-order by dragging from item1 (orange) to item3 (green) - var sutBounds = _app.Query(sut).Single().Rect; var x = sutBounds.X + 50; var srcY = Item(sutBounds, 1); var dstY = Item(sutBounds, 3);