This commit is contained in:
HoutarouOreki
2018-07-16 23:50:22 +02:00
parent 8e5c93e3ca
commit be977e2541
8 changed files with 635 additions and 0 deletions

View File

@ -0,0 +1,34 @@
// Copyright(c) 2007-2018 ppy Pty Ltd<contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using NUnit.Framework;
using osu.Game.Overlays;
namespace osu.Game.Tests.Visual
{
[TestFixture]
public class TestCaseChangelog : OsuTestCase
{
private ChangelogOverlay changelog;
protected override void LoadComplete()
{
base.LoadComplete();
Add(changelog = new ChangelogOverlay());
changelog.ToggleVisibility();
//AddStep(@"toggle", changelog.ToggleVisibility);
AddStep(@"toggle text 1", () => changelog.header.ActivateRelease("Release 20180626.1"));
AddStep(@"toggle text 2", () => changelog.header.ActivateRelease("Lazer 2018.713.1"));
AddStep(@"toggle text 3", () => changelog.header.ActivateRelease("Beta 20180626"));
AddStep(@"go to listing", changelog.header.ActivateListing);
}
public TestCaseChangelog()
{
}
}
}

View File

@ -0,0 +1,76 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using NUnit.Framework;
using OpenTK.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Overlays.Changelog.Header;
namespace osu.Game.Tests.Visual
{
[TestFixture]
public class TestCaseTextBadgePair : OsuTestCase
{
private readonly Container container;
private readonly Box bottomLine;
private readonly TextBadgePair textBadgePair;
public TestCaseTextBadgePair()
{
Add(container = new Container
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new OpenTK.Vector2(300, 40),
Children = new Drawable[]
{
new Box
{
Colour = Color4.Gray,
RelativeSizeAxes = Axes.Both,
},
bottomLine = new Box // purple line
{
Colour = Color4.Purple,
RelativeSizeAxes = Axes.X,
Height = 3,
Anchor = Anchor.BottomLeft,
Origin = Anchor.CentreLeft,
},
textBadgePair = new TextBadgePair(Color4.White, "testing")
{
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
}
},
});
AddStep(@"deactivate", () => textBadgePair.Deactivate());
AddStep(@"activate", () => textBadgePair.Activate());
AddStep(@"purple text", () => textBadgePair.SetTextColor(Color4.Purple, 100));
AddStep(@"white text", () => textBadgePair.SetTextColor(Color4.White, 100));
AddStep(@"purple badge", () => textBadgePair.SetBadgeColor(Color4.Purple, 100));
AddStep(@"white badge", () => textBadgePair.SetBadgeColor(Color4.White, 100));
AddStep(@"hide text", () => textBadgePair.HideText(250));
AddStep(@"show text", () => textBadgePair.ShowText(250));
}
//[BackgroundDependencyLoader]
//private void load(OsuColour colours)
//{
//}
//private enum BreadcrumbTab
//{
// Click,
// The,
// Circles,
//}
}
}