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

View File

@ -62,13 +62,13 @@ private void updatePlaceholderVisibility(bool 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);
placeholderContainer.FadeInFromZero(2 * transform_time, Easing.OutQuint);
}
else
{
placeholderContainer.FadeOut(transform_time / 2, Easing.OutQuint);
placeholderContainer.FadeOut(150, Easing.OutQuint);
content.FadeIn(transform_time, Easing.OutQuint);
}
}