mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Refactor1, UX1
This commit is contained in:
@ -2,7 +2,6 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Overlays;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
@ -13,7 +12,7 @@ namespace osu.Game.Tests.Visual
|
||||
private ChangelogOverlay changelog;
|
||||
private int releaseStreamCount;
|
||||
private int index;
|
||||
private void indexIncrement() => index = (index == releaseStreamCount - 1) ? 0 : index + 1;
|
||||
private void indexIncrement() => index = index == releaseStreamCount - 1 ? 0 : index + 1;
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
@ -21,38 +20,37 @@ namespace osu.Game.Tests.Visual
|
||||
|
||||
Add(changelog = new ChangelogOverlay());
|
||||
|
||||
releaseStreamCount = changelog.streams.badgesContainer.Children.Count;
|
||||
releaseStreamCount = changelog.Streams.BadgesContainer.Children.Count;
|
||||
|
||||
AddStep(@"Show", changelog.Show);
|
||||
AddRepeatStep(@"Toggle Release Stream", () =>
|
||||
{
|
||||
changelog.streams.badgesContainer.Children[index].Activate();
|
||||
changelog.Streams.BadgesContainer.Children[index].Activate();
|
||||
indexIncrement();
|
||||
}, releaseStreamCount);
|
||||
AddStep(@"Listing", changelog.ActivateListing);
|
||||
AddStep(@"Hide", changelog.Hide);
|
||||
AddWaitStep(4);
|
||||
AddWaitStep(3);
|
||||
AddStep(@"Show with Release Stream", () =>
|
||||
{
|
||||
changelog.streams.badgesContainer.Children[index].Activate();
|
||||
changelog.Streams.BadgesContainer.Children[index].Activate();
|
||||
changelog.Show();
|
||||
indexIncrement();
|
||||
});
|
||||
AddWaitStep(4);
|
||||
AddWaitStep(3);
|
||||
AddStep(@"Hide", changelog.Hide);
|
||||
AddWaitStep(4);
|
||||
AddWaitStep(3);
|
||||
AddStep(@"Show with listing", () =>
|
||||
{
|
||||
// .maybe changelog should have a function that does header.ActivateListing()
|
||||
changelog.ActivateListing();
|
||||
changelog.Show();
|
||||
});
|
||||
AddWaitStep(4);
|
||||
AddStep(@"Hide", changelog.Hide);
|
||||
AddWaitStep(4);
|
||||
AddWaitStep(3);
|
||||
AddStep(@"Activate release", () =>
|
||||
{
|
||||
changelog.streams.badgesContainer.Children[index].Activate();
|
||||
changelog.Streams.BadgesContainer.Children[index].Activate();
|
||||
indexIncrement();
|
||||
});
|
||||
AddStep(@"Show with listing", () =>
|
||||
@ -61,9 +59,5 @@ namespace osu.Game.Tests.Visual
|
||||
changelog.Show();
|
||||
});
|
||||
}
|
||||
|
||||
public TestCaseChangelog()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user