(options = {})
| 5873 | } |
| 5874 | |
| 5875 | async function getLoginAuthStateFromContent(options = {}) { |
| 5876 | const { logMessage = '步骤 7:认证页正在切换,等待页面重新就绪后继续确认验证码页状态...' } = options; |
| 5877 | const result = await sendToContentScriptResilient( |
| 5878 | 'signup-page', |
| 5879 | { |
| 5880 | type: 'GET_LOGIN_AUTH_STATE', |
| 5881 | source: 'background', |
| 5882 | payload: {}, |
| 5883 | }, |
| 5884 | { |
| 5885 | timeoutMs: 15000, |
| 5886 | retryDelayMs: 600, |
| 5887 | logMessage, |
| 5888 | } |
| 5889 | ); |
| 5890 | |
| 5891 | if (result?.error) { |
| 5892 | throw new Error(result.error); |
| 5893 | } |
| 5894 | |
| 5895 | return result || {}; |
| 5896 | } |
| 5897 | |
| 5898 | async function ensureStep7VerificationPageReady() { |
| 5899 | const pageState = await getLoginAuthStateFromContent(); |
no test coverage detected