1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 15:37:44 +08:00
osu-lazer/osu.Game.Tournament.Tests/Components/TestSceneDateTextBox.cs

44 lines
1.1 KiB
C#
Raw Normal View History

2020-09-02 12:21:51 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2022-06-17 15:37:17 +08:00
#nullable disable
2020-09-02 12:21:51 +08:00
using NUnit.Framework;
using osu.Game.Tests.Visual;
using osu.Game.Tournament.Components;
using osuTK;
using osuTK.Input;
namespace osu.Game.Tournament.Tests.Components
{
2022-11-24 13:32:20 +08:00
public partial class TestSceneDateTextBox : OsuManualInputManagerTestScene
2020-09-02 12:21:51 +08:00
{
private DateTextBox textBox;
[SetUp]
public void Setup() => Schedule(() =>
{
Child = textBox = new DateTextBox
{
Width = 0.3f
};
});
[Test]
public void TestCommitWithoutSettingBindable()
{
AddStep("click textbox", () =>
{
InputManager.MoveMouseTo(textBox);
InputManager.Click(MouseButton.Left);
});
AddStep("unfocus", () =>
{
InputManager.MoveMouseTo(Vector2.Zero);
InputManager.Click(MouseButton.Left);
});
}
}
}