mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:03:13 +08:00
Update TestIncompatibilityDisplay
in line with new functionality
This commit is contained in:
parent
cd898344cb
commit
14e17c8b7b
@ -47,12 +47,22 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
{
|
||||
IncompatibilityDisplayingModPanel panel = null;
|
||||
|
||||
AddStep("create panel with DT", () => Child = panel = new IncompatibilityDisplayingModPanel(new OsuModDoubleTime())
|
||||
AddStep("create panel with DT", () =>
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.None,
|
||||
Width = 300
|
||||
Child = panel = new IncompatibilityDisplayingModPanel(new OsuModDoubleTime())
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.None,
|
||||
Width = 300,
|
||||
};
|
||||
|
||||
panel.Active.BindValueChanged(active =>
|
||||
{
|
||||
SelectedMods.Value = active.NewValue
|
||||
? Array.Empty<Mod>()
|
||||
: new[] { panel.Mod };
|
||||
});
|
||||
});
|
||||
|
||||
clickPanel();
|
||||
@ -63,11 +73,6 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
AddStep("set incompatible mod", () => SelectedMods.Value = new[] { new OsuModHalfTime() });
|
||||
|
||||
clickPanel();
|
||||
AddAssert("panel not active", () => !panel.Active.Value);
|
||||
|
||||
AddStep("reset mods", () => SelectedMods.Value = Array.Empty<Mod>());
|
||||
|
||||
clickPanel();
|
||||
AddAssert("panel active", () => panel.Active.Value);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user