1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Add test for disabling user dim on storyboard

This commit is contained in:
iiSaLMaN 2019-08-08 15:59:29 +03:00
parent d5b26b86da
commit 537973fc45

View File

@ -149,10 +149,10 @@ namespace osu.Game.Tests.Visual.Background
}
/// <summary>
/// Check if the <see cref="UserDimContainer"/> is properly accepting user-defined visual changes at all.
/// Check if the <see cref="UserDimContainer"/> is properly accepting user-defined visual changes in background at all.
/// </summary>
[Test]
public void DisableUserDimTest()
public void DisableUserDimBackgroundTest()
{
performFullSetup();
waitForDim();
@ -165,6 +165,28 @@ namespace osu.Game.Tests.Visual.Background
AddAssert("Screen is dimmed and blur applied", () => songSelect.IsBackgroundDimmed() && songSelect.IsUserBlurApplied());
}
/// <summary>
/// Check if the <see cref="UserDimContainer"/> is properly accepting user-defined visual changes in storyboard at all.
/// </summary>
[Test]
public void DisableUserDimStoryboardTest()
{
performFullSetup();
createFakeStoryboard();
AddStep("Storyboard Enabled", () =>
{
player.ReplacesBackground.Value = true;
player.StoryboardEnabled.Value = true;
});
AddStep("EnableUserDim enabled", () => player.DimmableStoryboard.EnableUserDim.Value = true);
AddStep("Set dim level to 1", () => songSelect.DimLevel.Value = 1f);
waitForDim();
AddAssert("Storyboard is invisible", () => !player.IsStoryboardVisible);
AddStep("EnableUserDim disabled", () => player.DimmableStoryboard.EnableUserDim.Value = false);
waitForDim();
AddAssert("Storyboard is visible", () => player.IsStoryboardVisible);
}
/// <summary>
/// Check if the visual settings container retains dim and blur when pausing
/// </summary>