mirror of
https://github.com/ppy/osu.git
synced 2026-06-01 06:19:54 +08:00
Add test coverage and fix one more fail case
This commit is contained in:
@@ -24,6 +24,14 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
protected TestReplayPlayer Player = null!;
|
||||
|
||||
[Test]
|
||||
public void TestFailedBeatmapLoad()
|
||||
{
|
||||
loadPlayerWithBeatmap(new TestBeatmap(new OsuRuleset().RulesetInfo, withHitObjects: false));
|
||||
|
||||
AddUntilStep("wait for exit", () => Player.IsCurrentScreen());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestPauseViaSpace()
|
||||
{
|
||||
|
||||
@@ -32,7 +32,9 @@ namespace osu.Game.Screens.Play
|
||||
[Cached(typeof(IGameplayLeaderboardProvider))]
|
||||
private readonly SoloGameplayLeaderboardProvider leaderboardProvider = new SoloGameplayLeaderboardProvider();
|
||||
|
||||
protected override UserActivity? InitialActivity => new UserActivity.WatchingReplay(Score.ScoreInfo);
|
||||
protected override UserActivity? InitialActivity =>
|
||||
// score may be null if LoadedBeatmapSuccessfully is false.
|
||||
Score == null ? null : new UserActivity.WatchingReplay(Score.ScoreInfo);
|
||||
|
||||
private bool isAutoplayPlayback => GameplayState.Mods.OfType<ModAutoplay>().Any();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user