1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-12 04:12:56 +08:00

Fix tests

This commit is contained in:
Bartłomiej Dach 2021-12-17 11:44:36 +01:00
parent c6d0b5d200
commit 883fcf2604
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -255,6 +255,12 @@ namespace osu.Game.Tests.Visual.Beatmaps
createTestCase(beatmapSetInfo => new BeatmapCard(beatmapSetInfo));
}
[Test]
public void TestExtra()
{
createTestCase(beatmapSetInfo => new BeatmapCardExtra(beatmapSetInfo));
}
[Test]
public void TestHoverState()
{
@ -280,19 +286,5 @@ namespace osu.Game.Tests.Visual.Beatmaps
BeatmapCard firstCard() => this.ChildrenOfType<BeatmapCard>().First();
}
[Test]
public void TestExtra()
{
createTestCase(beatmapSetInfo => new BeatmapCardExtra(beatmapSetInfo));
AddToggleStep("toggle expanded state", expanded =>
{
var card = this.ChildrenOfType<BeatmapCardExtra>().Last();
if (!card.Expanded.Disabled)
card.Expanded.Value = expanded;
});
AddToggleStep("disable/enable expansion", disabled => this.ChildrenOfType<BeatmapCardExtra>().ForEach(card => card.Expanded.Disabled = disabled));
}
}
}