Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<PackageVersion Include="Uno.UITest.Xamarin" Version="1.1.0-dev.70" />
<PackageVersion Include="Xamarin.AndroidX.Core.SplashScreen" Version="1.0.1.6" />
<PackageVersion Include="Xamarin.UITest" Version="4.3.5" />
<PackageVersion Include="MSTest.TestFramework" Version="2.1.2" />
<PackageVersion Include="MSTest.TestFramework" Version="3.8.3" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Uno.Toolkit.RuntimeTests/Tests/AncestorBindingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests;

[TestClass]
[RunsOnUIThread]
internal class AncestorBindingTests
public class AncestorBindingTests
{
[TestMethod]
public async Task Ancestor_TopLevel_PageBinding()
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.Toolkit.RuntimeTests/Tests/AutoLayoutTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests;

[TestClass]
[RunsOnUIThread]
internal class AutoLayoutTest
public class AutoLayoutTest
{
[TestMethod]
public async Task When_Collapsed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests
{
[TestClass]
[RunsOnUIThread]
internal class CardContentControlTests
public class CardContentControlTests
{
[TestMethod]
[RequiresFullWindow]
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.Toolkit.RuntimeTests/Tests/ChipGroupTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests;

[TestClass]
[RunsOnUIThread]
internal class ChipGroupTests
public class ChipGroupTests
{
/* Test Plan
* - tap triggered selection in various SelectionMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests;

[TestClass]
[RunsOnUIThread]
internal partial class DependencyObjectExtensionTests
public partial class DependencyObjectExtensionTests
{
[TestMethod]
public void When_Type_FindDependencyProperty()
Expand Down Expand Up @@ -74,7 +74,7 @@ public void When_FindDependencyProperty_Ambiguous()
}
}

internal partial class DependencyObjectExtensionTests
public partial class DependencyObjectExtensionTests
{
private partial class AmbiguityBase : DependencyObject
{
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.Toolkit.RuntimeTests/Tests/DrawerFlyoutTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests;

[TestClass]
[RunsOnUIThread]
internal class DrawerFlyoutTests
public class DrawerFlyoutTests
{
[TestMethod]
public async Task Can_Open()
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.Toolkit.RuntimeTests/Tests/DrawerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests;

[TestClass]
[RunsOnUIThread]
internal class DrawerTests
public class DrawerTests
{
[TestMethod]
#if __IOS__
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests;

[TestClass]
[RunsOnUIThread]
internal class ItemsRepeaterChipTests
public class ItemsRepeaterChipTests
{
// note: the default state of Chip.IsChecked (inherited from ToggleButton) is false, since we don't use IsThreeState

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests
{
[TestClass]
[RunsOnUIThread]
partial class ItemsRepeaterExtensionsTests
public partial class ItemsRepeaterExtensionsTests
{
private const ItemsSelectionMode Single = ItemsSelectionMode.Single;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests;

[TestClass]
[RunsOnUIThread]
internal partial class ItemsRepeaterExtensionTests
public partial class ItemsRepeaterExtensionTests
{
[TestMethod]
[DataRow(nameof(ItemsRepeaterExtensions.SelectedItemProperty))]
Expand Down
17 changes: 11 additions & 6 deletions src/Uno.Toolkit.RuntimeTests/Tests/NavigationBarTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Uno.Disposables;
Expand Down Expand Up @@ -38,7 +39,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests
{
[TestClass]
[RunsOnUIThread]
internal partial class NavigationBarTests
public partial class NavigationBarTests
{
#if !(__ANDROID__ || __IOS__)
[TestMethod]
Expand Down Expand Up @@ -93,13 +94,12 @@ public async Task MainCommand_In_Popup_Without_Page(MainCommandMode mainCommandM
var popup = new Popup { Width = 100, Height = 100, HorizontalOffset = 100, VerticalOffset = 100, Child = new StackPanel { Children = { navigationBar } } };
var content = new StackPanel { Children = { popup } };

EventHandler<object> popupOpened = async (s, e) =>
var autoResetEvent = new AutoResetEvent(false);

EventHandler<object> popupOpened = (s, e) =>
{
Assert.IsTrue(navigationBar.TryPerformMainCommand() == shouldGoBack, "Unexpected result from TryPerformMainCommand");

await UnitTestsUIContentHelper.WaitForIdle();

Assert.IsTrue(popup.IsOpen == !shouldGoBack, "Popup is in an incorrect state");
autoResetEvent.Set();
};

try
Expand All @@ -108,6 +108,11 @@ public async Task MainCommand_In_Popup_Without_Page(MainCommandMode mainCommandM

popup.Opened += popupOpened;
popup.IsOpen = true;

autoResetEvent.WaitOne();
await UnitTestsUIContentHelper.WaitForIdle();

Assert.IsTrue(popup.IsOpen == !shouldGoBack, "Popup is in an incorrect state");
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests;

[TestClass]
[RunsOnUIThread]
internal class ResourceExtensionsTest
public class ResourceExtensionsTest
{
[TestMethod]
public async Task ResourcesProperty_StyleSetter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests;
// just to be clear, the tests is currently only running on WINUI_DESKTOP
#endif
[RunsOnUIThread]
internal class ResponsiveExtensionsTests
public class ResponsiveExtensionsTests
{
private static readonly Size NarrowSize = new Size(300, 400);
private static readonly Size WideSize = new Size(800, 400);
Expand Down Expand Up @@ -164,7 +164,7 @@ public async Task ProvideValue_Orientation_SizeChange()

[TestClass]
[RunsOnUIThread]
internal class DynamicResponsiveExtensionsTests
public class DynamicResponsiveExtensionsTests
{
private readonly static ResponsiveLayout DefaultLayout = ResponsiveLayout.Create(150, 300, 600, 800, 1080);

Expand Down
2 changes: 1 addition & 1 deletion src/Uno.Toolkit.RuntimeTests/Tests/ResponsiveViewTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests;

[TestClass]
[RunsOnUIThread]
internal class ResponsiveViewTests
public class ResponsiveViewTests
{
[TestMethod]
public async Task ResponsiveView_NarrowContent_TextBlock()
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.Toolkit.RuntimeTests/Tests/SafeAreaTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests
{
[TestClass]
[RunsOnUIThread]
internal partial class SafeAreaTests
public partial class SafeAreaTests
{
#if __ANDROID__
[TestMethod]
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.Toolkit.RuntimeTests/Tests/ShadowContainerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests
{
[TestClass]
[RunsOnUIThread]
internal partial class ShadowContainerTests
public partial class ShadowContainerTests
{

#if !(__ANDROID__ || __IOS__)
Expand Down
4 changes: 2 additions & 2 deletions src/Uno.Toolkit.RuntimeTests/Tests/TabBarTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests
{
[TestClass]
[RunsOnUIThread]
internal partial class TabBarTests // test cases
public partial class TabBarTests // test cases
{
[TestMethod]
public async Task TabBar1285_ICS_With_TBI_ItemTemplate()
Expand Down Expand Up @@ -553,7 +553,7 @@ public async Task Initial_Selection()
}
}

internal partial class TabBarTests // supporting classes/methods
public partial class TabBarTests // supporting classes/methods
{
private class SelectedIndexTestViewModel : INotifyPropertyChanged
{
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.Toolkit.RuntimeTests/Tests/ThemeInitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests
{
[TestClass]
[RunsOnUIThread]
internal class ThemeInitTests
public class ThemeInitTests
{
private const string DarkColor = "#FF544793";
private const string LightColor = "#FF5946D1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace Uno.Toolkit.RuntimeTests.Tests
#if false
[TestClass]
[RunsOnUIThread]
internal class ZoomContentControlTest
public class ZoomContentControlTest
{
[TestMethod]
public async Task When_ZoomIn_ShouldIncreaseZoomLevel()
Expand Down
Loading