feat(agents): 支持个人微信发布与渠道会话
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
2026-09-13 16:22:36 +08:00
parent 03774d0625
commit 2e710db0fb
28 changed files with 2678 additions and 31 deletions

View File

@@ -80,6 +80,17 @@ it('keeps creation input and its uncertain operation when an existing card is cl
expect(api.create.mock.calls[1][0]).toEqual(api.create.mock.calls[0][0]);
});
it('guides an unconfirmed WeChat verification back to its code entry without claiming completion', async () => {
api.recovery.mockResolvedValue({ recent: null, pending: [{ id: 'wechat-code', operation: 'wechatBindVerification',
input: { slug: draft.slug, session_key: 'qr-session', operation_id: 'verify-operation' }, created_at: '2026-09-13T01:00:00Z' }] });
api.resolvePending.mockResolvedValue({ requires_input: true, operation: 'wechatBindVerification' });
open();
fireEvent.click(await screen.findByRole('button', { name: '重试并确认结果' }));
await screen.findByText(/这次微信验证还需要验证码/);
expect(screen.queryByText('微信连接验证的结果已确认。')).not.toBeInTheDocument();
expect(api.resolvePending).toHaveBeenCalledWith('wechat-code', false);
});
it('keeps the same creation operation after a lost response', async () => {
api.list.mockResolvedValue({ agents: [], next_cursor: null });
api.create.mockRejectedValueOnce(new Error('连接中断')).mockResolvedValueOnce(draft);