Expose chat command metadata in snapshots
This commit is contained in:
1 parent
0b19a152e6
commit
d89bbf708e
13 files changed
+113
-24
No files matched your search
@@ -57,9 +57,10 @@ test("onboards, hires, and creates work in the Electron shell", async () => {
|
||||
await page.getByLabel("Topic").fill("Release coordination");
|
||||
await page.locator(".modal").getByRole("button", { name: "Create" }).click();
|
||||
await expect(page.getByText("release").first()).toBeVisible();
|
||||
await page.getByRole("textbox", { name: "Message" }).fill("Release channel opened.");
|
||||
await page.getByRole("textbox", { name: "Message" }).fill("/handoff @Board review release plan");
|
||||
await page.getByRole("button", { name: "Send" }).click();
|
||||
await expect(page.getByText("Release channel opened.")).toBeVisible();
|
||||
await expect(page.getByText("@Board").first()).toBeVisible();
|
||||
await expect(page.getByText("/handoff").first()).toBeVisible();
|
||||
|
||||
await page.getByRole("button", { name: "Social" }).click();
|
||||
await page.getByRole("button", { name: "Connect account" }).click();
|
||||
|
||||
@@ -235,6 +235,8 @@ describe("domain services", () => {
|
||||
expect(state.chatMessages).toHaveLength(1);
|
||||
expect(state.chatThreads).toHaveLength(1);
|
||||
expect(state.chatAttachments).toHaveLength(1);
|
||||
expect(state.chatMentions[0]).toMatchObject({ targetType: "board", targetId: orgId });
|
||||
expect(state.chatSlashInvocations[0]).toMatchObject({ command: "handoff" });
|
||||
expect(state.chatPresence).toHaveLength(1);
|
||||
const slash = connection.db.prepare("select command from chat_slash_invocations").get() as { command: string };
|
||||
const mention = connection.db.prepare("select target_type, target_id from chat_mentions").get() as { target_type: string; target_id: string };
|
||||
|
||||
Reference in new issue
Block a user