mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
Add failing test of date submitted search failing
This commit is contained in:
parent
db9970b72a
commit
148e487c02
@ -494,6 +494,43 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
AddAssert("Something is selected", () => carousel.SelectedBeatmapInfo != null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestSortingDateSubmitted()
|
||||
{
|
||||
var sets = new List<BeatmapSetInfo>();
|
||||
const string zzz_string = "zzzzz";
|
||||
|
||||
AddStep("Populuate beatmap sets", () =>
|
||||
{
|
||||
sets.Clear();
|
||||
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
var set = TestResources.CreateTestBeatmapSetInfo(5);
|
||||
|
||||
if (i >= 2 && i < 10)
|
||||
set.DateSubmitted = DateTimeOffset.Now.AddMinutes(i);
|
||||
if (i < 5)
|
||||
set.Beatmaps.ForEach(b => b.Metadata.Artist = zzz_string);
|
||||
|
||||
sets.Add(set);
|
||||
}
|
||||
});
|
||||
|
||||
loadBeatmaps(sets);
|
||||
|
||||
AddStep("Sort by date submitted", () => carousel.Filter(new FilterCriteria { Sort = SortMode.DateSubmitted }, false));
|
||||
checkVisibleItemCount(diff: false, count: 8);
|
||||
checkVisibleItemCount(diff: true, count: 5);
|
||||
AddStep("Sort by date submitted and string", () => carousel.Filter(new FilterCriteria
|
||||
{
|
||||
Sort = SortMode.DateSubmitted,
|
||||
SearchText = zzz_string
|
||||
}, false));
|
||||
checkVisibleItemCount(diff: false, count: 3);
|
||||
checkVisibleItemCount(diff: true, count: 5);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestSorting()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user