Fix JudgementCounterDisplay.cs max judgement always showing upon changing display mode

This commit is contained in:
mk56-spn
2023-01-19 10:31:02 +01:00
parent c6dfbab702
commit b22363ed8c
2 changed files with 27 additions and 7 deletions

View File

@ -136,6 +136,17 @@ namespace osu.Game.Tests.Visual.Gameplay
AddAssert("Check max hidden", () => counterDisplay.CounterFlow.ChildrenOfType<JudgementCounter>().First().Alpha == 0);
}
[Test]
public void TestMaxValueHiddenOnModeChange()
{
AddStep("create counter", () => Child = counterDisplay = new TestJudgementCounterDisplay());
AddStep("Set max judgement to hide itself", () => counterDisplay.ShowMaxJudgement.Value = false);
AddStep("Show all judgements", () => counterDisplay.Mode.Value = JudgementCounterDisplay.DisplayMode.All);
AddWaitStep("wait some", 2);
AddAssert("Assert max judgement hidden", () => counterDisplay.CounterFlow.ChildrenOfType<JudgementCounter>().First().Alpha == 0);
}
[Test]
public void TestCycleDisplayModes()
{