2019-05-12 15:36:05 +00:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
2019-05-17 01:29:43 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2018-07-16 21:50:22 +00:00
|
|
|
|
using NUnit.Framework;
|
2018-07-25 12:31:41 +00:00
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
2018-07-16 21:50:22 +00:00
|
|
|
|
using osu.Game.Overlays;
|
2019-05-17 01:29:43 +00:00
|
|
|
|
using osu.Game.Overlays.Changelog;
|
2018-07-16 21:50:22 +00:00
|
|
|
|
|
2019-05-15 09:30:02 +00:00
|
|
|
|
namespace osu.Game.Tests.Visual.Online
|
2018-07-16 21:50:22 +00:00
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
2019-05-15 09:30:02 +00:00
|
|
|
|
public class TestSceneChangelogOverlay : OsuTestScene
|
2018-07-16 21:50:22 +00:00
|
|
|
|
{
|
|
|
|
|
private ChangelogOverlay changelog;
|
|
|
|
|
|
2019-05-17 01:29:43 +00:00
|
|
|
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
|
|
|
|
{
|
2019-05-22 10:51:16 +00:00
|
|
|
|
typeof(UpdateStreamBadgeArea),
|
|
|
|
|
typeof(UpdateStreamBadge),
|
2019-05-17 01:29:43 +00:00
|
|
|
|
typeof(ChangelogHeader),
|
|
|
|
|
typeof(ChangelogContent),
|
2019-05-17 08:47:28 +00:00
|
|
|
|
typeof(ChangelogListing),
|
2019-05-18 17:09:08 +00:00
|
|
|
|
typeof(ChangelogSingleBuild),
|
2019-05-17 08:47:28 +00:00
|
|
|
|
typeof(ChangelogBuild),
|
2019-07-04 06:47:06 +00:00
|
|
|
|
typeof(Comments),
|
2019-05-17 01:29:43 +00:00
|
|
|
|
};
|
|
|
|
|
|
2018-07-16 21:50:22 +00:00
|
|
|
|
protected override void LoadComplete()
|
|
|
|
|
{
|
|
|
|
|
base.LoadComplete();
|
|
|
|
|
|
|
|
|
|
Add(changelog = new ChangelogOverlay());
|
2018-07-22 19:00:29 +00:00
|
|
|
|
AddStep(@"Show", changelog.Show);
|
2018-07-25 12:31:41 +00:00
|
|
|
|
AddStep(@"Hide", changelog.Hide);
|
2019-05-12 15:46:22 +00:00
|
|
|
|
|
|
|
|
|
AddWaitStep("wait for hide", 3);
|
|
|
|
|
|
2018-07-25 12:31:41 +00:00
|
|
|
|
AddStep(@"Show with Lazer 2018.712.0", () =>
|
|
|
|
|
{
|
2019-05-15 09:08:19 +00:00
|
|
|
|
changelog.ShowBuild(new APIChangelogBuild
|
2018-07-25 12:31:41 +00:00
|
|
|
|
{
|
|
|
|
|
Version = "2018.712.0",
|
2019-05-21 05:46:12 +00:00
|
|
|
|
DisplayVersion = "2018.712.0",
|
2019-06-03 04:16:05 +00:00
|
|
|
|
UpdateStream = new APIUpdateStream { Name = OsuGameBase.CLIENT_STREAM_NAME },
|
2019-05-22 04:28:41 +00:00
|
|
|
|
ChangelogEntries = new List<APIChangelogEntry>
|
2019-05-21 05:46:12 +00:00
|
|
|
|
{
|
|
|
|
|
new APIChangelogEntry
|
|
|
|
|
{
|
|
|
|
|
Category = "Test",
|
|
|
|
|
Title = "Title",
|
|
|
|
|
MessageHtml = "Message",
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-07-25 12:31:41 +00:00
|
|
|
|
});
|
|
|
|
|
changelog.Show();
|
|
|
|
|
});
|
2019-05-12 15:46:22 +00:00
|
|
|
|
|
|
|
|
|
AddWaitStep("wait for show", 3);
|
2018-07-25 12:31:41 +00:00
|
|
|
|
AddStep(@"Hide", changelog.Hide);
|
2019-05-12 15:46:22 +00:00
|
|
|
|
AddWaitStep("wait for hide", 3);
|
|
|
|
|
|
2018-07-25 12:31:41 +00:00
|
|
|
|
AddStep(@"Show with listing", () =>
|
|
|
|
|
{
|
|
|
|
|
changelog.ShowListing();
|
|
|
|
|
changelog.Show();
|
|
|
|
|
});
|
2018-07-16 21:50:22 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|