2018-01-05 19:21:19 +08:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-09-18 21:32:49 +08:00
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2018-01-04 00:53:50 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2018-03-02 14:34:31 +08:00
|
|
|
|
using NUnit.Framework;
|
2017-09-18 21:32:49 +08:00
|
|
|
|
using osu.Game.Overlays;
|
2018-01-04 00:53:50 +08:00
|
|
|
|
using osu.Game.Overlays.Social;
|
2017-09-18 21:32:49 +08:00
|
|
|
|
using osu.Game.Users;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual
|
|
|
|
|
{
|
2018-03-02 14:34:31 +08:00
|
|
|
|
[TestFixture]
|
2017-09-18 21:32:49 +08:00
|
|
|
|
public class TestCaseSocial : OsuTestCase
|
|
|
|
|
{
|
2018-01-04 00:53:50 +08:00
|
|
|
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
|
|
|
|
{
|
2018-01-04 18:41:06 +08:00
|
|
|
|
typeof(UserPanel),
|
|
|
|
|
typeof(SocialPanel),
|
2018-01-04 00:53:50 +08:00
|
|
|
|
typeof(FilterControl),
|
2018-01-04 18:41:06 +08:00
|
|
|
|
typeof(SocialOverlay),
|
|
|
|
|
typeof(SocialGridPanel),
|
|
|
|
|
typeof(SocialListPanel)
|
2018-01-04 00:53:50 +08:00
|
|
|
|
};
|
|
|
|
|
|
2017-09-18 21:32:49 +08:00
|
|
|
|
public TestCaseSocial()
|
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|