test(web): add Composio Gmail E2E journey

This commit is contained in:
Anish Sarkar 2026-05-07 02:52:41 +05:30
parent f2e62a09b3
commit b01173fe07
5 changed files with 187 additions and 3 deletions

View file

@ -18,6 +18,7 @@ export const CANARY_TOKENS = {
driveBudget: "SURFSENSE_E2E_BUDGET_MARKER",
driveRoadmap: "SURFSENSE_E2E_ROADMAP_MARKER",
driveArchive: "SURFSENSE_E2E_ARCHIVE_MARKER",
gmailCanary: "SURFSENSE_E2E_CANARY_TOKEN_GMAIL_001",
} as const;
/**
@ -43,6 +44,27 @@ export const FAKE_DRIVE_FOLDERS = {
},
} as const;
/**
* Fake Gmail message IDs that match what the backend fake returns from
* GMAIL_FETCH_EMAILS / GMAIL_FETCH_MESSAGE_BY_MESSAGE_ID.
*/
export const FAKE_GMAIL_MESSAGES = {
canary: {
id: "fake-msg-canary-001",
threadId: "fake-thread-canary-001",
subject: "E2E Canary Email",
from: "sender@surfsense.example",
to: "e2e-fake@surfsense.example",
},
planning: {
id: "fake-msg-planning-001",
threadId: "fake-thread-planning-001",
subject: "E2E Planning Notes",
from: "planner@surfsense.example",
to: "e2e-fake@surfsense.example",
},
} as const;
/** Generate a unique-per-run search space name. Keeps parallel tests isolated. */
export function uniqueSearchSpaceName(prefix = "e2e"): string {
return `${prefix}-${randomUUID().slice(0, 8)}`;