From 2711a47fd7e915a3d44feaa5f86bfde718b5aa4f Mon Sep 17 00:00:00 2001 From: alexiscatnip Date: Thu, 21 Jul 2022 00:32:54 +0800 Subject: [PATCH] style: Login test beautify and reduce timings --- .../InputSubroutines/Login.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Assets/Tests/Raindrop/RaindropFullIntegrationTests/InputSubroutines/Login.cs b/Assets/Tests/Raindrop/RaindropFullIntegrationTests/InputSubroutines/Login.cs index 7c5fa40..4cafd54 100644 --- a/Assets/Tests/Raindrop/RaindropFullIntegrationTests/InputSubroutines/Login.cs +++ b/Assets/Tests/Raindrop/RaindropFullIntegrationTests/InputSubroutines/Login.cs @@ -85,21 +85,24 @@ namespace Raindrop.Tests.RaindropFullIntegrationTests.InputSubroutines yield return Login.StartLogin(username, password); // Assert.True(uiSrv._loadingController.IsVisible, "expected: loading screen is visible."); - yield return new WaitForSeconds(12); - - //for login successful, the loading will fade by itself. - //UIHelpers.Click_ButtonByUnityName("CloseLoadingScreenButton"); - yield return new WaitForSeconds(8); + + yield return new WaitForSeconds(10); Assert.False(uiSrv._loadingController.isInteractable, - $"login has failed for {gridFriendlyName}. the message is {instance.Client.Network.LoginMessage}, status code {instance.Client.Network.LoginStatusCode}"); + $"login has failed for {gridFriendlyName}. " + + $"the message is {instance.Client.Network.LoginMessage}, " + + $"status code {instance.Client.Network.LoginStatusCode}"); //assert the backend API; that we are logged in. - Assert.True(instance.Client.Network.Connected == true, "check API that we are logged in"); + Assert.True( + instance.Client.Network.Connected == true, + "checked API, we are not logged in."); //finally, disconnect. assert disconnected. UIHelpers.Click_ButtonByUnityName("LogoutBtn"); yield return new WaitForSeconds(10); - Assert.True(instance.Client.Network.Connected == false, "check API that we are logged out"); + Assert.True( + instance.Client.Network.Connected == false, + "check API that we are logged out"); yield return new WaitForSeconds(4); }