mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 18:52:55 +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;
|
IncompatibilityDisplayingModPanel panel = null;
|
||||||
|
|
||||||
AddStep("create panel with DT", () => Child = panel = new IncompatibilityDisplayingModPanel(new OsuModDoubleTime())
|
AddStep("create panel with DT", () =>
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Child = panel = new IncompatibilityDisplayingModPanel(new OsuModDoubleTime())
|
||||||
Origin = Anchor.Centre,
|
{
|
||||||
RelativeSizeAxes = Axes.None,
|
Anchor = Anchor.Centre,
|
||||||
Width = 300
|
Origin = Anchor.Centre,
|
||||||
|
RelativeSizeAxes = Axes.None,
|
||||||
|
Width = 300,
|
||||||
|
};
|
||||||
|
|
||||||
|
panel.Active.BindValueChanged(active =>
|
||||||
|
{
|
||||||
|
SelectedMods.Value = active.NewValue
|
||||||
|
? Array.Empty<Mod>()
|
||||||
|
: new[] { panel.Mod };
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
clickPanel();
|
clickPanel();
|
||||||
@ -63,11 +73,6 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
AddStep("set incompatible mod", () => SelectedMods.Value = new[] { new OsuModHalfTime() });
|
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();
|
clickPanel();
|
||||||
AddAssert("panel active", () => panel.Active.Value);
|
AddAssert("panel active", () => panel.Active.Value);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user