Skip to content

Commit 6066e87

Browse files
committed
test: tighten slack setup manifest assertion
1 parent 2d64ee0 commit 6066e87

1 file changed

Lines changed: 72 additions & 3 deletions

File tree

extensions/slack/src/setup-surface.test.ts

Lines changed: 72 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,78 @@ describe("slackSetupWizard.prepare", () => {
103103
expect(note).not.toHaveBeenCalled();
104104
const manifest = plain.mock.calls[0]?.[0];
105105
expect(typeof manifest).toBe("string");
106-
expect(JSON.parse(manifest)).toMatchObject({
107-
display_information: { name: "OpenClaw" },
108-
settings: { socket_mode_enabled: true },
106+
expect(JSON.parse(String(manifest))).toEqual({
107+
display_information: {
108+
name: "OpenClaw",
109+
description: "OpenClaw connector for OpenClaw",
110+
},
111+
features: {
112+
bot_user: {
113+
display_name: "OpenClaw",
114+
always_online: true,
115+
},
116+
app_home: {
117+
home_tab_enabled: true,
118+
messages_tab_enabled: true,
119+
messages_tab_read_only_enabled: false,
120+
},
121+
slash_commands: [
122+
{
123+
command: "/openclaw",
124+
description: "Send a message to OpenClaw",
125+
should_escape: false,
126+
},
127+
],
128+
},
129+
oauth_config: {
130+
scopes: {
131+
bot: [
132+
"app_mentions:read",
133+
"assistant:write",
134+
"channels:history",
135+
"channels:read",
136+
"chat:write",
137+
"commands",
138+
"emoji:read",
139+
"files:read",
140+
"files:write",
141+
"groups:history",
142+
"groups:read",
143+
"im:history",
144+
"im:read",
145+
"im:write",
146+
"mpim:history",
147+
"mpim:read",
148+
"mpim:write",
149+
"pins:read",
150+
"pins:write",
151+
"reactions:read",
152+
"reactions:write",
153+
"usergroups:read",
154+
"users:read",
155+
],
156+
},
157+
},
158+
settings: {
159+
socket_mode_enabled: true,
160+
event_subscriptions: {
161+
bot_events: [
162+
"app_home_opened",
163+
"app_mention",
164+
"channel_rename",
165+
"member_joined_channel",
166+
"member_left_channel",
167+
"message.channels",
168+
"message.groups",
169+
"message.im",
170+
"message.mpim",
171+
"pin_added",
172+
"pin_removed",
173+
"reaction_added",
174+
"reaction_removed",
175+
],
176+
},
177+
},
109178
});
110179
});
111180

0 commit comments

Comments
 (0)