1
0
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:
Dean Herbert
2025-08-26 18:40:52 +09:00
Unverified
parent 4d851f2527
commit 2ccb65aa65
2 changed files with 11 additions and 1 deletions
@@ -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()
{
+3 -1
View File
@@ -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();