mirror of
https://github.com/osukey/osukey.git
synced 2025-05-07 06:37:18 +09:00
Ensure notification is displayed after first-run setup is hidden
This commit is contained in:
parent
026bad7fc4
commit
387c54c252
@ -24,7 +24,17 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
public void TestImportantNotificationDoesntInterruptSetup()
|
public void TestImportantNotificationDoesntInterruptSetup()
|
||||||
{
|
{
|
||||||
AddStep("post important notification", () => Game.Notifications.Post(new SimpleNotification { Text = "Important notification" }));
|
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);
|
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);
|
protected override TestOsuGame CreateTestGame() => new FirstRunGame(LocalStorage, API);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user