mirror of https://github.com/ppy/osu
Adjust failing test after metrics changes
This commit is contained in:
parent
82a5ba66e1
commit
2ef843261b
|
@ -117,9 +117,9 @@ public void TestPlacementFailsWhenClickingButton()
|
|||
AddStep("move mouse to overlapping toggle button", () =>
|
||||
{
|
||||
var playfield = hitObjectComposer.Playfield.ScreenSpaceDrawQuad;
|
||||
var button = toolboxContainer.ChildrenOfType<DrawableTernaryButton>().First(b => playfield.Contains(b.ScreenSpaceDrawQuad.Centre));
|
||||
var button = toolboxContainer.ChildrenOfType<DrawableTernaryButton>().First(b => playfield.Contains(getOverlapPoint(b)));
|
||||
|
||||
InputManager.MoveMouseTo(button);
|
||||
InputManager.MoveMouseTo(getOverlapPoint(button));
|
||||
});
|
||||
|
||||
AddAssert("no circles placed", () => editorBeatmap.HitObjects.Count == 0);
|
||||
|
@ -127,6 +127,12 @@ public void TestPlacementFailsWhenClickingButton()
|
|||
AddStep("attempt place circle", () => InputManager.Click(MouseButton.Left));
|
||||
|
||||
AddAssert("no circles placed", () => editorBeatmap.HitObjects.Count == 0);
|
||||
|
||||
Vector2 getOverlapPoint(DrawableTernaryButton ternaryButton)
|
||||
{
|
||||
var quad = ternaryButton.ScreenSpaceDrawQuad;
|
||||
return quad.TopLeft + new Vector2(quad.Width * 9 / 10, quad.Height / 2);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
Loading…
Reference in New Issue