1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 14:53:21 +08:00

Add test coverage of difficulty filter reset

This commit is contained in:
Dean Herbert 2022-07-01 15:28:55 +09:00
parent f3af612133
commit 3e0f4e7609
2 changed files with 17 additions and 1 deletions

View File

@ -97,6 +97,22 @@ namespace osu.Game.Tests.Visual.SongSelect
AddUntilStep("wait for placeholder visible", () => getPlaceholder()?.State.Value == Visibility.Visible);
}
[Test]
public void TestPlaceholderStarDifficulty()
{
addRulesetImportStep(0);
AddStep("change star filter", () => config.SetValue(OsuSetting.DisplayStarsMinimum, 10.0));
createSongSelect();
AddUntilStep("wait for placeholder visible", () => getPlaceholder()?.State.Value == Visibility.Visible);
AddStep("click link in placeholder", () => getPlaceholder().ChildrenOfType<DrawableLinkCompiler>().First().TriggerClick());
AddUntilStep("star filter reset", () => config.Get<double>(OsuSetting.DisplayStarsMinimum) == 0.0);
AddUntilStep("wait for placeholder visible", () => getPlaceholder()?.State.Value == Visibility.Hidden);
}
[Test]
public void TestPlaceholderConvertSetting()
{

View File

@ -135,7 +135,7 @@ namespace osu.Game.Screens.Select
// TODO: Add realm queries to hint at which ruleset results are available in (and allow clicking to switch).
// TODO: Make this message more certain by ensuring the osu! beatmaps exist before suggesting.
if (filter?.Ruleset.OnlineID > 0 && !filter.AllowConvertedBeatmaps)
if (filter?.Ruleset?.OnlineID > 0 && !filter.AllowConvertedBeatmaps)
{
textFlow.AddParagraph("- Try");
textFlow.AddLink(" enabling ", () => config.SetValue(OsuSetting.ShowConvertedBeatmaps, true));