mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 14:23:02 +08:00
Add test coverage of difficulty filter reset
This commit is contained in:
parent
f3af612133
commit
3e0f4e7609
@ -97,6 +97,22 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
AddUntilStep("wait for placeholder visible", () => getPlaceholder()?.State.Value == Visibility.Visible);
|
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]
|
[Test]
|
||||||
public void TestPlaceholderConvertSetting()
|
public void TestPlaceholderConvertSetting()
|
||||||
{
|
{
|
||||||
|
@ -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: 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.
|
// 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.AddParagraph("- Try");
|
||||||
textFlow.AddLink(" enabling ", () => config.SetValue(OsuSetting.ShowConvertedBeatmaps, true));
|
textFlow.AddLink(" enabling ", () => config.SetValue(OsuSetting.ShowConvertedBeatmaps, true));
|
||||||
|
Loading…
Reference in New Issue
Block a user