mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 09:20:02 +09:00
add initial test
This commit is contained in:
@ -35,6 +35,8 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
private TestPlayerLoaderContainer container;
|
||||
private TestPlayer player;
|
||||
|
||||
private bool EpilepsyWarning = false;
|
||||
|
||||
[Resolved]
|
||||
private AudioManager audioManager { get; set; }
|
||||
|
||||
@ -55,6 +57,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
beforeLoadAction?.Invoke();
|
||||
Beatmap.Value = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
|
||||
Beatmap.Value.BeatmapInfo.EpilepsyWarning = EpilepsyWarning;
|
||||
|
||||
foreach (var mod in SelectedMods.Value.OfType<IApplicableToTrack>())
|
||||
mod.ApplyToTrack(Beatmap.Value.Track);
|
||||
@ -240,6 +243,15 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
AddUntilStep("wait for player load", () => player.IsLoaded);
|
||||
}
|
||||
|
||||
[TestCase(true)]
|
||||
[TestCase(false)]
|
||||
public void TestEpilepsyWarning(bool warning)
|
||||
{
|
||||
AddStep("change epilepsy warning", () => EpilepsyWarning = warning);
|
||||
AddStep("load dummy beatmap", () => ResetPlayer(false));
|
||||
AddUntilStep("wait for current", () => loader.IsCurrentScreen());
|
||||
}
|
||||
|
||||
private class TestPlayerLoaderContainer : Container
|
||||
{
|
||||
[Cached]
|
||||
|
Reference in New Issue
Block a user