1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-17 22:17:25 +08:00

Ensure notification is displayed after first-run setup is hidden

This commit is contained in:
Salman Ahmed 2022-06-15 18:11:46 +03:00
parent 026bad7fc4
commit 387c54c252

View File

@ -24,7 +24,17 @@ namespace osu.Game.Tests.Visual.Navigation
public void TestImportantNotificationDoesntInterruptSetup()
{
AddStep("post important notification", () => Game.Notifications.Post(new SimpleNotification { Text = "Important notification" }));
AddAssert("no notification posted", () => Game.Notifications.UnreadCount.Value == 0);
AddAssert("first-run setup still visible", () => Game.FirstRunOverlay.State.Value == Visibility.Visible);
AddUntilStep("finish first-run setup", () =>
{
Game.FirstRunOverlay.NextButton.TriggerClick();
return Game.FirstRunOverlay.State.Value == Visibility.Hidden;
});
AddWaitStep("wait for post delay", 5);
AddAssert("notifications shown", () => Game.Notifications.State.Value == Visibility.Visible);
AddAssert("notification posted", () => Game.Notifications.UnreadCount.Value == 1);
}
protected override TestOsuGame CreateTestGame() => new FirstRunGame(LocalStorage, API);