mirror of
https://github.com/osukey/osukey.git
synced 2025-05-05 05:37:18 +09:00
Add test case for UserPage.
This commit is contained in:
parent
159e8d84c2
commit
1b8ef3bbbd
38
osu.Desktop.VisualTests/Tests/TestCaseUserPage.cs
Normal file
38
osu.Desktop.VisualTests/Tests/TestCaseUserPage.cs
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Testing;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
using osu.Game.Users;
|
||||||
|
|
||||||
|
namespace osu.Desktop.VisualTests.Tests
|
||||||
|
{
|
||||||
|
internal class TestCaseUserPage : TestCase
|
||||||
|
{
|
||||||
|
public override void Reset()
|
||||||
|
{
|
||||||
|
base.Reset();
|
||||||
|
var userpage = new UserPageOverlay(new User
|
||||||
|
{
|
||||||
|
Username = @"peppy",
|
||||||
|
Id = 2,
|
||||||
|
Country = new Country { FlagName = @"AU" },
|
||||||
|
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c3.jpg"
|
||||||
|
})
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Width = 800,
|
||||||
|
Height = 500
|
||||||
|
};
|
||||||
|
Add(userpage);
|
||||||
|
AddStep("Toggle", userpage.ToggleVisibility);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -210,6 +210,7 @@
|
|||||||
<Compile Include="Tests\TestCasePlaySongSelect.cs" />
|
<Compile Include="Tests\TestCasePlaySongSelect.cs" />
|
||||||
<Compile Include="Tests\TestCaseTooltip.cs" />
|
<Compile Include="Tests\TestCaseTooltip.cs" />
|
||||||
<Compile Include="Tests\TestCaseTwoLayerButton.cs" />
|
<Compile Include="Tests\TestCaseTwoLayerButton.cs" />
|
||||||
|
<Compile Include="Tests\TestCaseUserPage.cs" />
|
||||||
<Compile Include="VisualTestGame.cs" />
|
<Compile Include="VisualTestGame.cs" />
|
||||||
<Compile Include="Platform\TestStorage.cs" />
|
<Compile Include="Platform\TestStorage.cs" />
|
||||||
<Compile Include="Tests\TestCaseSettings.cs" />
|
<Compile Include="Tests\TestCaseSettings.cs" />
|
||||||
|
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
@ -24,6 +25,7 @@ namespace osu.Game.Users
|
|||||||
var sections = new UserPageSection[] { };
|
var sections = new UserPageSection[] { };
|
||||||
var sectionsContainer = new SectionsContainer
|
var sectionsContainer = new SectionsContainer
|
||||||
{
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
ExpandableHeader = new UserPageHeader(user),
|
ExpandableHeader = new UserPageHeader(user),
|
||||||
FixedHeader = tab,
|
FixedHeader = tab,
|
||||||
Sections = sections
|
Sections = sections
|
||||||
|
Loading…
x
Reference in New Issue
Block a user