1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-19 05:52:55 +08:00

Fix ClickableText test case

This commit is contained in:
HoutarouOreki 2018-07-22 09:31:51 +02:00
parent 2982fe3587
commit 2ea5a97784

View File

@ -10,13 +10,17 @@ namespace osu.Game.Tests.Visual
{
public class TestCaseClickableText : OsuTestCase
{
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(ClickableText) };
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(ClickableText), typeof(FillFlowContainer) };
public TestCaseClickableText()
{
ClickableText text;
AddRange(new[] {
Add(new FillFlowContainer<ClickableText>
{
Direction = FillDirection.Vertical,
Children = new[]
{
new ClickableText{ Text = "Default", },
new ClickableText{ IsEnabled = false, Text = "Disabled", },
new ClickableText{ Text = "Without sounds", IsMuted = true, },
@ -24,6 +28,7 @@ namespace osu.Game.Tests.Visual
new ClickableText{ Text = "Without hover sounds", IsHoverMuted = true, },
text = new ClickableText{ Text = "Disables after click (Action)", },
new ClickableText{ Text = "Has tooltip", TooltipText = "Yep", }
}
});
text.Action = () => text.IsEnabled = false;
}