Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add windows delay and rename similarly named tests
  • Loading branch information
tj-devel709 committed Apr 23, 2025
commit 76a6161d5f46280fbdbcc5199acae1a7d192148f
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ public Issue21375(TestDevice device) : base(device) { }

[Test]
[Category(UITestCategories.CollectionView)]
#if WINDOWS // Windows screenshots are a little behind at times. Adding small delays to help with that
public async Task SelectedItemsShowSelected ()
#else
public void SelectedItemsShowSelected ()
#endif
{
var collectionView = App.WaitForElement("collectionView");
var centerX = collectionView.GetRect().X + (collectionView.GetRect().Width / 2);
Expand All @@ -24,16 +28,25 @@ public void SelectedItemsShowSelected ()

App.TapCoordinates(centerX, firstItemY);
App.WaitForElement("calculateButton").Tap();
#if WINDOWS // Windows has a little bit of delay
await Task.Delay(10);
#endif
VerifyScreenshot(TestContext.CurrentContext.Test.MethodName + "_single");

App.WaitForElement("multipleButton").Tap();
App.TapCoordinates(centerX, secondItemY);
App.TapCoordinates(centerX, thirdItemY);
App.WaitForElement("calculateButton").Tap();
#if WINDOWS // Windows has a little bit of delay
await Task.Delay(10);
#endif
VerifyScreenshot(TestContext.CurrentContext.Test.MethodName + "_multiple");

App.WaitForElement("noneButton").Tap();
App.WaitForElement("calculateButton").Tap();
#if WINDOWS // Windows has a little bit of delay
await Task.Delay(10);
#endif
VerifyScreenshot(TestContext.CurrentContext.Test.MethodName + "_none");

App.WaitForElement("singleButton").Tap();
Expand All @@ -44,6 +57,9 @@ public void SelectedItemsShowSelected ()

App.WaitForElement("multipleButton").Tap();
App.WaitForElement("calculateButton").Tap();
#if WINDOWS // Windows has a little bit of delay
await Task.Delay(10);
#endif
VerifyScreenshot(TestContext.CurrentContext.Test.MethodName + "_multiple");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public Issue21375_2(TestDevice device) : base(device) { }

[Test]
[Category(UITestCategories.CollectionView)]
public void SelectedItemsShowSelected ()
public void SelectedItemsShowSelected2()
{
var collectionView = App.WaitForElement("collectionView");
var centerX = collectionView.GetRect().X + (collectionView.GetRect().Width / 2);
Expand Down
Loading