mirror of https://github.com/ppy/osu
Ensure previous test score is cleaned up to allow visual test runs to work better
This commit is contained in:
parent
e901857610
commit
45d79c1a73
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue