chore: stabilize Zhinian pilot delivery
This commit is contained in:
@@ -147,16 +147,20 @@ describe('WeCom plugin configuration', () => {
|
||||
await rm(testUserData, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
it('sets plugins.entries.wecom.enabled when saving wecom config', async () => {
|
||||
it('saves wecom as a built-in channel and keeps stale plugin registration disabled', async () => {
|
||||
const { saveChannelConfig } = await import('@electron/utils/channel-config');
|
||||
|
||||
await saveChannelConfig('wecom', { botId: 'test-bot', secret: 'test-secret' }, 'agent-a');
|
||||
|
||||
const config = await readOpenClawJson();
|
||||
const plugins = config.plugins as { allow: string[], entries: Record<string, { enabled?: boolean }> };
|
||||
|
||||
expect(plugins.allow).toContain('wecom');
|
||||
expect(plugins.entries['wecom'].enabled).toBe(true);
|
||||
const channels = config.channels as Record<string, { enabled?: boolean; accounts?: Record<string, { botId?: string; enabled?: boolean }> }>;
|
||||
|
||||
expect(channels.wecom.enabled).toBe(true);
|
||||
expect(channels.wecom.accounts?.['agent-a']).toMatchObject({
|
||||
botId: 'test-bot',
|
||||
enabled: true,
|
||||
});
|
||||
expect(config.plugins).toBeUndefined();
|
||||
});
|
||||
|
||||
it('saves whatsapp as a built-in channel instead of a plugin', async () => {
|
||||
|
||||
Reference in New Issue
Block a user