Fix CI issues

This commit is contained in:
Lucas A 2020-01-17 19:29:42 +01:00
parent f00938971e
commit e1f172e3f8
2 changed files with 8 additions and 21 deletions

View File

@ -18,8 +18,7 @@ namespace osu.Game.Tests.Visual.Online
[TestFixture] [TestFixture]
public class TestSceneOnlineViewContainer : OsuTestScene public class TestSceneOnlineViewContainer : OsuTestScene
{ {
private OnlineViewContainer onlineView; private readonly OnlineViewContainer onlineView;
private Box box;
public TestSceneOnlineViewContainer() public TestSceneOnlineViewContainer()
{ {
@ -31,7 +30,7 @@ namespace osu.Game.Tests.Visual.Online
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Children = new Drawable[] Children = new Drawable[]
{ {
box = new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = Color4.Blue.Opacity(0.8f), Colour = Color4.Blue.Opacity(0.8f),
@ -51,25 +50,13 @@ namespace osu.Game.Tests.Visual.Online
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
{ {
AddStep("set status to offline", () => AddStep("set status to offline", () => ((DummyAPIAccess)API).State = APIState.Offline);
{
(API as DummyAPIAccess).State = APIState.Offline;
});
AddAssert("children are hidden", () => AddAssert("children are hidden", () => !onlineView.Children.First().Parent.IsPresent);
{
return !onlineView.Children.First().Parent.IsPresent;
});
AddStep("set status to online", () => AddStep("set status to online", () => ((DummyAPIAccess)API).State = APIState.Online);
{
(API as DummyAPIAccess).State = APIState.Online;
});
AddAssert("children are visible", () => AddAssert("children are visible", () => onlineView.Children.First().Parent.IsPresent);
{
return onlineView.Children.First().Parent.IsPresent;
});
} }
} }
} }

View File

@ -62,13 +62,13 @@ namespace osu.Game.Online
{ {
if (showPlaceholder) if (showPlaceholder)
{ {
content.FadeOut(transform_time / 2, Easing.OutQuint); content.FadeOut(150, Easing.OutQuint);
placeholder.ScaleTo(0.8f).Then().ScaleTo(1, 3 * transform_time, Easing.OutQuint); placeholder.ScaleTo(0.8f).Then().ScaleTo(1, 3 * transform_time, Easing.OutQuint);
placeholderContainer.FadeInFromZero(2 * transform_time, Easing.OutQuint); placeholderContainer.FadeInFromZero(2 * transform_time, Easing.OutQuint);
} }
else else
{ {
placeholderContainer.FadeOut(transform_time / 2, Easing.OutQuint); placeholderContainer.FadeOut(150, Easing.OutQuint);
content.FadeIn(transform_time, Easing.OutQuint); content.FadeIn(transform_time, Easing.OutQuint);
} }
} }