2020-04-16 16:01:36 +08: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.
|
|
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
2024-02-01 20:35:23 +08:00
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Game.Online.API;
|
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
2020-04-16 16:01:36 +08:00
|
|
|
|
using osu.Game.Overlays;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Online
|
|
|
|
|
{
|
|
|
|
|
public partial class TestSceneDashboardOverlay : OsuTestScene
|
|
|
|
|
{
|
|
|
|
|
private readonly DashboardOverlay overlay;
|
|
|
|
|
|
|
|
|
|
public TestSceneDashboardOverlay()
|
|
|
|
|
{
|
|
|
|
|
Add(overlay = new DashboardOverlay());
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-01 20:35:23 +08:00
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load()
|
|
|
|
|
{
|
|
|
|
|
int supportLevel = 0;
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 1000; i++)
|
|
|
|
|
{
|
|
|
|
|
supportLevel++;
|
|
|
|
|
|
|
|
|
|
if (supportLevel > 3)
|
|
|
|
|
supportLevel = 0;
|
|
|
|
|
|
|
|
|
|
((DummyAPIAccess)API).Friends.Add(new APIUser
|
|
|
|
|
{
|
|
|
|
|
Username = @"peppy",
|
|
|
|
|
Id = 2,
|
|
|
|
|
Colour = "99EB47",
|
|
|
|
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c3.jpg",
|
|
|
|
|
IsSupporter = supportLevel > 0,
|
|
|
|
|
SupportLevel = supportLevel
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-16 16:01:36 +08:00
|
|
|
|
[Test]
|
|
|
|
|
public void TestShow()
|
|
|
|
|
{
|
|
|
|
|
AddStep("Show", overlay.Show);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestHide()
|
|
|
|
|
{
|
|
|
|
|
AddStep("Hide", overlay.Hide);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|