mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:52:57 +08:00
Add failing test case
This commit is contained in:
parent
7654df94f6
commit
505dc15e03
@ -65,6 +65,21 @@ namespace osu.Game.Tests.Visual.Background
|
||||
stack.Push(songSelect = new DummySongSelect());
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// User settings should always be ignored on song select screen.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestUserSettingsIgnoredOnSongSelect()
|
||||
{
|
||||
setupUserSettings();
|
||||
AddAssert("Screen is undimmed", () => songSelect.IsBackgroundUndimmed());
|
||||
AddAssert("Screen using background blur", () => songSelect.IsBackgroundBlur());
|
||||
performFullSetup();
|
||||
AddStep("Exit to song select", () => player.Exit());
|
||||
AddUntilStep("Screen is undimmed", () => songSelect.IsBackgroundUndimmed());
|
||||
AddUntilStep("Screen using background blur", () => songSelect.IsBackgroundBlur());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if <see cref="PlayerLoader"/> properly triggers the visual settings preview when a user hovers over the visual settings panel.
|
||||
/// </summary>
|
||||
@ -227,17 +242,6 @@ namespace osu.Game.Tests.Visual.Background
|
||||
songSelect.IsBackgroundUndimmed() && songSelect.IsBackgroundCurrent() && songSelect.CheckBackgroundBlur(results.ExpectedBackgroundBlur));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if background gets undimmed and unblurred when leaving <see cref="Player"/> for <see cref="PlaySongSelect"/>
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestTransitionOut()
|
||||
{
|
||||
performFullSetup();
|
||||
AddStep("Exit to song select", () => player.Exit());
|
||||
AddUntilStep("Screen is undimmed and user blur removed", () => songSelect.IsBackgroundUndimmed() && songSelect.IsBlurCorrect());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if hovering on the visual settings dialogue after resuming from player still previews the background dim.
|
||||
/// </summary>
|
||||
@ -333,7 +337,7 @@ namespace osu.Game.Tests.Visual.Background
|
||||
|
||||
public bool IsBackgroundVisible() => background.CurrentAlpha == 1;
|
||||
|
||||
public bool IsBlurCorrect() => background.CurrentBlur == new Vector2(BACKGROUND_BLUR);
|
||||
public bool IsBackgroundBlur() => background.CurrentBlur == new Vector2(BACKGROUND_BLUR);
|
||||
|
||||
public bool CheckBackgroundBlur(Vector2 expected) => background.CurrentBlur == expected;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user