mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 00:09:55 +09:00
Create subclass for "Error" notifications to allow them to have a unique pop-in sound
This commit is contained in:
@ -105,6 +105,15 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
checkDisplayedCount(3);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestError()
|
||||
{
|
||||
setState(Visibility.Visible);
|
||||
AddStep(@"error #1", sendErrorNotification);
|
||||
AddAssert("Is visible", () => notificationOverlay.State.Value == Visibility.Visible);
|
||||
checkDisplayedCount(1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestSpam()
|
||||
{
|
||||
@ -179,7 +188,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
private void sendBarrage()
|
||||
{
|
||||
switch (RNG.Next(0, 4))
|
||||
switch (RNG.Next(0, 5))
|
||||
{
|
||||
case 0:
|
||||
sendHelloNotification();
|
||||
@ -196,6 +205,10 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
case 3:
|
||||
sendDownloadProgress();
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sendErrorNotification();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,6 +227,11 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
notificationOverlay.Post(new BackgroundNotification { Text = @"Welcome to osu!. Enjoy your stay!" });
|
||||
}
|
||||
|
||||
private void sendErrorNotification()
|
||||
{
|
||||
notificationOverlay.Post(new SimpleErrorNotification { Text = @"Rut roh!. Something went wrong!" });
|
||||
}
|
||||
|
||||
private void sendManyNotifications()
|
||||
{
|
||||
for (int i = 0; i < 10; i++)
|
||||
|
Reference in New Issue
Block a user