mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 19:22:54 +08:00
Setup basic form flow
This commit is contained in:
parent
80c879e5eb
commit
e9d4cf2e24
@ -36,6 +36,19 @@ namespace osu.Game.Tests.Visual.Menus
|
||||
AddStep("show login overlay", () => loginOverlay.Show());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLoginTwoFactorSuccess()
|
||||
{
|
||||
AddStep("logout", () =>
|
||||
{
|
||||
API.Logout();
|
||||
((DummyAPIAccess)API).RequireTwoFactor();
|
||||
});
|
||||
|
||||
AddStep("enter password", () => loginOverlay.ChildrenOfType<OsuPasswordTextBox>().First().Text = "password");
|
||||
AddStep("submit", () => loginOverlay.ChildrenOfType<OsuButton>().First(b => b.Text.ToString() == "Sign in").TriggerClick());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLoginSuccess()
|
||||
{
|
||||
|
@ -21,6 +21,11 @@ using osu.Game.Localisation;
|
||||
|
||||
namespace osu.Game.Overlays.Login
|
||||
{
|
||||
public partial class AccountVerificationForm : FillFlowContainer
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public partial class LoginForm : FillFlowContainer
|
||||
{
|
||||
private TextBox username = null!;
|
||||
|
@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Login
|
||||
{
|
||||
private bool bounding = true;
|
||||
|
||||
private LoginForm? form;
|
||||
private Drawable? form;
|
||||
|
||||
[Resolved]
|
||||
private OsuColour colours { get; set; } = null!;
|
||||
@ -81,6 +81,10 @@ namespace osu.Game.Overlays.Login
|
||||
};
|
||||
break;
|
||||
|
||||
case APIState.RequiresAuthentication:
|
||||
Child = form = new AccountVerificationForm();
|
||||
break;
|
||||
|
||||
case APIState.Failing:
|
||||
case APIState.Connecting:
|
||||
LinkFlowContainer linkFlow;
|
||||
|
Loading…
Reference in New Issue
Block a user