Skip to content

Commit

Permalink
tests: add runtime test
Browse files Browse the repository at this point in the history
  • Loading branch information
kazo0 committed Oct 28, 2023
1 parent 2e70770 commit e4d3412
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/Uno.Toolkit.RuntimeTests/Tests/NavigationBarTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,32 @@ public async Task NavigationBar_Renders_With_Invalid_AppBarButton_IconElement(Ty
AssertNavigationBar(frame);
}

[TestMethod]
[RequiresFullWindow]
public async Task Can_Navigate_Forward_And_Backwards()
{
var frame = new Frame() { Width = 400, Height = 400 };
var content = new Grid { Children = { frame } };

await UnitTestUIContentHelperEx.SetContentAndWait(content);

await UnitTestsUIContentHelper.WaitForIdle();

var firstNavBar = await frame.NavigateAndGetNavBar<NavBarFirstPage>();

await UnitTestsUIContentHelper.WaitForLoaded(firstNavBar!);

var secondNavBar = await frame.NavigateAndGetNavBar<NavBarSecondPage>();

await UnitTestsUIContentHelper.WaitForLoaded(secondNavBar!);

await Task.Delay(1000);

frame.GoBack();

await UnitTestsUIContentHelper.WaitForLoaded(firstNavBar!);
}


#if __ANDROID__
private static void AssertNavigationBar(Frame frame)
Expand Down

0 comments on commit e4d3412

Please sign in to comment.