2019-01-24 16:43:03 +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.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using osu.Game.Overlays;
|
|
|
|
|
using osu.Game.Overlays.Social;
|
|
|
|
|
using osu.Game.Users;
|
|
|
|
|
|
2019-03-25 00:02:36 +08:00
|
|
|
|
namespace osu.Game.Tests.Visual.Online
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
2019-05-15 03:37:25 +08:00
|
|
|
|
public class TestSceneSocialOverlay : OsuTestScene
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-09-13 16:15:33 +08:00
|
|
|
|
protected override bool UseOnlineAPI => true;
|
2019-08-01 03:44:44 +08:00
|
|
|
|
|
2018-04-13 17:19:50 +08:00
|
|
|
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
|
|
|
|
{
|
|
|
|
|
typeof(UserPanel),
|
|
|
|
|
typeof(SocialPanel),
|
|
|
|
|
typeof(FilterControl),
|
|
|
|
|
typeof(SocialGridPanel),
|
|
|
|
|
typeof(SocialListPanel)
|
|
|
|
|
};
|
|
|
|
|
|
2019-05-15 03:37:25 +08:00
|
|
|
|
public TestSceneSocialOverlay()
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
SocialOverlay s = new SocialOverlay
|
|
|
|
|
{
|
|
|
|
|
Users = new[]
|
|
|
|
|
{
|
|
|
|
|
new User
|
|
|
|
|
{
|
|
|
|
|
Username = @"flyte",
|
|
|
|
|
Id = 3103765,
|
|
|
|
|
Country = new Country { FlagName = @"JP" },
|
|
|
|
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c1.jpg",
|
|
|
|
|
},
|
|
|
|
|
new User
|
|
|
|
|
{
|
|
|
|
|
Username = @"Cookiezi",
|
|
|
|
|
Id = 124493,
|
|
|
|
|
Country = new Country { FlagName = @"KR" },
|
|
|
|
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c2.jpg",
|
|
|
|
|
},
|
|
|
|
|
new User
|
|
|
|
|
{
|
|
|
|
|
Username = @"Angelsim",
|
|
|
|
|
Id = 1777162,
|
|
|
|
|
Country = new Country { FlagName = @"KR" },
|
|
|
|
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c3.jpg",
|
|
|
|
|
},
|
|
|
|
|
new User
|
|
|
|
|
{
|
|
|
|
|
Username = @"Rafis",
|
|
|
|
|
Id = 2558286,
|
|
|
|
|
Country = new Country { FlagName = @"PL" },
|
|
|
|
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c4.jpg",
|
|
|
|
|
},
|
|
|
|
|
new User
|
|
|
|
|
{
|
|
|
|
|
Username = @"hvick225",
|
|
|
|
|
Id = 50265,
|
|
|
|
|
Country = new Country { FlagName = @"TW" },
|
|
|
|
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c5.jpg",
|
|
|
|
|
},
|
|
|
|
|
new User
|
|
|
|
|
{
|
|
|
|
|
Username = @"peppy",
|
|
|
|
|
Id = 2,
|
|
|
|
|
Country = new Country { FlagName = @"AU" },
|
|
|
|
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c6.jpg"
|
|
|
|
|
},
|
|
|
|
|
new User
|
|
|
|
|
{
|
|
|
|
|
Username = @"filsdelama",
|
|
|
|
|
Id = 2831793,
|
|
|
|
|
Country = new Country { FlagName = @"FR" },
|
|
|
|
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c7.jpg"
|
|
|
|
|
},
|
|
|
|
|
new User
|
|
|
|
|
{
|
|
|
|
|
Username = @"_index",
|
|
|
|
|
Id = 652457,
|
|
|
|
|
Country = new Country { FlagName = @"RU" },
|
|
|
|
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c8.jpg"
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
Add(s);
|
|
|
|
|
|
|
|
|
|
AddStep(@"toggle", s.ToggleVisibility);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|