Merge branch 'master' into fix-initial-spectator-state-callback

This commit is contained in:
smoogipoo
2021-04-19 16:49:06 +09:00
49 changed files with 646 additions and 218 deletions

View File

@ -81,6 +81,13 @@ namespace osu.Game.Tests.Visual.Components
[Test]
public void TestMovement()
{
checkIdleStatus(1, false);
checkIdleStatus(2, false);
checkIdleStatus(3, false);
checkIdleStatus(4, false);
waitForAllIdle();
AddStep("move to top right", () => InputManager.MoveMouseTo(box2));
checkIdleStatus(1, true);
@ -102,6 +109,8 @@ namespace osu.Game.Tests.Visual.Components
[Test]
public void TestTimings()
{
waitForAllIdle();
AddStep("move to centre", () => InputManager.MoveMouseTo(Content));
checkIdleStatus(1, false);

View File

@ -3,12 +3,16 @@
using System.Linq;
using NUnit.Framework;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Screens.Edit.Compose.Components;
using osu.Game.Screens.Edit.Compose.Components.Timeline;
using osu.Game.Tests.Beatmaps;
using osuTK;
@ -110,8 +114,9 @@ namespace osu.Game.Tests.Visual.Editing
AddAssert("duration matches", () => ((Spinner)EditorBeatmap.HitObjects.Single()).Duration == 5000);
}
[Test]
public void TestCopyPaste()
[TestCase(false)]
[TestCase(true)]
public void TestCopyPaste(bool deselectAfterCopy)
{
var addedObject = new HitCircle { StartTime = 1000 };
@ -123,11 +128,22 @@ namespace osu.Game.Tests.Visual.Editing
AddStep("move forward in time", () => EditorClock.Seek(2000));
if (deselectAfterCopy)
{
AddStep("deselect", () => EditorBeatmap.SelectedHitObjects.Clear());
AddUntilStep("timeline selection box is not visible", () => Editor.ChildrenOfType<Timeline>().First().ChildrenOfType<SelectionHandler>().First().Alpha == 0);
AddUntilStep("composer selection box is not visible", () => Editor.ChildrenOfType<HitObjectComposer>().First().ChildrenOfType<SelectionHandler>().First().Alpha == 0);
}
AddStep("paste hitobject", () => Editor.Paste());
AddAssert("are two objects", () => EditorBeatmap.HitObjects.Count == 2);
AddAssert("new object selected", () => EditorBeatmap.SelectedHitObjects.Single().StartTime == 2000);
AddUntilStep("timeline selection box is visible", () => Editor.ChildrenOfType<Timeline>().First().ChildrenOfType<SelectionHandler>().First().Alpha > 0);
AddUntilStep("composer selection box is visible", () => Editor.ChildrenOfType<HitObjectComposer>().First().ChildrenOfType<SelectionHandler>().First().Alpha > 0);
}
[Test]

View File

@ -13,6 +13,7 @@ using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.OnlinePlay.Components;
using osu.Game.Screens.OnlinePlay.Multiplayer;
using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
using osu.Game.Tests.Beatmaps;
@ -128,6 +129,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
InputManager.Click(MouseButton.Left);
});
AddUntilStep("wait for ready button to be enabled", () => this.ChildrenOfType<MultiplayerReadyButton>().Single().ChildrenOfType<ReadyButton>().Single().Enabled.Value);
AddStep("click ready button", () =>
{
InputManager.MoveMouseTo(this.ChildrenOfType<MultiplayerReadyButton>().Single());