mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:03:13 +08:00
Tidy up test reloading
This commit is contained in:
parent
4e7c30504f
commit
c11258a7e9
@ -9,6 +9,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
@ -21,6 +22,8 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
{
|
{
|
||||||
public class TestSceneCommentActions : OsuManualInputManagerTestScene
|
public class TestSceneCommentActions : OsuManualInputManagerTestScene
|
||||||
{
|
{
|
||||||
|
private Container<Drawable> content = null!;
|
||||||
|
protected override Container<Drawable> Content => content;
|
||||||
private DummyAPIAccess dummyAPI => (DummyAPIAccess)API;
|
private DummyAPIAccess dummyAPI => (DummyAPIAccess)API;
|
||||||
|
|
||||||
[Cached(typeof(IDialogOverlay))]
|
[Cached(typeof(IDialogOverlay))]
|
||||||
@ -31,22 +34,26 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
|
|
||||||
private CommentsContainer commentsContainer = null!;
|
private CommentsContainer commentsContainer = null!;
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
|
base.Content.AddRange(new Drawable[]
|
||||||
|
{
|
||||||
|
content = new OsuScrollContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both
|
||||||
|
},
|
||||||
|
dialogOverlay
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
[SetUpSteps]
|
[SetUpSteps]
|
||||||
public void SetUp()
|
public void SetUp()
|
||||||
{
|
{
|
||||||
Schedule(() =>
|
Schedule(() =>
|
||||||
{
|
{
|
||||||
API.Login("test", "test");
|
API.Login("test", "test");
|
||||||
if (dialogOverlay.Parent != null) Remove(dialogOverlay, false);
|
Child = commentsContainer = new CommentsContainer();
|
||||||
Children = new Container<Drawable>[]
|
|
||||||
{
|
|
||||||
new BasicScrollContainer
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
Child = commentsContainer = new CommentsContainer()
|
|
||||||
},
|
|
||||||
dialogOverlay
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user