public async Task EnsureOnAppearingFiresForPushedPage() { Shell shell = new TestShell(); shell.Items.Add(CreateShellItem()); shell.Navigation.PushAsync(new LifeCyclePage()); var page = (LifeCyclePage)shell.GetVisiblePage(); Assert.IsTrue(page.Appearing); Assert.IsTrue(page.ParentSet); }
public async Task EnsureOnAppearingFiresForNavigatedToPage() { Shell shell = new TestShell(); shell.Items.Add(CreateShellItem()); await shell.GoToAsync("LifeCyclePage"); var page = (LifeCyclePage)shell.GetVisiblePage(); Assert.IsTrue(page.Appearing); Assert.IsTrue(page.ParentSet); }
public async Task EnsureOnAppearingFiresForLastPageOnly() { Shell shell = new TestShell(); LifeCyclePage shellContentPage = new LifeCyclePage(); shell.Items.Add(CreateShellItem(page: shellContentPage)); await shell.GoToAsync("LifeCyclePage/LifeCyclePage"); var page = (LifeCyclePage)shell.GetVisiblePage(); var nonVisiblePage = (LifeCyclePage)shell.Navigation.NavigationStack[1]; Assert.IsFalse(nonVisiblePage.Appearing); Assert.IsTrue(page.Appearing); }