mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Skip online test if user is not logged-in
This commit is contained in:
parent
d9d812a8fe
commit
bf9c6f8a3b
@ -12,6 +12,7 @@ using osu.Framework.Allocation;
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using osu.Game.Online.API;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Online
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
@ -29,6 +30,9 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
[Cached]
|
[Cached]
|
||||||
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
|
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private IAPIProvider api { get; set; }
|
||||||
|
|
||||||
private TestFriendsLayout layout;
|
private TestFriendsLayout layout;
|
||||||
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
@ -44,7 +48,8 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestOnline()
|
public void TestOnline()
|
||||||
{
|
{
|
||||||
AddUntilStep("Users loaded", () => layout?.StatusControl.Items.Any() ?? false);
|
// Skip online test if user is not logged-in
|
||||||
|
AddUntilStep("Users loaded", () => !api.IsLoggedIn || (layout?.StatusControl.Items.Any() ?? false));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user