feat(agents): 支持个人微信发布与渠道会话
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user