mirror of
https://github.com/ppy/osu.git
synced 2024-12-05 10:33:22 +08:00
Fix failing test
This commit is contained in:
parent
aa1358b2b4
commit
53b390667a
@ -10,11 +10,13 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Online;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Overlays.Login;
|
using osu.Game.Overlays.Login;
|
||||||
using osu.Game.Overlays.Settings;
|
using osu.Game.Overlays.Settings;
|
||||||
|
using osu.Game.Tests.Visual.Online;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osu.Game.Users.Drawables;
|
using osu.Game.Users.Drawables;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
@ -31,6 +33,9 @@ namespace osu.Game.Tests.Visual.Menus
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private OsuConfigManager configManager { get; set; } = null!;
|
private OsuConfigManager configManager { get; set; } = null!;
|
||||||
|
|
||||||
|
[Cached(typeof(LocalUserStatisticsProvider))]
|
||||||
|
private readonly TestSceneUserPanel.TestUserStatisticsProvider statisticsProvider = new TestSceneUserPanel.TestUserStatisticsProvider();
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
@ -170,6 +175,7 @@ namespace osu.Game.Tests.Visual.Menus
|
|||||||
AddStep("enter code", () => loginOverlay.ChildrenOfType<OsuTextBox>().First().Text = "88800088");
|
AddStep("enter code", () => loginOverlay.ChildrenOfType<OsuTextBox>().First().Text = "88800088");
|
||||||
assertAPIState(APIState.Online);
|
assertAPIState(APIState.Online);
|
||||||
|
|
||||||
|
AddStep("feed statistics", () => statisticsProvider.UpdateStatistics(new UserStatistics(), Ruleset.Value));
|
||||||
AddStep("click on flag", () =>
|
AddStep("click on flag", () =>
|
||||||
{
|
{
|
||||||
InputManager.MoveMouseTo(loginOverlay.ChildrenOfType<UpdateableFlag>().First());
|
InputManager.MoveMouseTo(loginOverlay.ChildrenOfType<UpdateableFlag>().First());
|
||||||
|
@ -205,7 +205,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
public new TextFlowContainer LastVisitMessage => base.LastVisitMessage;
|
public new TextFlowContainer LastVisitMessage => base.LastVisitMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
private partial class TestUserStatisticsProvider : LocalUserStatisticsProvider
|
public partial class TestUserStatisticsProvider : LocalUserStatisticsProvider
|
||||||
{
|
{
|
||||||
public new void UpdateStatistics(UserStatistics newStatistics, RulesetInfo ruleset, Action<UserStatisticsUpdate>? callback = null)
|
public new void UpdateStatistics(UserStatistics newStatistics, RulesetInfo ruleset, Action<UserStatisticsUpdate>? callback = null)
|
||||||
=> base.UpdateStatistics(newStatistics, ruleset, callback);
|
=> base.UpdateStatistics(newStatistics, ruleset, callback);
|
||||||
|
Loading…
Reference in New Issue
Block a user