From 5b88c2ea0f834cdcfc501efc0e2ce1b2f4c9b32f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 26 Feb 2019 16:12:40 +0900 Subject: [PATCH] Add visual test --- .../Visual/TestCaseBeatmapDetails.cs | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/osu.Game.Tests/Visual/TestCaseBeatmapDetails.cs b/osu.Game.Tests/Visual/TestCaseBeatmapDetails.cs index bc4f89ac26..84af6453f5 100644 --- a/osu.Game.Tests/Visual/TestCaseBeatmapDetails.cs +++ b/osu.Game.Tests/Visual/TestCaseBeatmapDetails.cs @@ -21,7 +21,7 @@ namespace osu.Game.Tests.Visual Padding = new MarginPadding(150), }); - AddStep("beatmap all metrics", () => details.Beatmap = new BeatmapInfo + AddStep("all metrics", () => details.Beatmap = new BeatmapInfo { Version = "All Metrics", Metadata = new BeatmapMetadata @@ -45,7 +45,30 @@ namespace osu.Game.Tests.Visual }, }); - AddStep("beatmap ratings", () => details.Beatmap = new BeatmapInfo + AddStep("all except source", () => details.Beatmap = new BeatmapInfo + { + Version = "All Metrics", + Metadata = new BeatmapMetadata + { + Tags = "this beatmap has all the metrics", + }, + BaseDifficulty = new BeatmapDifficulty + { + CircleSize = 7, + DrainRate = 1, + OverallDifficulty = 5.7f, + ApproachRate = 3.5f, + }, + StarDifficulty = 5.3f, + Metrics = new BeatmapMetrics + { + Ratings = Enumerable.Range(0, 11), + Fails = Enumerable.Range(1, 100).Select(i => i % 12 - 6), + Retries = Enumerable.Range(-2, 100).Select(i => i % 12 - 6), + }, + }); + + AddStep("ratings", () => details.Beatmap = new BeatmapInfo { Version = "Only Ratings", Metadata = new BeatmapMetadata @@ -67,7 +90,7 @@ namespace osu.Game.Tests.Visual }, }); - AddStep("beatmap fails retries", () => details.Beatmap = new BeatmapInfo + AddStep("fails retries", () => details.Beatmap = new BeatmapInfo { Version = "Only Retries and Fails", Metadata = new BeatmapMetadata @@ -90,7 +113,7 @@ namespace osu.Game.Tests.Visual }, }); - AddStep("beatmap no metrics", () => details.Beatmap = new BeatmapInfo + AddStep("no metrics", () => details.Beatmap = new BeatmapInfo { Version = "No Metrics", Metadata = new BeatmapMetadata