Skip to content

Commit 85e7430

Browse files
committed
test(platform-live): seed UUID workspaces and name the extension the panel serves
The credential contracts refuse a workspace id that is not a UUID, so the seeded workspaces could never list or rename a workspace credential. The extension panel serves only a deployment that names its extension, and the live group named none.
1 parent a538bd9 commit 85e7430

10 files changed

Lines changed: 16 additions & 13 deletions

File tree

‎.github/scripts/http-e2e.sh‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ platform_live_environment() {
178178
# The flags each held-back workspace tab needs besides `platform-preview`, which stays off as in
179179
# production: what the live suite finds hidden, `platform-preview` alone hides.
180180
export DASHBOARDS=true CHANGELOG=true WORKFLOW_TESTS=true
181+
# The extension panel serves only a deployment that names its extension (`boundaries.spec.ts`).
182+
export BROWSER_EXTENSION_IDS=abcdefghijklmnopabcdefghijklmnop
181183
export INTERNAL_API_SECRET=platform-live-ci-local-secret-at-least-32-characters
182184
export COPILOT_TOOL_PERMISSIONS_ENABLED=true
183185
export DB_TX_TRIPWIRE=throw

‎apps/sim/platform/checks/live/boundaries.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { memberEmail, organizationId, signIn, signInAsAdmin } from '@/platform/c
33
import { test } from '@/platform/checks/test'
44

55
/** Where the organization surface ends: workspace pages and the extension panel read none of Home. */
6-
const WORKSPACE_ID = 'platform-live-workspace-main'
6+
const WORKSPACE_ID = '5e1d7c3a-0b6f-4a2e-9c41-7d8e0f1a2b01'
77
const WORKSPACE_NAME = 'Operations'
88
/** The tabs every live workspace serves whatever the rollout flags say (`WORKSPACE_TABS`). */
99
const LIVE_WORKSPACE_TABS = ['Logs', 'Tables', 'Files', 'Knowledge bases', 'Workflows', 'Settings']

‎apps/sim/platform/checks/live/concealment.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { test } from '@/platform/checks/test'
1717
* (`.github/scripts/http-e2e.sh`), so whatever stays hidden here is hidden by `platform-preview`
1818
* alone.
1919
*/
20-
const WORKSPACE_ID = 'platform-live-workspace-main'
20+
const WORKSPACE_ID = '5e1d7c3a-0b6f-4a2e-9c41-7d8e0f1a2b01'
2121
const WORKSPACE_NAME = 'Operations'
2222
const PREVIEW_TABS = [
2323
['dashboards', 'Dashboard'],

‎apps/sim/platform/checks/live/flows.spec.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ test('a workspace pins and renames through its row menu', async ({ page }) => {
5858
// The seeded name is what every other check and a rerun look the workspace up by, and a pin
5959
// reorders the section every later check reads.
6060
await withLiveDatabase(async (sql) => {
61-
await sql`update workspace set name = 'Marketing' where id = 'platform-live-workspace-second'`
61+
await sql`update workspace set name = 'Marketing' where id = '5e1d7c3a-0b6f-4a2e-9c41-7d8e0f1a2b02'`
6262
await sql`delete from pinned_item where resource_type = 'workspace'
63-
and resource_id = 'platform-live-workspace-second'
63+
and resource_id = '5e1d7c3a-0b6f-4a2e-9c41-7d8e0f1a2b02'
6464
and user_id = (select id from "user" where email = ${adminEmail()})`
6565
})
6666
}

‎apps/sim/platform/checks/live/integrations.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { test } from '@/platform/checks/test'
1111
* adds a workspace credential for the same app, so the page has to join the member's app with the
1212
* workspace catalog's.
1313
*/
14-
const WORKSPACE_ID = 'platform-live-workspace-main'
14+
const WORKSPACE_ID = '5e1d7c3a-0b6f-4a2e-9c41-7d8e0f1a2b01'
1515
const connectedEmail = () => requireEnv('PLATFORM_LIVE_CONNECTED_EMAIL')
1616

1717
interface SeededCredential {

‎apps/sim/platform/checks/live/realtime.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { test } from '@/platform/checks/test'
66
* The realtime server the job starts beside the app (`.github/scripts/http-e2e.sh`). The workspace
77
* layout mounts the socket its tabs share; organization pages open none.
88
*/
9-
const WORKSPACE_PAGE = '/workspace/platform-live-workspace-main/workflows'
9+
const WORKSPACE_PAGE = '/workspace/5e1d7c3a-0b6f-4a2e-9c41-7d8e0f1a2b01/workflows'
1010

1111
/** Socket.IO acknowledges an authenticated connection with a `40` packet. */
1212
function trackSocketConnected(page: Page) {

‎apps/sim/platform/checks/live/redirects.spec.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import { liveRoute } from '@/platform/checks/routes'
1212
import { test } from '@/platform/checks/test'
1313

1414
/** Seeded workspaces (`scripts/platform-live-seed.ts`): one of the organization's, one outside it. */
15-
const WORKSPACE_ID = 'platform-live-workspace-main'
15+
const WORKSPACE_ID = '5e1d7c3a-0b6f-4a2e-9c41-7d8e0f1a2b01'
1616
const WORKSPACE = `/workspace/${WORKSPACE_ID}`
17-
const OUTSIDE_WORKSPACE = '/workspace/platform-live-workspace-outside'
17+
const OUTSIDE_WORKSPACE = '/workspace/5e1d7c3a-0b6f-4a2e-9c41-7d8e0f1a2b03'
1818
const SEEDED_CHAT = '11111111-1111-4111-8111-111111111111'
1919

2020
/** Saved links from before the product routes, each to where it now lands, query kept. */

‎apps/sim/platform/checks/live/self-hosted/surfaces.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { test } from '@/platform/checks/test'
99
* The product surface as a self-hoster gets it: billing off, so no section sells or bills, and
1010
* everything else the hosted suite walks still renders, redirects and answers in the same shell.
1111
*/
12-
const WORKSPACE_ID = 'platform-live-workspace-main'
12+
const WORKSPACE_ID = '5e1d7c3a-0b6f-4a2e-9c41-7d8e0f1a2b01'
1313
const WORKSPACE = `/workspace/${WORKSPACE_ID}`
1414

1515
test('a self-hosted shell renders every section a member uses', async ({ page }) => {

‎apps/sim/platform/checks/live/workflow-block-search.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { adminEmail, signInAsAdmin } from '@/platform/checks/live/session'
44
import { withLiveDatabase } from '@/platform/checks/live/support/database'
55
import { test } from '@/platform/checks/test'
66

7-
const WORKSPACE_ID = 'platform-live-workspace-main'
7+
const WORKSPACE_ID = '5e1d7c3a-0b6f-4a2e-9c41-7d8e0f1a2b01'
88

99
/**
1010
* Seeds a workflow with no blocks in the main workspace, owned by the administrator, opens its

‎apps/sim/scripts/platform-live-seed.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,13 @@ const EVERYONE = [
9090
{ id: NO_CHAT_ID, email: NO_CHAT_EMAIL, name: 'Noor Nochat' },
9191
]
9292
const allUserIds = EVERYONE.map(({ id }) => id)
93+
/** UUIDs, as the app mints them: the routes' contracts refuse any other workspace id. */
9394
const WORKSPACES = [
94-
{ id: 'platform-live-workspace-main', name: 'Operations' },
95-
{ id: 'platform-live-workspace-second', name: 'Marketing' },
95+
{ id: '5e1d7c3a-0b6f-4a2e-9c41-7d8e0f1a2b01', name: 'Operations' },
96+
{ id: '5e1d7c3a-0b6f-4a2e-9c41-7d8e0f1a2b02', name: 'Marketing' },
9697
] as const
9798
/** A workspace of the outside organization that no member of the seeded one can open. */
98-
const OUTSIDE_WORKSPACE_ID = 'platform-live-workspace-outside'
99+
const OUTSIDE_WORKSPACE_ID = '5e1d7c3a-0b6f-4a2e-9c41-7d8e0f1a2b03'
99100
const CHATS = [
100101
{
101102
id: '11111111-1111-4111-8111-111111111111',

0 commit comments

Comments
 (0)