mirror of
https://github.com/ppy/osu
synced 2025-03-05 02:49:30 +00:00
Add test coverage for skin background source
This commit is contained in:
parent
5bf4dd6358
commit
d86ace4d11
@ -35,7 +35,7 @@ namespace osu.Game.Tests.Visual.Background
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestTogglingStoryboardSwitchesBackgroundType()
|
public void TestBackgroundTypeSwitch()
|
||||||
{
|
{
|
||||||
setSupporter(true);
|
setSupporter(true);
|
||||||
|
|
||||||
@ -44,6 +44,9 @@ namespace osu.Game.Tests.Visual.Background
|
|||||||
|
|
||||||
setSourceMode(BackgroundSource.BeatmapWithStoryboard);
|
setSourceMode(BackgroundSource.BeatmapWithStoryboard);
|
||||||
AddUntilStep("is storyboard background", () => getCurrentBackground() is BeatmapBackgroundWithStoryboard);
|
AddUntilStep("is storyboard background", () => getCurrentBackground() is BeatmapBackgroundWithStoryboard);
|
||||||
|
|
||||||
|
setSourceMode(BackgroundSource.Skin);
|
||||||
|
AddUntilStep("is skin background", () => getCurrentBackground() is SkinBackground);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -78,7 +81,7 @@ namespace osu.Game.Tests.Visual.Background
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setSourceMode(BackgroundSource source) =>
|
private void setSourceMode(BackgroundSource source) =>
|
||||||
AddStep("set background mode to beatmap", () => config.SetValue(OsuSetting.MenuBackgroundSource, source));
|
AddStep($"set background mode to {source}", () => config.SetValue(OsuSetting.MenuBackgroundSource, source));
|
||||||
|
|
||||||
private void setSupporter(bool isSupporter) =>
|
private void setSupporter(bool isSupporter) =>
|
||||||
AddStep($"set supporter {isSupporter}", () => ((DummyAPIAccess)API).LocalUser.Value = new User
|
AddStep($"set supporter {isSupporter}", () => ((DummyAPIAccess)API).LocalUser.Value = new User
|
||||||
|
Loading…
Reference in New Issue
Block a user