Fix test scene not resetting mouse position

Also fixes until step flipped.
This commit is contained in:
Salman Ahmed
2022-09-21 03:03:34 +03:00
parent dcfb6a2f06
commit 29fa868fde

View File

@ -34,6 +34,8 @@ namespace osu.Game.Tests.Visual.UserInterface
[SetUp] [SetUp]
public void SetUp() => Schedule(() => public void SetUp() => Schedule(() =>
{ {
InputManager.MoveMouseTo(Vector2.Zero);
TimeToCompleteProgress = 2000; TimeToCompleteProgress = 2000;
progressingNotifications.Clear(); progressingNotifications.Clear();
@ -326,7 +328,7 @@ namespace osu.Game.Tests.Visual.UserInterface
{ {
SimpleNotification notification = null!; SimpleNotification notification = null!;
AddStep(@"post", () => notificationOverlay.Post(notification = new BackgroundNotification { Text = @"Welcome to osu!. Enjoy your stay!" })); AddStep(@"post", () => notificationOverlay.Post(notification = new BackgroundNotification { Text = @"Welcome to osu!. Enjoy your stay!" }));
AddUntilStep("check is toast", () => !notification.IsInToastTray); AddUntilStep("check is toast", () => notification.IsInToastTray);
AddAssert("light is not visible", () => notification.ChildrenOfType<Notification.NotificationLight>().Single().Alpha == 0); AddAssert("light is not visible", () => notification.ChildrenOfType<Notification.NotificationLight>().Single().Alpha == 0);
AddUntilStep("wait for forward to overlay", () => !notification.IsInToastTray); AddUntilStep("wait for forward to overlay", () => !notification.IsInToastTray);