mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Apply review suggestions
This commit is contained in:
@ -24,6 +24,11 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
Add(osd);
|
||||
|
||||
AddStep("Display empty osd toast", () => osd.Display(new EmptyToast()));
|
||||
AddAssert("Toast width is 240", () => osd.Child.Width == 240);
|
||||
|
||||
AddStep("Display toast with lengthy text", () => osd.Display(new LengthyToast()));
|
||||
AddAssert("Toast width is greater than 240", () => osd.Child.Width > 240);
|
||||
|
||||
AddRepeatStep("Change toggle (no bind)", () => config.ToggleSetting(TestConfigSetting.ToggleSettingNoKeybind), 2);
|
||||
AddRepeatStep("Change toggle (with bind)", () => config.ToggleSetting(TestConfigSetting.ToggleSettingWithKeybind), 2);
|
||||
AddRepeatStep("Change enum (no bind)", () => config.IncrementEnumSetting(TestConfigSetting.EnumSettingNoKeybind), 3);
|
||||
@ -96,6 +101,15 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
}
|
||||
}
|
||||
|
||||
private class LengthyToast : Toast
|
||||
{
|
||||
public LengthyToast()
|
||||
: base("Toast with a very very very long text", "A very very very very very very long text also", "A very very very very very long shortcut")
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private class TestOnScreenDisplay : OnScreenDisplay
|
||||
{
|
||||
protected override void DisplayTemporarily(Drawable toDisplay) => toDisplay.FadeIn().ResizeHeightTo(110);
|
||||
|
Reference in New Issue
Block a user