Add failing test coverage for correct combo colour copy

This commit is contained in:
Bartłomiej Dach 2022-02-06 18:44:12 +01:00
parent 1bf5375e74
commit 1292722a00
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -6,6 +6,8 @@ using System.IO;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
@ -188,6 +190,16 @@ namespace osu.Game.Tests.Visual.Editing
}
}));
AddStep("set approach rate", () => EditorBeatmap.Difficulty.ApproachRate = 4);
AddStep("set combo colours", () =>
{
var beatmapSkin = EditorBeatmap.BeatmapSkin.AsNonNull();
beatmapSkin.ComboColours.Clear();
beatmapSkin.ComboColours.AddRange(new[]
{
new Colour4(255, 0, 0, 255),
new Colour4(0, 0, 255, 255)
});
});
AddStep("save beatmap", () => Editor.Save());
AddAssert("new beatmap persisted", () =>
@ -220,6 +232,7 @@ namespace osu.Game.Tests.Visual.Editing
});
AddAssert("created difficulty has objects", () => EditorBeatmap.HitObjects.Count == 2);
AddAssert("approach rate correctly copied", () => EditorBeatmap.Difficulty.ApproachRate == 4);
AddAssert("combo colours correctly copied", () => EditorBeatmap.BeatmapSkin.AsNonNull().ComboColours.Count == 2);
AddStep("set unique difficulty name", () => EditorBeatmap.BeatmapInfo.DifficultyName = secondDifficultyName);
AddStep("save beatmap", () => Editor.Save());