1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Create new test for StoryboardReplacesBackground

This commit is contained in:
David Zhao 2019-02-25 12:35:01 +09:00
parent 24f5bc7a75
commit af4606f3d2
2 changed files with 26 additions and 2 deletions

View File

@ -171,6 +171,31 @@ namespace osu.Game.Tests.Visual
AddAssert("Background is visible", () => songSelect.AssertVisible());
}
/// <summary>
/// When exiting player, the screen that it suspends/exits to needs to have a fully visible (Alpha == 1) background.
/// </summary>
[Test]
public void StoryboardTransitionTest()
{
performSetup();
AddStep("Enable storyboard", () =>
{
player.ReplacesBackground.Value = true;
player.StoryboardEnabled.Value = true;
});
AddUntilStep(() =>
{
if (!songSelect.IsCurrentScreen())
{
songSelect.MakeCurrent();
return false;
}
return true;
}, "Wait for song select is current");
AddWaitStep(5, "Wait for dim");
AddAssert("Background is visible", () => songSelect.AssertVisible());
}
/// <summary>
/// Check if the fade container is properly being reset when screen dim is disabled.
/// </summary>

View File

@ -178,6 +178,7 @@ namespace osu.Game.Screens.Play
{
RelativeSizeAxes = Axes.Both,
Alpha = 0,
EnableUserDim = { Value = true }
},
new ScalingContainer(ScalingMode.Gameplay)
{
@ -239,8 +240,6 @@ namespace osu.Game.Screens.Play
if (ShowStoryboard.Value)
initializeStoryboard(false);
storyboardContainer.EnableUserDim.Value = true;
// Bind ScoreProcessor to ourselves
ScoreProcessor.AllJudged += onCompletion;
ScoreProcessor.Failed += onFail;