mirror of
https://github.com/ppy/osu.git
synced 2024-11-07 10:17:43 +08:00
cleanup test logic
This commit is contained in:
parent
a61f8cc2c3
commit
12fb17572c
@ -148,6 +148,20 @@ namespace osu.Game.Tests.Visual.Background
|
||||
AddAssert("Background is visible", () => songSelect.IsBackgroundVisible());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensure <see cref="UserDimContainer"/> is able to disable user-defined display settings.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void DisableUserDisplaySettingsTest()
|
||||
{
|
||||
performFullSetup();
|
||||
AddStep("Enable user dim", () => player.DimmableStoryboard.EnableUserDim.Value = true);
|
||||
waitForDim();
|
||||
AddStep("Turn on IgnoreUserSettings", () => player.DimmableStoryboard.IgnoreUserSettings.Value = true);
|
||||
waitForDim();
|
||||
AddAssert("Check the background is undimmed", () => player.IsBackgroundUndimmed());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensure <see cref="UserDimContainer"/> is properly accepting user-defined visual changes for a background.
|
||||
/// </summary>
|
||||
@ -165,20 +179,6 @@ namespace osu.Game.Tests.Visual.Background
|
||||
AddAssert("Screen is dimmed and blur applied", () => songSelect.IsBackgroundDimmed() && songSelect.IsUserBlurApplied());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensure <see cref="UserDimContainer"/> is able to disable user-defined display settings.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void DisableUserDisplaySettingsTest()
|
||||
{
|
||||
performFullSetup();
|
||||
AddStep("Enable user dim", () => player.DimmableStoryboard.EnableUserDim.Value = true);
|
||||
waitForDim();
|
||||
AddStep("Turn on IgnoreUserSettings", () => player.DimmableStoryboard.IgnoreUserSettings.Value = true);
|
||||
waitForDim();
|
||||
AddAssert("Check the background is undimmed", () => player.IsBackgroundUndimmed());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensure <see cref="UserDimContainer"/> is properly accepting user-defined visual changes for a storyboard.
|
||||
/// </summary>
|
||||
@ -367,7 +367,7 @@ namespace osu.Game.Tests.Visual.Background
|
||||
|
||||
public new DimmableStoryboard DimmableStoryboard => base.DimmableStoryboard;
|
||||
|
||||
public bool IsBackgroundUndimmed() => ((FadeAccessibleBackground)Background).Colour == Color4.White;
|
||||
public bool IsBackgroundUndimmed() => ((FadeAccessibleBackground)Background).CurrentColour == Color4.White;
|
||||
|
||||
// Whether or not the player should be allowed to load.
|
||||
public bool BlockLoad;
|
||||
|
Loading…
Reference in New Issue
Block a user