mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:57:36 +08:00
Further condense steps
This commit is contained in:
parent
37ffe47e4b
commit
c693d1fad8
@ -100,7 +100,12 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
AddStep("Add tracking containers", addFacadeContainers);
|
||||
AddStep("Move facade to random position", startTrackingRandom);
|
||||
AddStep("Remove facade from FacadeContainer", removeFacade);
|
||||
AddStep("Transfer facade to a new container", addFacadeToNewContainer);
|
||||
AddStep("Transfer facade to a new container", () =>
|
||||
{
|
||||
transferContainer.Add(logoFacade);
|
||||
transferContainerBox.Colour = Color4.Tomato;
|
||||
moveLogoFacade();
|
||||
});
|
||||
waitForMove();
|
||||
AddAssert("Logo is tracking", () => trackingContainer.IsLogoTracking);
|
||||
}
|
||||
@ -186,7 +191,11 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
public void SetFacadeSizeTest()
|
||||
{
|
||||
bool failed = false;
|
||||
AddStep("Add tracking containers", addFacadeContainers);
|
||||
AddStep("Set up scenario", () =>
|
||||
{
|
||||
failed = false;
|
||||
addFacadeContainers();
|
||||
});
|
||||
AddStep("Try setting facade size", () =>
|
||||
{
|
||||
try
|
||||
@ -203,13 +212,18 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SetMultipleContainers()
|
||||
public void SetMultipleContainersTest()
|
||||
{
|
||||
bool failed = false;
|
||||
LogoTrackingContainer newContainer = new LogoTrackingContainer();
|
||||
AddStep("Add tracking containers", addFacadeContainers);
|
||||
AddStep("Move facade to random position", startTrackingRandom);
|
||||
AddStep("Add logo to new container", () => newContainer.SetLogo(logo));
|
||||
AddStep("Set up scenario", () =>
|
||||
{
|
||||
failed = false;
|
||||
newContainer = new LogoTrackingContainer();
|
||||
addFacadeContainers();
|
||||
startTrackingRandom();
|
||||
newContainer.SetLogo(logo);
|
||||
});
|
||||
AddStep("Try tracking new container", () =>
|
||||
{
|
||||
try
|
||||
@ -272,13 +286,6 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
moveLogoFacade();
|
||||
}
|
||||
|
||||
private void addFacadeToNewContainer()
|
||||
{
|
||||
transferContainer.Add(logoFacade);
|
||||
transferContainerBox.Colour = Color4.Tomato;
|
||||
moveLogoFacade();
|
||||
}
|
||||
|
||||
private void moveLogoFacade()
|
||||
{
|
||||
if (logoFacade?.Transforms.Count == 0 && transferContainer?.Transforms.Count == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user