mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 03:42:57 +08:00
reorder LadderEditorScreen tests
This commit is contained in:
parent
3510394699
commit
8cd81681b2
@ -32,6 +32,37 @@ namespace osu.Game.Tournament.Tests.Screens
|
||||
});
|
||||
});
|
||||
|
||||
[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 @@ namespace osu.Game.Tournament.Tests.Screens
|
||||
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
Block a user