Fix incorrect count tracking when notification is manually disposed

This commit is contained in:
Dean Herbert
2022-09-05 19:20:01 +09:00
parent 229e1a8ef7
commit 0514c96191
2 changed files with 25 additions and 1 deletions

View File

@ -57,6 +57,19 @@ namespace osu.Game.Tests.Visual.UserInterface
AddUntilStep("wait overlay not present", () => !notificationOverlay.IsPresent);
}
[Test]
public void TestPresenceWithManualDismiss()
{
AddAssert("tray not present", () => !notificationOverlay.ChildrenOfType<NotificationOverlayToastTray>().Single().IsPresent);
AddAssert("overlay not present", () => !notificationOverlay.IsPresent);
AddStep(@"post notification", sendBackgroundNotification);
AddStep("click notification", () => notificationOverlay.ChildrenOfType<Notification>().Single().TriggerClick());
AddUntilStep("wait tray not present", () => !notificationOverlay.ChildrenOfType<NotificationOverlayToastTray>().Single().IsPresent);
AddUntilStep("wait overlay not present", () => !notificationOverlay.IsPresent);
}
[Test]
public void TestCompleteProgress()
{