|
| 1 | +/** |
| 2 | + * The organization `test-org-redesign-e2e.ts` runs against, shared with its seed: Enterprise, a |
| 3 | + * small admin team over a large group of members who cannot build, and made-up names throughout. |
| 4 | + */ |
| 5 | +export const ORGANIZATION_ID = 'org-redesign-organization' |
| 6 | +export const OUTSIDE_ORGANIZATION_ID = 'org-redesign-outside' |
| 7 | +export const ORGANIZATION_NAME = 'Ridgeline Outfitters' |
| 8 | +export const PASSWORD = 'org-redesign-password-1' |
| 9 | +export const LINK_COUNT = 183 |
| 10 | + |
| 11 | +const person = (key: string, name: string, role: 'owner' | 'admin' | 'member') => ({ |
| 12 | + key, |
| 13 | + name, |
| 14 | + role, |
| 15 | + userId: `org-redesign-user-${key}`, |
| 16 | + email: `${key}@org-redesign.test`, |
| 17 | + sessionToken: `org-redesign-session-${key}`, |
| 18 | +}) |
| 19 | + |
| 20 | +export const OWNER = person('owner', 'Olive Owner', 'owner') |
| 21 | +export const ADMIN = person('admin', 'Ada Admin', 'admin') |
| 22 | +/** Connected to nothing, the most common member today. */ |
| 23 | +export const MEMBER = person('member', 'Mia Member', 'member') |
| 24 | +/** A member of the same group with managed Google accounts. */ |
| 25 | +export const CONNECTED = person('connected', 'Cory Connected', 'member') |
| 26 | +/** A member of a much narrower group, with no workspaces. */ |
| 27 | +export const NARROW = person('narrow', 'Nia Narrow', 'member') |
| 28 | +/** Belongs to another organization only. */ |
| 29 | +export const OUTSIDER = person('outsider', 'Otto Outsider', 'owner') |
| 30 | + |
| 31 | +export const FILLERS = [ |
| 32 | + person('filler-1', 'Finn Fielding', 'member'), |
| 33 | + person('filler-2', 'Gwen Garza', 'member'), |
| 34 | + person('filler-3', 'Hugo Hale', 'member'), |
| 35 | + person('filler-4', 'Ivy Ingram', 'member'), |
| 36 | +] as const |
| 37 | + |
| 38 | +export const IN_ORGANIZATION = [OWNER, ADMIN, MEMBER, CONNECTED, NARROW, ...FILLERS] as const |
| 39 | +export const EVERYONE = [...IN_ORGANIZATION, OUTSIDER] as const |
| 40 | + |
| 41 | +export const STANDARD_GROUP_ID = 'org-redesign-group-standard' |
| 42 | +export const NARROW_GROUP_ID = 'org-redesign-group-narrow' |
| 43 | +export const FULL_GROUP_ID = 'org-redesign-group-full' |
| 44 | + |
| 45 | +/** The shape of the group most members belong to. */ |
| 46 | +export const STANDARD_GROUP_CONFIG = { |
| 47 | + disableInvitations: true, |
| 48 | + disableToolAutoApproval: true, |
| 49 | + disableLogExport: true, |
| 50 | + disablePublicApi: true, |
| 51 | + hideInboxTab: true, |
| 52 | + disablePersonalCredentials: false, |
| 53 | + disableWorkspaceCreation: false, |
| 54 | + hideOrgMemberDirectory: false, |
| 55 | + deniedModels: ['claude-opus-4-5', 'claude-fable-1'], |
| 56 | + allowedIntegrations: [ |
| 57 | + 'gmail_v2', |
| 58 | + 'google_calendar_v2', |
| 59 | + 'google_drive', |
| 60 | + 'slack_v2', |
| 61 | + 'jira', |
| 62 | + 'confluence_v2', |
| 63 | + 'gitlab', |
| 64 | + 'zoom', |
| 65 | + ], |
| 66 | + allowedKnowledgeConnectors: ['confluence', 'gitlab', 'slack', 'jira', 'jsm'], |
| 67 | +} |
| 68 | + |
| 69 | +export const NARROW_GROUP_CONFIG = { |
| 70 | + ...STANDARD_GROUP_CONFIG, |
| 71 | + allowedIntegrations: ['slack', 'slack_v2', 'managed_agent', 'api'], |
| 72 | + allowedKnowledgeConnectors: ['slack'], |
| 73 | +} |
| 74 | + |
| 75 | +/** Approved search sources; only `coda` and `lucid` hold a live-search policy. */ |
| 76 | +export const APPROVED_SOURCES = [ |
| 77 | + 'gmail', |
| 78 | + 'google_calendar', |
| 79 | + 'google_drive', |
| 80 | + 'jira', |
| 81 | + 'slack', |
| 82 | + 'confluence', |
| 83 | + 'gitlab', |
| 84 | + 'coda', |
| 85 | + 'lucid', |
| 86 | +] as const |
| 87 | + |
| 88 | +/** Credential group options a member can connect through. No Microsoft provider is on offer. */ |
| 89 | +export const CONNECTABLE_PROVIDERS = [ |
| 90 | + 'gmail', |
| 91 | + 'google-calendar', |
| 92 | + 'google-drive', |
| 93 | + 'jira', |
| 94 | + 'confluence', |
| 95 | +] as const |
| 96 | + |
| 97 | +export const GRANTS = { |
| 98 | + gmail: { credentialId: 'org-redesign-grant-gmail', providerId: 'google-email' }, |
| 99 | + 'google-calendar': { |
| 100 | + credentialId: 'org-redesign-grant-google-calendar', |
| 101 | + providerId: 'google-calendar', |
| 102 | + }, |
| 103 | +} as const |
| 104 | + |
| 105 | +const workspaceId = (slug: string) => `org-redesign-workspace-${slug}` |
| 106 | + |
| 107 | +/** More than one page of the rail's list, so its paging is on for an admin. */ |
| 108 | +export const WORKSPACES = [ |
| 109 | + { id: workspaceId('operations'), name: 'Operations' }, |
| 110 | + { id: workspaceId('marketing'), name: 'Marketing' }, |
| 111 | + { id: workspaceId('service'), name: 'Service Desk' }, |
| 112 | + { id: workspaceId('parts'), name: 'Parts Catalog' }, |
| 113 | + { id: workspaceId('finance'), name: 'Finance' }, |
| 114 | + { id: workspaceId('fleet'), name: 'Fleet' }, |
| 115 | + { id: workspaceId('training'), name: 'Training' }, |
| 116 | +] as const |
| 117 | +export const MEMBER_ADMIN_WORKSPACE = WORKSPACES[0] |
| 118 | +export const MEMBER_WRITE_WORKSPACE = WORKSPACES[1] |
| 119 | + |
| 120 | +const uuid = (digit: string) => |
| 121 | + `${digit.repeat(8)}-${digit.repeat(4)}-4${digit.repeat(3)}-8${digit.repeat(3)}-${digit.repeat(12)}` |
| 122 | + |
| 123 | +/** The member's chats: assistant ones live under Search, and an agent one they can no longer open. */ |
| 124 | +export const MEMBER_CHATS = { |
| 125 | + assistant: { id: uuid('1'), title: 'Warranty coverage', mode: 'assistant', seen: true }, |
| 126 | + unread: { id: uuid('2'), title: 'Dealer onboarding', mode: 'assistant', seen: false }, |
| 127 | + removable: { id: uuid('3'), title: 'Old parts question', mode: 'assistant', seen: true }, |
| 128 | + bulkOne: { id: uuid('4'), title: 'Bulk removal one', mode: 'assistant', seen: true }, |
| 129 | + bulkTwo: { id: uuid('5'), title: 'Bulk removal two', mode: 'assistant', seen: true }, |
| 130 | + agent: { id: uuid('6'), title: 'Agent from before', mode: 'agent', seen: true }, |
| 131 | +} as const |
| 132 | + |
| 133 | +export const ADMIN_CHATS = { |
| 134 | + agent: { id: uuid('7'), title: 'Quarterly review', mode: 'agent', seen: true }, |
| 135 | + assistant: { id: uuid('8'), title: 'Vendor renewals', mode: 'assistant', seen: false }, |
| 136 | + deleted: { id: uuid('9'), title: 'Retired plan', mode: 'agent', seen: true }, |
| 137 | +} as const |
| 138 | + |
| 139 | +/** Recognizable rows in the 183, beside the numbered ones. */ |
| 140 | +export const NAMED_LINKS = { |
| 141 | + handbook: { name: 'handbook', url: 'https://example.com/handbook', description: 'The handbook' }, |
| 142 | + restricted: { name: 'payroll', url: 'https://payroll.example.com', description: 'Pay stubs' }, |
| 143 | + unlisted: { name: 'skunkworks', url: 'https://skunk.example.com', description: 'Quiet project' }, |
| 144 | + variable: { |
| 145 | + name: 'ticket', |
| 146 | + url: 'https://tickets.example.com/browse/{*}', |
| 147 | + description: 'Open a ticket', |
| 148 | + }, |
| 149 | + mostUsed: { name: 'timesheet', url: 'https://time.example.com', description: 'Weekly hours' }, |
| 150 | +} as const |
| 151 | + |
| 152 | +export const SEEDED_SOURCE = { |
| 153 | + url: 'https://docs.example.com/service-bulletin', |
| 154 | + title: 'Service bulletin', |
| 155 | + query: 'service bulletin', |
| 156 | +} |
0 commit comments