Skip to content

Commit 8bb2d8c

Browse files
committed
fix: adapt visibility check
1 parent 40408fa commit 8bb2d8c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

testing/TestHarness/TestHarness.UITest/Ext/Navigation/TabBar/Given_TabBar_ClearBackStack.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,9 @@ public async Task When_ContentDialog_Open_And_Navigate_Root()
149149
// The dialog should be dismissed and we should be at the tabbed root
150150
AssertBackAtTabbedRoot();
151151

152-
// Verify the dialog is actually dismissed (not just hidden behind the root page)
153-
var isDialogContentVisible = App.Marked("DialogContentText").IsVisible();
154-
isDialogContentVisible.Should().Be(false, "Dialog content should no longer be visible after navigating to root");
155-
var isDialogButtonVisible = App.Marked("DialogNavToRootButton").IsVisible();
156-
isDialogButtonVisible.Should().Be(false, "Dialog button should no longer be visible after navigating to root");
152+
// Verify the dialog is actually dismissed (not just hidden behind the root page).
153+
// Use WaitForNoElement to allow time for the dialog overlay to be removed.
154+
App.WaitForNoElement("DialogContentText", "ContentDialog content should be dismissed after navigating to root");
155+
App.WaitForNoElement("DialogNavToRootButton", "ContentDialog button should be dismissed after navigating to root");
157156
}
158157
}

0 commit comments

Comments
 (0)