Skip to content

Commit fa2b417

Browse files
authored
use the secondPage Handler (#28250)
1 parent a730258 commit fa2b417

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Controls/tests/DeviceTests/Elements/Modal/ModalTests.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ public async Task PushingNavigationPageModallyWithShellShowsToolbarCorrectly()
187187
await CreateHandlerAndAddToWindow<IWindowHandler>(window,
188188
async (_) =>
189189
{
190-
await windowPage.Navigation.PushAsync(new ContentPage() { Title = "Second Page on PushingNavigationPageModallyWithShellShowsToolbarCorrectly" });
190+
var secondPage = new ContentPage() { Title = "Second Page on PushingNavigationPageModallyWithShellShowsToolbarCorrectly" };
191+
await windowPage.Navigation.PushAsync(secondPage);
191192
await windowPage.Navigation.PushModalAsync(modalPage);
192193

193194
// Navigation Bar is visible
@@ -203,8 +204,8 @@ await CreateHandlerAndAddToWindow<IWindowHandler>(window,
203204
// Remove the modal page and validate the root window pages toolbar is still setup correctly
204205
await modalPage.Navigation.PopModalAsync();
205206

206-
await AssertEventually(() => IsNavigationBarVisible(windowPage.Handler));
207-
await AssertEventually(() => IsBackButtonVisible(windowPage.Handler));
207+
await AssertEventually(() => IsNavigationBarVisible(secondPage.Handler));
208+
await AssertEventually(() => IsBackButtonVisible(secondPage.Handler));
208209
});
209210
}
210211

0 commit comments

Comments
 (0)