Skip to content

Commit

Permalink
Disable TitleViewSetOnShellWorksAfterNavigation (#25125)
Browse files Browse the repository at this point in the history
  • Loading branch information
PureWeen committed Nov 4, 2024
1 parent 96056b8 commit 8626bdc
Showing 1 changed file with 0 additions and 67 deletions.
67 changes: 0 additions & 67 deletions src/Controls/tests/DeviceTests/Elements/Shell/ShellTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -595,73 +595,6 @@ bool viewIsTitleView(IView view)
});
}

[Fact(DisplayName = "TitleView Set On Shell Works After Navigation")]
public async Task TitleViewSetOnShellWorksAfterNavigation()
{
SetupBuilder();

var page1 = new ContentPage();
var page2 = new ContentPage();
var page3 = new ContentPage();

var shellTitleView = new Editor();

var shell = await CreateShellAsync((shell) =>
{
Shell.SetTitleView(shell, shellTitleView);
shell.Items.Add(new TabBar()
{
Items =
{
new ShellContent()
{
Route = "Item1",
Content = page1
},
new ShellContent()
{
Route = "Item2",
Content = page2
},
}
});
});

await CreateHandlerAndAddToWindow<ShellHandler>(shell, async (handler) =>
{
await OnLoadedAsync(page1);
await AssertEventually(WaitCondition);

await shell.GoToAsync("//Item2");
await AssertEventually(WaitCondition);

await shell.GoToAsync("//Item1");
await AssertEventually(WaitCondition);

await shell.GoToAsync("//Item2");
await AssertEventually(WaitCondition);

await shell.Navigation.PushAsync(page3);
await AssertEventually(WaitCondition);

await shell.Navigation.PopAsync();
await AssertEventually(WaitCondition);

bool WaitCondition()
{
if (shellTitleView.Handler == null)
return false;

var titleView = GetTitleView(handler);

if (titleView == null)
return false;

return shellTitleView.ToPlatform() == titleView;
}
});
}

[Fact(DisplayName = "Handlers not recreated when changing tabs")]
public async Task HandlersNotRecreatedWhenChangingTabs()
{
Expand Down

0 comments on commit 8626bdc

Please sign in to comment.