fix(cloud-agents): 移除微信本人配对入口

This commit is contained in:
2026-09-13 23:24:08 +08:00
parent 4ca1f89a7e
commit 8c1b161d0e
8 changed files with 100 additions and 38 deletions

View File

@@ -85,9 +85,10 @@ test('own WeChat conversation approval and generated PPT delivery in the desktop
await expect.poll(async () => app.evaluate(() => (globalThis as typeof globalThis & { cloudChannelFixtureCalls: { operation: string; input: unknown }[] }).cloudChannelFixtureCalls.some(call => call.operation === 'wechatBindVerification'))).toBe(true);
if (await page.getByRole('button', { name: '关闭二维码', exact: true }).count()) await page.getByRole('button', { name: '关闭二维码', exact: true }).click();
await page.getByRole('button', { name: '使用权限', exact: true }).click();
await page.getByRole('button', { name: '生成本人配对码', exact: true }).click();
await expect(page.getByText('TEST1234', { exact: true })).toBeVisible();
await page.getByRole('button', { name: '隐藏', exact: true }).click();
await expect(page.getByText('使用绑定时扫码的微信,直接发送消息即可。', { exact: true })).toBeVisible();
await expect(page.getByRole('button', { name: '生成本人配对码', exact: true })).toHaveCount(0);
expect(await app.evaluate(() => (globalThis as typeof globalThis & { cloudChannelFixtureCalls: { operation: string }[] }).cloudChannelFixtureCalls.some(call => call.operation === 'createChannelPairing'))).toBe(false);
await page.screenshot({ path: testInfo.outputPath('wechat-access-without-pairing.png') });
await page.getByRole('button', { name: '连接微信', exact: true }).click();
await page.screenshot({ path: testInfo.outputPath('wechat-publication.png') });
await app.evaluate(({ BrowserWindow }) => { const win = BrowserWindow.getAllWindows()[0]; win.setMinimumSize(800, 600); win.setSize(980, 680); });