mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:20:43 +00:00
test: speed up subagent announce format e2e
This commit is contained in:
@@ -158,6 +158,55 @@ const defaultOutcomeAnnounce = {
|
||||
outcome: { status: "ok" } as const,
|
||||
};
|
||||
|
||||
const announceFormatChannelPlugins = [
|
||||
{
|
||||
pluginId: "discord",
|
||||
plugin: createChannelTestPluginBase({ id: "discord", label: "Discord" }),
|
||||
source: "test",
|
||||
},
|
||||
{
|
||||
pluginId: "slack",
|
||||
plugin: {
|
||||
...createChannelTestPluginBase({ id: "slack", label: "Slack" }),
|
||||
messaging: {
|
||||
resolveDeliveryTarget: (params: {
|
||||
conversationId: string;
|
||||
parentConversationId?: string;
|
||||
}) => ({
|
||||
to: `channel:${params.parentConversationId || params.conversationId}`,
|
||||
...(params.parentConversationId ? { threadId: params.conversationId } : {}),
|
||||
}),
|
||||
},
|
||||
},
|
||||
source: "test",
|
||||
},
|
||||
{
|
||||
pluginId: "matrix",
|
||||
plugin: createChannelTestPluginBase({ id: "matrix", label: "Matrix" }),
|
||||
source: "test",
|
||||
},
|
||||
{
|
||||
pluginId: "telegram",
|
||||
plugin: createChannelTestPluginBase({ id: "telegram", label: "Telegram" }),
|
||||
source: "test",
|
||||
},
|
||||
{
|
||||
pluginId: "whatsapp",
|
||||
plugin: createChannelTestPluginBase({ id: "whatsapp", label: "WhatsApp" }),
|
||||
source: "test",
|
||||
},
|
||||
{
|
||||
pluginId: "bluebubbles",
|
||||
plugin: createChannelTestPluginBase({ id: "bluebubbles", label: "BlueBubbles" }),
|
||||
source: "test",
|
||||
},
|
||||
{
|
||||
pluginId: "webchat",
|
||||
plugin: createChannelTestPluginBase({ id: "webchat", label: "Web Chat" }),
|
||||
source: "test",
|
||||
},
|
||||
];
|
||||
|
||||
function setConfigOverride(next: OpenClawConfig): void {
|
||||
configOverride = next;
|
||||
setRuntimeConfigSnapshot(configOverride);
|
||||
@@ -355,15 +404,7 @@ describe("subagent announce formatting", () => {
|
||||
});
|
||||
sessionStore = {};
|
||||
sessionBindingServiceTesting.resetSessionBindingAdaptersForTests();
|
||||
setActivePluginRegistry(
|
||||
createTestRegistry([
|
||||
{
|
||||
pluginId: "matrix",
|
||||
plugin: createChannelTestPluginBase({ id: "matrix", label: "Matrix" }),
|
||||
source: "test",
|
||||
},
|
||||
]),
|
||||
);
|
||||
setActivePluginRegistry(createTestRegistry(announceFormatChannelPlugins));
|
||||
setConfigOverride({
|
||||
session: {
|
||||
mainKey: "main",
|
||||
|
||||
Reference in New Issue
Block a user