mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Add visual test cases
This commit is contained in:
parent
b78c6ed673
commit
b0da0859d8
@ -154,6 +154,19 @@ namespace osu.Game.Tests.Visual.Online
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestUnrankedPP()
|
||||
{
|
||||
AddStep("Load scores with unranked PP", () =>
|
||||
{
|
||||
var allScores = createScores();
|
||||
allScores.Scores[0].Ranked = false;
|
||||
allScores.UserScore = createUserBest();
|
||||
allScores.UserScore.Score.Ranked = false;
|
||||
scoresContainer.Scores = allScores;
|
||||
});
|
||||
}
|
||||
|
||||
private ulong onlineID = 1;
|
||||
|
||||
private APIScoresCollection createScores()
|
||||
@ -184,6 +197,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
MaxCombo = 1234,
|
||||
TotalScore = 1234567890,
|
||||
Accuracy = 1,
|
||||
Ranked = true,
|
||||
},
|
||||
new SoloScoreInfo
|
||||
{
|
||||
@ -206,6 +220,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
MaxCombo = 1234,
|
||||
TotalScore = 1234789,
|
||||
Accuracy = 0.9997,
|
||||
Ranked = true,
|
||||
},
|
||||
new SoloScoreInfo
|
||||
{
|
||||
@ -227,6 +242,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
MaxCombo = 1234,
|
||||
TotalScore = 12345678,
|
||||
Accuracy = 0.9854,
|
||||
Ranked = true,
|
||||
},
|
||||
new SoloScoreInfo
|
||||
{
|
||||
@ -247,6 +263,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
MaxCombo = 1234,
|
||||
TotalScore = 1234567,
|
||||
Accuracy = 0.8765,
|
||||
Ranked = true,
|
||||
},
|
||||
new SoloScoreInfo
|
||||
{
|
||||
@ -263,6 +280,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
MaxCombo = 1234,
|
||||
TotalScore = 123456,
|
||||
Accuracy = 0.6543,
|
||||
Ranked = true,
|
||||
},
|
||||
}
|
||||
};
|
||||
@ -309,6 +327,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
MaxCombo = 1234,
|
||||
TotalScore = 123456,
|
||||
Accuracy = 0.6543,
|
||||
Ranked = true,
|
||||
},
|
||||
Position = 1337,
|
||||
};
|
||||
|
@ -40,7 +40,8 @@ namespace osu.Game.Tests.Visual.Online
|
||||
new APIMod { Acronym = new OsuModHardRock().Acronym },
|
||||
new APIMod { Acronym = new OsuModDoubleTime().Acronym },
|
||||
},
|
||||
Accuracy = 0.9813
|
||||
Accuracy = 0.9813,
|
||||
Ranked = true,
|
||||
};
|
||||
|
||||
var secondScore = new SoloScoreInfo
|
||||
@ -62,7 +63,8 @@ namespace osu.Game.Tests.Visual.Online
|
||||
new APIMod { Acronym = new OsuModHardRock().Acronym },
|
||||
new APIMod { Acronym = new OsuModDoubleTime().Acronym },
|
||||
},
|
||||
Accuracy = 0.998546
|
||||
Accuracy = 0.998546,
|
||||
Ranked = true,
|
||||
};
|
||||
|
||||
var thirdScore = new SoloScoreInfo
|
||||
@ -79,7 +81,8 @@ namespace osu.Game.Tests.Visual.Online
|
||||
DifficultyName = "Insane"
|
||||
},
|
||||
EndedAt = DateTimeOffset.Now,
|
||||
Accuracy = 0.9726
|
||||
Accuracy = 0.9726,
|
||||
Ranked = true,
|
||||
};
|
||||
|
||||
var noPPScore = new SoloScoreInfo
|
||||
@ -95,7 +98,8 @@ namespace osu.Game.Tests.Visual.Online
|
||||
DifficultyName = "[4K] Cataclysmic Hypernova"
|
||||
},
|
||||
EndedAt = DateTimeOffset.Now,
|
||||
Accuracy = 0.55879
|
||||
Accuracy = 0.55879,
|
||||
Ranked = true,
|
||||
};
|
||||
|
||||
var unprocessedPPScore = new SoloScoreInfo
|
||||
@ -112,7 +116,26 @@ namespace osu.Game.Tests.Visual.Online
|
||||
Status = BeatmapOnlineStatus.Ranked,
|
||||
},
|
||||
EndedAt = DateTimeOffset.Now,
|
||||
Accuracy = 0.55879
|
||||
Accuracy = 0.55879,
|
||||
Ranked = true,
|
||||
};
|
||||
|
||||
var unrankedPPScore = new SoloScoreInfo
|
||||
{
|
||||
Rank = ScoreRank.B,
|
||||
Beatmap = new APIBeatmap
|
||||
{
|
||||
BeatmapSet = new APIBeatmapSet
|
||||
{
|
||||
Title = "C18H27NO3(extend)",
|
||||
Artist = "Team Grimoire",
|
||||
},
|
||||
DifficultyName = "[4K] Cataclysmic Hypernova",
|
||||
Status = BeatmapOnlineStatus.Ranked,
|
||||
},
|
||||
EndedAt = DateTimeOffset.Now,
|
||||
Accuracy = 0.55879,
|
||||
Ranked = false,
|
||||
};
|
||||
|
||||
Add(new FillFlowContainer
|
||||
@ -129,6 +152,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
new ColourProvidedContainer(OverlayColourScheme.Green, new DrawableProfileScore(secondScore)),
|
||||
new ColourProvidedContainer(OverlayColourScheme.Pink, new DrawableProfileScore(noPPScore)),
|
||||
new ColourProvidedContainer(OverlayColourScheme.Pink, new DrawableProfileScore(unprocessedPPScore)),
|
||||
new ColourProvidedContainer(OverlayColourScheme.Pink, new DrawableProfileScore(unrankedPPScore)),
|
||||
new ColourProvidedContainer(OverlayColourScheme.Pink, new DrawableProfileWeightedScore(firstScore, 0.97)),
|
||||
new ColourProvidedContainer(OverlayColourScheme.Pink, new DrawableProfileWeightedScore(secondScore, 0.85)),
|
||||
new ColourProvidedContainer(OverlayColourScheme.Pink, new DrawableProfileWeightedScore(thirdScore, 0.66)),
|
||||
|
Loading…
Reference in New Issue
Block a user