33# CI groups, which reuse the production build from `e2e-build`.
44# The job extracts it into apps/sim/.next before running these suites.
55#
6- # Usage: http-e2e.sh <scim|cli|stop-after|desktop-inbox|project-files|mobile|seo> (run from apps/sim)
6+ # Usage: http-e2e.sh <scim|cli|stop-after|desktop-inbox|browser-extension| project-files|mobile|seo> (run from apps/sim)
77#
88# The job provides DATABASE_URL, BETTER_AUTH_SECRET and ENCRYPTION_KEY; each group sets the rest of
99# its app's environment here. Reports and server logs land in $RUNNER_TEMP/e2e.
2020# telemetry flush runs detached and still writes .next/dev).
2121set -euo pipefail
2222
23- group=${1:? usage: http-e2e.sh <scim|cli|stop-after|desktop-inbox|project-files|mobile|seo>}
23+ group=${1:? usage: http-e2e.sh <scim|cli|stop-after|desktop-inbox|browser-extension| project-files|mobile|seo>}
2424report_dir=" $RUNNER_TEMP /e2e"
2525ready_timeout_seconds=600
2626mkdir -p " $report_dir "
@@ -144,6 +144,7 @@ case "$group" in
144144 export INTERNAL_API_SECRET=scim-http-ci-local-secret-at-least-32-characters
145145 export DB_TX_TRIPWIRE=throw
146146 export NEXT_PUBLIC_CHAT_DISABLED=true
147+ export SIM_LINKS=true
147148 start_app scim 3017 SCIM record-http-status
148149 SCIM_E2E_BASE_URL=" $local_app_url " \
149150 SCIM_E2E_DATABASE_URL=" $DATABASE_URL " \
@@ -155,6 +156,11 @@ case "$group" in
155156 VERSION_COMPARE_E2E_AUTH_SECRET=" $BETTER_AUTH_SECRET " \
156157 VERSION_COMPARE_E2E_REPORT_PATH=" $report_dir /version-compare-http-report.json" \
157158 bun run test:workflow-version-compare:e2e
159+ SIM_LINKS_E2E_BASE_URL=" $local_app_url " \
160+ SIM_LINKS_E2E_DATABASE_URL=" $DATABASE_URL " \
161+ SIM_LINKS_E2E_AUTH_SECRET=" $BETTER_AUTH_SECRET " \
162+ SIM_LINKS_E2E_REPORT_PATH=" $report_dir /sim-links-e2e-report.json" \
163+ bun run test:sim-links:e2e
158164 ;;
159165
160166 # The search suites serve their own fixtures in-process and need no app. They share this group
@@ -198,11 +204,14 @@ case "$group" in
198204 ;;
199205
200206 # The desktop background executor's protocol: device registration, the SSE doorbell over Redis
201- # pub/sub, presence, leased claims, Stop and isolation. The only group whose app gets Redis.
207+ # pub/sub, presence, leased claims, Stop and isolation.
202208 desktop-inbox)
203209 export REDIS_URL=redis://127.0.0.1:6379
204210 export NEXT_PUBLIC_FORCE_HOSTED=false
205211 export COPILOT_TOOL_PERMISSIONS_ENABLED=true
212+ export KNOWLEDGE_MEMBER_ACCESS=true CREDENTIAL_GROUPS=true ACCESS_CONTROL_ENABLED=true
213+ export NEXT_PUBLIC_ACCESS_CONTROL_ENABLED=true NEXT_PUBLIC_ORGANIZATIONS_ENABLED=true
214+ bunx --no-install playwright install --with-deps chromium
206215 export INTERNAL_API_SECRET=desktop-inbox-http-ci-local-secret-at-least-32-characters
207216 export DB_TX_TRIPWIRE=throw
208217 start_app desktop-inbox 3019 ' desktop executor' record-http-status
@@ -212,6 +221,41 @@ case "$group" in
212221 DESKTOP_INBOX_E2E_AUTH_SECRET=" $BETTER_AUTH_SECRET " \
213222 DESKTOP_INBOX_E2E_REPORT_PATH=" $report_dir /desktop-inbox-http-report.json" \
214223 bun run test:desktop-inbox:e2e
224+ ASSISTANT_ACTIONS_E2E_BASE_URL=" $local_app_url " \
225+ ASSISTANT_ACTIONS_E2E_DATABASE_URL=" $DATABASE_URL " \
226+ ASSISTANT_ACTIONS_E2E_AUTH_SECRET=" $BETTER_AUTH_SECRET " \
227+ ASSISTANT_ACTIONS_E2E_REPORT_PATH=" $report_dir /assistant-actions-ui-report.json" \
228+ bun --no-env-file scripts/test-assistant-actions-e2e.ts
229+ ORGANIZATION_SEARCH_E2E_BASE_URL=" $local_app_url " \
230+ ORGANIZATION_SEARCH_E2E_DATABASE_URL=" $DATABASE_URL " \
231+ ORGANIZATION_SEARCH_E2E_AUTH_SECRET=" $BETTER_AUTH_SECRET " \
232+ ORGANIZATION_SEARCH_E2E_REPORT_PATH=" $report_dir /organization-search-ui-report.json" \
233+ bun --no-env-file scripts/test-organization-search-e2e.ts
234+ ;;
235+
236+ browser-extension)
237+ export REDIS_URL=redis://127.0.0.1:6379
238+ export NEXT_PUBLIC_FORCE_HOSTED=false
239+ export KNOWLEDGE_MEMBER_ACCESS=true CREDENTIAL_GROUPS=true ACCESS_CONTROL_ENABLED=true
240+ export NEXT_PUBLIC_ACCESS_CONTROL_ENABLED=true
241+ export API_ENCRYPTION_KEY=" $ENCRYPTION_KEY "
242+ bunx --no-install playwright install --with-deps chromium
243+ extension_identity=$( bun - << 'JS '
244+ import { generateKeyPairSync, createHash } from 'node:crypto'
245+ const { publicKey } = generateKeyPairSync('rsa', { modulusLength: 2048 })
246+ const der = publicKey.export({ type: 'spki', format: 'der' })
247+ const id = [...createHash('sha256').update(der).digest('hex').slice(0, 32)]
248+ .map(c => String.fromCharCode(97 + parseInt(c, 16))).join('')
249+ process.stdout.write(`${der.toString('base64')}\n${id}`)
250+ JS
251+ )
252+ export SIM_EXTENSION_KEY=" ${extension_identity%% $' \n ' * } "
253+ export BROWSER_EXTENSION_IDS=" ${extension_identity#* $' \n ' } "
254+ start_app browser-extension 3007 ' browser extension' record-http-status
255+ EXTENSION_APP_E2E_BASE_URL=" $local_app_url " \
256+ EXTENSION_APP_E2E_DATABASE_URL=" $DATABASE_URL " \
257+ EXTENSION_APP_E2E_REPORT_PATH=" $report_dir /browser-extension/report.json" \
258+ bun run test:browser-extension:e2e
215259 ;;
216260
217261 project-files)
0 commit comments