mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:33:20 +08:00
Fix test not working for various reasons
This commit is contained in:
parent
3da2cdfd05
commit
f1fd40dcca
@ -40,8 +40,6 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
API.Logout();
|
|
||||||
|
|
||||||
localUser = API.LocalUser.GetBoundCopy();
|
localUser = API.LocalUser.GetBoundCopy();
|
||||||
localUser.BindValueChanged(user => { userPanelArea.Child = new UserGridPanel(user.NewValue) { Width = 200 }; }, true);
|
localUser.BindValueChanged(user => { userPanelArea.Child = new UserGridPanel(user.NewValue) { Width = 200 }; }, true);
|
||||||
}
|
}
|
||||||
@ -50,13 +48,13 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
public void TestOverlayVisibility()
|
public void TestOverlayVisibility()
|
||||||
{
|
{
|
||||||
AddStep("start hidden", () => accountCreation.Hide());
|
AddStep("start hidden", () => accountCreation.Hide());
|
||||||
AddStep("log out", API.Logout);
|
AddStep("log out", () => API.Logout());
|
||||||
|
|
||||||
AddStep("show manually", () => accountCreation.Show());
|
AddStep("show manually", () => accountCreation.Show());
|
||||||
AddUntilStep("overlay is visible", () => accountCreation.State.Value == Visibility.Visible);
|
AddUntilStep("overlay is visible", () => accountCreation.State.Value == Visibility.Visible);
|
||||||
|
|
||||||
AddStep("click button", () => accountCreation.ChildrenOfType<SettingsButton>().Single().Click());
|
AddStep("click button", () => accountCreation.ChildrenOfType<SettingsButton>().Single().Click());
|
||||||
AddUntilStep("warning screen is present", () => accountCreation.ChildrenOfType<ScreenWarning>().Single().IsPresent);
|
AddUntilStep("warning screen is present", () => accountCreation.ChildrenOfType<ScreenWarning>().SingleOrDefault()?.IsPresent == true);
|
||||||
|
|
||||||
AddStep("log back in", () => API.Login("dummy", "password"));
|
AddStep("log back in", () => API.Login("dummy", "password"));
|
||||||
AddUntilStep("overlay is hidden", () => accountCreation.State.Value == Visibility.Hidden);
|
AddUntilStep("overlay is hidden", () => accountCreation.State.Value == Visibility.Hidden);
|
||||||
|
Loading…
Reference in New Issue
Block a user