1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-15 10:32:50 +08:00
Files
osu-lazer/osu.Game.Tests/Visual/UserInterface/TestSceneMissingBeatmapNotification.cs
T
Bartłomiej Dach c52dce0f38 Fix presenting score potentially dying due to deleted beatmap
- Closes https://github.com/ppy/osu/issues/27168
- Closes https://github.com/ppy/osu/issues/32930

It's a little manual (if you perform any of the scenarios in the issues
above on this branch, the first click will re-import the beatmap but not
start the replay, and only the second will play it), but maybe fine?
2025-04-24 08:47:08 +02:00

35 lines
1.1 KiB
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Database;
using osu.Game.Overlays;
using osu.Game.Tests.Scores.IO;
namespace osu.Game.Tests.Visual.UserInterface
{
[TestFixture]
public partial class TestSceneMissingBeatmapNotification : OsuTestScene
{
[Cached]
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
[BackgroundDependencyLoader]
private void load()
{
Child = new Container
{
Width = 280,
AutoSizeAxes = Axes.Y,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Child = new MissingBeatmapNotification(CreateAPIBeatmapSet(Ruleset.Value).Beatmaps.First(), "deadbeef", new ImportScoreTest.TestArchiveReader())
};
}
}
}