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]
|
[TestFixture]
|
||||||
public class TestSceneReplayDownloadButton : OsuManualInputManagerTestScene
|
public class TestSceneReplayDownloadButton : OsuManualInputManagerTestScene
|
||||||
{
|
{
|
||||||
|
private const long online_score_id = 2553163309;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private RulesetStore rulesets { get; set; }
|
private RulesetStore rulesets { get; set; }
|
||||||
|
|
||||||
|
@ -43,6 +45,15 @@ private void load()
|
||||||
beatmapManager.Import(TestResources.GetQuickTestBeatmapForImport()).WaitSafely();
|
beatmapManager.Import(TestResources.GetQuickTestBeatmapForImport()).WaitSafely();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SetUpSteps]
|
||||||
|
public void SetUpSteps()
|
||||||
|
{
|
||||||
|
AddStep("delete previous imports", () =>
|
||||||
|
{
|
||||||
|
scoreManager.Delete(s => s.OnlineID == online_score_id);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestDisplayStates()
|
public void TestDisplayStates()
|
||||||
{
|
{
|
||||||
|
@ -180,7 +191,7 @@ private ScoreInfo getScoreInfo(bool replayAvailable)
|
||||||
{
|
{
|
||||||
return new APIScore
|
return new APIScore
|
||||||
{
|
{
|
||||||
OnlineID = 2553163309,
|
OnlineID = online_score_id,
|
||||||
RulesetID = 0,
|
RulesetID = 0,
|
||||||
Beatmap = CreateAPIBeatmapSet(new OsuRuleset().RulesetInfo).Beatmaps.First(),
|
Beatmap = CreateAPIBeatmapSet(new OsuRuleset().RulesetInfo).Beatmaps.First(),
|
||||||
HasReplay = replayAvailable,
|
HasReplay = replayAvailable,
|
||||||
|
|
Loading…
Reference in New Issue