mirror of https://github.com/ppy/osu
reorder LadderEditorScreen tests
This commit is contained in:
parent
3510394699
commit
8cd81681b2
|
@ -32,6 +32,37 @@ public void Setup() => Schedule(() =>
|
|||
});
|
||||
});
|
||||
|
||||
[Test]
|
||||
public void TestResetBracketTeamsCancelled()
|
||||
{
|
||||
AddStep("pull up context menu", () =>
|
||||
{
|
||||
InputManager.MoveMouseTo(ladderEditorScreen);
|
||||
InputManager.Click(MouseButton.Right);
|
||||
});
|
||||
|
||||
AddStep("click Reset teams button", () =>
|
||||
{
|
||||
InputManager.MoveMouseTo(osuContextMenuContainer.ChildrenOfType<DrawableOsuMenuItem>().Last(p =>
|
||||
((OsuMenuItem)p.Item).Type == MenuItemType.Destructive), new Vector2(5, 0));
|
||||
InputManager.Click(MouseButton.Left);
|
||||
});
|
||||
|
||||
AddAssert("dialog displayed", () => dialogOverlay.CurrentDialog is LadderResetTeamsDialog);
|
||||
AddStep("click cancel", () =>
|
||||
{
|
||||
InputManager.MoveMouseTo(dialogOverlay.CurrentDialog.ChildrenOfType<PopupDialogButton>().Last());
|
||||
InputManager.Click(MouseButton.Left);
|
||||
});
|
||||
|
||||
AddUntilStep("dialog dismissed", () => dialogOverlay.CurrentDialog is not LadderResetTeamsDialog);
|
||||
|
||||
AddAssert("assert ladder teams unchanged", () =>
|
||||
{
|
||||
return !Ladder.Matches.Any(m => m.Team1.Value == null && m.Team2.Value == null);
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestResetBracketTeams()
|
||||
{
|
||||
|
@ -65,36 +96,5 @@ public void TestResetBracketTeams()
|
|||
return Ladder.Matches.All(m => m.Team1.Value == null && m.Team2.Value == null);
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestResetBracketTeamsCancelled()
|
||||
{
|
||||
AddStep("pull up context menu", () =>
|
||||
{
|
||||
InputManager.MoveMouseTo(ladderEditorScreen);
|
||||
InputManager.Click(MouseButton.Right);
|
||||
});
|
||||
|
||||
AddStep("click Reset teams button", () =>
|
||||
{
|
||||
InputManager.MoveMouseTo(osuContextMenuContainer.ChildrenOfType<DrawableOsuMenuItem>().Last(p =>
|
||||
((OsuMenuItem)p.Item).Type == MenuItemType.Destructive), new Vector2(5, 0));
|
||||
InputManager.Click(MouseButton.Left);
|
||||
});
|
||||
|
||||
AddAssert("dialog displayed", () => dialogOverlay.CurrentDialog is LadderResetTeamsDialog);
|
||||
AddStep("click cancel", () =>
|
||||
{
|
||||
InputManager.MoveMouseTo(dialogOverlay.CurrentDialog.ChildrenOfType<PopupDialogButton>().Last());
|
||||
InputManager.Click(MouseButton.Left);
|
||||
});
|
||||
|
||||
AddUntilStep("dialog dismissed", () => dialogOverlay.CurrentDialog is not LadderResetTeamsDialog);
|
||||
|
||||
AddAssert("assert ladder teams unchanged", () =>
|
||||
{
|
||||
return !Ladder.Matches.Any(m => m.Team1.Value == null && m.Team2.Value == null);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue