mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Disable beatmap options button when none selected
This commit is contained in:
@ -37,7 +37,6 @@ using osu.Game.Screens.Select;
|
||||
using osu.Game.Screens.Select.Carousel;
|
||||
using osu.Game.Screens.Select.Filter;
|
||||
using osu.Game.Tests.Resources;
|
||||
using osu.Game.Screens.Select.Options;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Tests.Visual.SongSelect
|
||||
@ -1057,14 +1056,15 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestBeatmapOptionsButtonDisable()
|
||||
public void TestBeatmapOptionsDisabled()
|
||||
{
|
||||
createSongSelect();
|
||||
|
||||
addRulesetImportStep(0);
|
||||
|
||||
AddAssert("options enabled", () => songSelect.ChildrenOfType<FooterButtonOptions>().Single().Enabled.Value);
|
||||
AddStep("delete all beatmaps", () => manager.Delete());
|
||||
|
||||
AddAssert("options disabled", () => !songSelect.ChildrenOfType<FooterButtonOptions>().Single().Enabled.Value);
|
||||
}
|
||||
|
||||
private void waitForInitialSelection()
|
||||
@ -1154,12 +1154,6 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
public new BeatmapCarousel Carousel => base.Carousel;
|
||||
public new ModSelectOverlay ModSelect => base.ModSelect;
|
||||
|
||||
public new BeatmapOptionsButton DeleteOptionButton => base.DeleteOptionButton;
|
||||
|
||||
public new BeatmapOptionsButton ClearOptionButton => base.ClearOptionButton;
|
||||
|
||||
public new BeatmapOptionsButton? EditOptionButton => base.EditOptionButton;
|
||||
|
||||
public new void PresentScore(ScoreInfo score) => base.PresentScore(score);
|
||||
|
||||
protected override bool OnStart()
|
||||
|
@ -3,8 +3,10 @@
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Screens.Select;
|
||||
using osuTK;
|
||||
using osuTK.Input;
|
||||
@ -43,6 +45,12 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
InputManager.MoveMouseTo(Vector2.Zero);
|
||||
});
|
||||
|
||||
[Test]
|
||||
public void TestState()
|
||||
{
|
||||
AddRepeatStep("toggle options state", () => this.ChildrenOfType<FooterButton>().Last().Enabled.Toggle(), 20);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestFooterRandom()
|
||||
{
|
||||
|
Reference in New Issue
Block a user