Variant 4: cannot change history, empty text/everything selected resets index (current with bug fix)

This commit is contained in:
Terochi
2022-11-21 10:11:26 +01:00
parent 58288275a6
commit 7dc7729ac2
2 changed files with 36 additions and 1 deletions

View File

@ -3,6 +3,7 @@
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Input;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
@ -101,7 +102,13 @@ namespace osu.Game.Tests.Visual.UserInterface
AddStep("Remove text", () => box.Text = string.Empty);
AddStep("Move Up", () => InputManager.Key(Key.Up));
AddAssert("Text unchanged", () => box.Text == string.Empty);
AddAssert("Same as previous message", () => box.Text == "Message 2");
AddStep("Move Up", () => InputManager.Key(Key.Up));
AddStep("Select text", () => InputManager.Keys(PlatformAction.SelectAll));
AddStep("Replace text", () => box.Text = "New text");
AddStep("Move Up", () => InputManager.Key(Key.Up));
AddAssert("Same as previous message", () => box.Text == "Message 2");
}
private void addMessages(int count)