test(upserver): 归档存档迁移与玩法闭环回归工具
This commit is contained in:
16
CodexOutput/upserver/acceptance-exit-old-retry.cs
Normal file
16
CodexOutput/upserver/acceptance-exit-old-retry.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using asap.core;
|
||||
if (!UnityEngine.Application.isPlaying) return "Refused: not playing";
|
||||
var user = GContext.container.Resolve<game.IUserService>();
|
||||
var api = GContext.container.Resolve<ICustomServerMgr>();
|
||||
var button = UnityEngine.GameObject.Find("PFLoginAct(Clone)/reconnectDialog/Dialog/notice_reconnected/btn_retry/btn_green");
|
||||
if (user.IsAuthorized || button == null || user.CustomId != "not-an-id" || api.ApiBaseUri.AbsoluteUri != "http://s101.local:18080/") return "Refused: wrong failure dialog state";
|
||||
var oldRetryClick = button.GetComponent<UnityEngine.UI.Button>().onClick;
|
||||
var lifetime = user.LoginLifetime;
|
||||
game.QuitStage.Logout = true;
|
||||
await GContext.container.Resolve<IStageService>().SwitchStageAsync("QuitStage");
|
||||
await System.Threading.Tasks.Task.Delay(4500);
|
||||
oldRetryClick.Invoke();
|
||||
oldRetryClick.Invoke();
|
||||
await System.Threading.Tasks.Task.Delay(3000);
|
||||
var current = GContext.container.Resolve<game.IUserService>();
|
||||
return $"Scenario=old-retry; OldCancelled={lifetime.IsCancellationRequested}; OldAuthorized={user.IsAuthorized}; OldInternalId={user.InternalId}; OldCookieCount={api.Cookie.Count}; CurrentAuthorized={current?.IsAuthorized}; Scene={UnityEngine.SceneManagement.SceneManager.GetActiveScene().name}; OldRetryEventInvokedTwice=True";
|
||||
Reference in New Issue
Block a user