1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:03:13 +08:00

Add trigger user change test

This commit is contained in:
Andrei Zavatski 2020-02-05 11:13:32 +03:00
parent 0bbd95a69c
commit 9347c3f535

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics;
using osu.Game.Overlays.Comments;
using osu.Game.Overlays;
using osu.Framework.Allocation;
using osu.Game.Online.API;
namespace osu.Game.Tests.Visual.Online
{
@ -34,21 +35,26 @@ namespace osu.Game.Tests.Visual.Online
[Cached]
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
private CommentsContainer comments;
private readonly BasicScrollContainer scroll;
public TestSceneCommentsContainer()
{
BasicScrollContainer scroll;
CommentsContainer comments;
Add(scroll = new BasicScrollContainer
{
RelativeSizeAxes = Axes.Both,
Child = comments = new CommentsContainer()
});
}
[BackgroundDependencyLoader]
private void load(IAPIProvider api)
{
AddStep("Big Black comments", () => comments.ShowComments(CommentableType.Beatmapset, 41823));
AddStep("Airman comments", () => comments.ShowComments(CommentableType.Beatmapset, 24313));
AddStep("Lazer build comments", () => comments.ShowComments(CommentableType.Build, 4772));
AddStep("News comments", () => comments.ShowComments(CommentableType.NewsPost, 715));
AddStep("Trigger user change", api.LocalUser.TriggerChange);
AddStep("Idle state", () =>
{
scroll.Clear();