mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 15:33:21 +08:00
Add failing test case
This commit is contained in:
parent
471a06883a
commit
b95aff3e5f
@ -10,6 +10,7 @@ using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Framework.Screens;
|
||||
@ -282,6 +283,28 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
AddAssert("filter count is 2", () => songSelect.FilterCount == 2);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestCarouselSelectionUpdatesOnResume()
|
||||
{
|
||||
addRulesetImportStep(0);
|
||||
|
||||
createSongSelect();
|
||||
|
||||
AddStep("push child screen", () => Stack.Push(new TestSceneOsuScreenStack.TestScreen("test child")));
|
||||
AddUntilStep("wait for not current", () => !songSelect.IsCurrentScreen());
|
||||
|
||||
AddStep("update beatmap", () =>
|
||||
{
|
||||
var selectedBeatmap = Beatmap.Value.BeatmapInfo;
|
||||
var anotherBeatmap = Beatmap.Value.BeatmapSetInfo.Beatmaps.Except(selectedBeatmap.Yield()).First();
|
||||
Beatmap.Value = manager.GetWorkingBeatmap(anotherBeatmap);
|
||||
});
|
||||
|
||||
AddStep("return", () => songSelect.MakeCurrent());
|
||||
AddUntilStep("wait for current", () => songSelect.IsCurrentScreen());
|
||||
AddAssert("carousel updated", () => songSelect.Carousel.SelectedBeatmapInfo.Equals(Beatmap.Value.BeatmapInfo));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestAudioResuming()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user