Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public void Issue38059_UntemplatedVerticalGridLayout()
[ShardedTestCategory(UITestCategories.CollectionView)]
public void Issue38059_UntemplatedHorizontalGridLayout()
{
this.IgnoreOnWindowsCV1("https://github.com/dotnet/maui/issues/39874");

App.WaitForElement("ChangeLayoutButton");
App.Tap("ChangeLayoutButton");
VerifyScreenshot();
Expand Down
26 changes: 26 additions & 0 deletions src/Controls/tests/TestCases.Shared.Tests/UtilExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,32 @@ public static void IgnoreOnAndroidShellHandler(this UITestContextBase testBase,
}
}

/// <summary>
/// Ignores the current test only when running in the Windows CollectionView1 configuration.
/// </summary>
public static void IgnoreOnWindowsCV1(this UITestContextBase testBase, string reason)
{
if (testBase.Device == TestDevice.Windows &&
Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ARGS")?.Contains(
"UseWindowsCV1:true", StringComparison.OrdinalIgnoreCase) == true)
{
Assert.Ignore(reason);
}
}

/// <summary>
/// Ignores the current test only when running in the Windows CollectionView2 configuration.
/// </summary>
public static void IgnoreOnWindowsCV2(this UITestContextBase testBase, string reason)
{
if (testBase.Device == TestDevice.Windows &&
Environment.GetEnvironmentVariable("TEST_CONFIGURATION_ARGS")?.Contains(
"UseWindowsCV1:true", StringComparison.OrdinalIgnoreCase) != true)
{
Assert.Ignore(reason);
}
}

public static void Back(this UITestContextBase testBase)
{
if (testBase.Device == TestDevice.Android)
Expand Down
Loading