Ensure previous test score is cleaned up to allow visual test runs to work better

This commit is contained in:
Dean Herbert 2022-04-12 18:01:29 +09:00
parent e901857610
commit 45d79c1a73
1 changed files with 12 additions and 1 deletions

View File

@ -26,6 +26,8 @@ namespace osu.Game.Tests.Visual.Gameplay
[TestFixture]
public class TestSceneReplayDownloadButton : OsuManualInputManagerTestScene
{
private const long online_score_id = 2553163309;
[Resolved]
private RulesetStore rulesets { get; set; }
@ -43,6 +45,15 @@ private void load()
beatmapManager.Import(TestResources.GetQuickTestBeatmapForImport()).WaitSafely();
}
[SetUpSteps]
public void SetUpSteps()
{
AddStep("delete previous imports", () =>
{
scoreManager.Delete(s => s.OnlineID == online_score_id);
});
}
[Test]
public void TestDisplayStates()
{
@ -180,7 +191,7 @@ private ScoreInfo getScoreInfo(bool replayAvailable)
{
return new APIScore
{
OnlineID = 2553163309,
OnlineID = online_score_id,
RulesetID = 0,
Beatmap = CreateAPIBeatmapSet(new OsuRuleset().RulesetInfo).Beatmaps.First(),
HasReplay = replayAvailable,