mirror of
https://github.com/osukey/osukey.git
synced 2025-05-18 03:57:32 +09:00
Move fading test to top for convenience
This commit is contained in:
parent
5a78e74470
commit
1c72afe8c4
@ -25,6 +25,21 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
AddUntilStep("layer is visible", () => layer.IsPresent);
|
AddUntilStep("layer is visible", () => layer.IsPresent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestLayerFading()
|
||||||
|
{
|
||||||
|
AddSliderStep("current health", 0.0, 1.0, 1.0, val =>
|
||||||
|
{
|
||||||
|
if (layer != null)
|
||||||
|
layer.Current.Value = val;
|
||||||
|
});
|
||||||
|
|
||||||
|
AddStep("set health to 0.10", () => layer.Current.Value = 0.1);
|
||||||
|
AddUntilStep("layer fade is visible", () => layer.Child.Alpha > 0.1f);
|
||||||
|
AddStep("set health to 1", () => layer.Current.Value = 1f);
|
||||||
|
AddUntilStep("layer fade is invisible", () => !layer.Child.IsPresent);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestLayerDisabledViaConfig()
|
public void TestLayerDisabledViaConfig()
|
||||||
{
|
{
|
||||||
@ -46,20 +61,5 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
AddWaitStep("wait for potential fade", 10);
|
AddWaitStep("wait for potential fade", 10);
|
||||||
AddAssert("layer is still visible", () => layer.IsPresent);
|
AddAssert("layer is still visible", () => layer.IsPresent);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void TestLayerFading()
|
|
||||||
{
|
|
||||||
AddSliderStep("current health", 0.0, 1.0, 1.0, val =>
|
|
||||||
{
|
|
||||||
if (layer != null)
|
|
||||||
layer.Current.Value = val;
|
|
||||||
});
|
|
||||||
|
|
||||||
AddStep("set health to 0.10", () => layer.Current.Value = 0.1);
|
|
||||||
AddUntilStep("layer fade is visible", () => layer.Child.Alpha > 0.1f);
|
|
||||||
AddStep("set health to 1", () => layer.Current.Value = 1f);
|
|
||||||
AddUntilStep("layer fade is invisible", () => !layer.Child.IsPresent);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user