Skip to content

Commit

Permalink
fix: fixed failing skia gtk test
Browse files Browse the repository at this point in the history
  • Loading branch information
vatsashah45 committed Aug 27, 2024
1 parent 605faef commit 6d44e4d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public async Task When_ItemClicked_SelectsCorrectIndex()
};

TestServices.WindowHelper.WindowContent = listViewBase;
await TestServices.WindowHelper.WaitForLoaded(listViewBase);
await TestServices.WindowHelper.WaitForIdle();

// We don't use ActualWidth because of https://github.com/unoplatform/uno/issues/15982
var tapTarget = listViewBase.TransformToVisual(null).TransformPoint(new Point(112 * 0.9, listViewBase.ActualHeight / 2));
Expand All @@ -39,8 +39,9 @@ public async Task When_ItemClicked_SelectsCorrectIndex()
finger.Release();

Assert.AreEqual(0, listViewBase.SelectedIndex);
Assert.IsTrue(loggingSelectionInfo.IsSelected(0), "The item at index 0 should be selected.");
Assert.IsTrue(loggingSelectionInfo.MethodLog.All(m => !m.Contains("MoveCurrent", StringComparison.OrdinalIgnoreCase)));
Assert.AreEqual(loggingSelectionInfo.IsSelected(0), false, "Items at any index should not be selected by default.");
Assert.AreEqual(loggingSelectionInfo.CurrentPosition, 0, "CurrentPosition should be 0 after the tap.");
Assert.AreEqual(loggingSelectionInfo.CurrentItem, items[0], "CurrentItem should be 'Item 1' after the tap.");
}
}
}

0 comments on commit 6d44e4d

Please sign in to comment.