mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:23:22 +08:00
Add test for object move
This commit is contained in:
parent
d1e27e8a69
commit
2e775e6886
@ -1,8 +1,6 @@
|
||||
// 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.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
@ -22,7 +20,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
public class TestSceneSkinEditor : PlayerTestScene
|
||||
{
|
||||
private SkinEditor skinEditor;
|
||||
private SkinEditor skinEditor = null!;
|
||||
|
||||
protected override bool Autoplay => true;
|
||||
|
||||
@ -54,7 +52,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
[Test]
|
||||
public void TestEditComponent()
|
||||
{
|
||||
BarHitErrorMeter hitErrorMeter = null;
|
||||
BarHitErrorMeter hitErrorMeter = null!;
|
||||
|
||||
AddStep("select bar hit error blueprint", () =>
|
||||
{
|
||||
@ -65,6 +63,10 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
skinEditor.SelectedComponents.Add(blueprint.Item);
|
||||
});
|
||||
|
||||
AddStep("move by keyboard", () => InputManager.Key(Key.Right));
|
||||
|
||||
AddAssert("hitErrorMeter moved", () => hitErrorMeter.X != 0);
|
||||
|
||||
AddAssert("value is default", () => hitErrorMeter.JudgementLineThickness.IsDefault);
|
||||
|
||||
AddStep("hover first slider", () =>
|
||||
|
Loading…
Reference in New Issue
Block a user