1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 10:07:36 +08:00

Strip test case

This commit is contained in:
HoutarouOreki 2018-07-22 20:27:20 +02:00
parent 6683d4cabe
commit 23309b3b00

View File

@ -10,67 +10,12 @@ namespace osu.Game.Tests.Visual
public class TestCaseChangelog : OsuTestCase
{
private ChangelogOverlay changelog;
private int index;
private void indexIncrement() => index = index >= changelog.Streams.BadgesContainer.Children.Count - 1 ? 0 : index + 1;
private bool isLoaded => changelog.Streams.BadgesContainer.Children.Count > 0;
protected override void LoadComplete()
{
base.LoadComplete();
Add(changelog = new ChangelogOverlay());
AddStep(@"Show", changelog.Show);
AddRepeatStep(@"Toggle Release Stream", () =>
{
if (isLoaded)
changelog.Streams.BadgesContainer.Children[index].Activate();
indexIncrement();
}, 6);
AddStep(@"Listing", changelog.ActivateListing);
AddStep(@"Hide", changelog.Hide);
AddWaitStep(3);
AddStep(@"Show with Release Stream", () =>
{
if (isLoaded)
changelog.Streams.BadgesContainer.Children[index].Activate();
changelog.Show();
indexIncrement();
});
AddWaitStep(3);
AddStep(@"Hide", changelog.Hide);
AddWaitStep(3);
AddStep(@"Show with listing", () =>
{
changelog.ActivateListing();
changelog.Show();
});
AddWaitStep(3);
AddStep(@"Hide", changelog.Hide);
AddWaitStep(3);
AddStep(@"Activate release", () =>
{
if (isLoaded)
changelog.Streams.BadgesContainer.Children[index].Activate();
indexIncrement();
});
AddStep(@"Show with listing", () =>
{
changelog.ActivateListing();
changelog.Show();
});
AddStep(@"Activate Release", () =>
{
if (isLoaded)
changelog.Streams.BadgesContainer.Children[index].Activate();
});
AddStep(@"Activate Listing", changelog.ActivateListing);
AddStep(@"Activate Release", () =>
{
if (isLoaded)
changelog.Streams.BadgesContainer.Children[index].Activate();
indexIncrement();
});
}
}
}