mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 17:52:56 +08:00
Add failing test coverage
This commit is contained in:
parent
ea8beffa61
commit
cacc23204d
@ -201,6 +201,22 @@ namespace osu.Game.Tests.Visual.Menus
|
||||
AddAssert("volume not changed", () => Audio.Volume.Value == 0.5);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRulesetSelectorOverflow()
|
||||
{
|
||||
AddStep("set toolbar width", () =>
|
||||
{
|
||||
toolbar.RelativeSizeAxes = Axes.None;
|
||||
toolbar.Width = 0;
|
||||
});
|
||||
AddStep("move mouse over news toggle button", () =>
|
||||
{
|
||||
var button = toolbar.ChildrenOfType<ToolbarNewsButton>().Single();
|
||||
InputManager.MoveMouseTo(button);
|
||||
});
|
||||
AddAssert("no ruleset toggle buttons hovered", () => !toolbar.ChildrenOfType<ToolbarRulesetTabButton>().Any(button => button.IsHovered));
|
||||
}
|
||||
|
||||
public partial class TestToolbar : Toolbar
|
||||
{
|
||||
public new Bindable<OverlayActivation> OverlayActivationMode => base.OverlayActivationMode as Bindable<OverlayActivation>;
|
||||
|
Loading…
Reference in New Issue
Block a user