@essential-apps/shopify-test-runner 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/dist/contracts/normalize.d.ts +61 -0
  2. package/dist/contracts/normalize.d.ts.map +1 -0
  3. package/dist/contracts/normalize.js +99 -0
  4. package/dist/contracts/normalize.js.map +1 -0
  5. package/dist/contracts/normalizeHtml.d.ts +37 -0
  6. package/dist/contracts/normalizeHtml.d.ts.map +1 -0
  7. package/dist/contracts/normalizeHtml.js +89 -0
  8. package/dist/contracts/normalizeHtml.js.map +1 -0
  9. package/dist/edge/cert.d.ts +44 -0
  10. package/dist/edge/cert.d.ts.map +1 -0
  11. package/dist/edge/cert.js +117 -0
  12. package/dist/edge/cert.js.map +1 -0
  13. package/dist/edge/edgeProxy.d.ts +43 -0
  14. package/dist/edge/edgeProxy.d.ts.map +1 -0
  15. package/dist/edge/edgeProxy.js +297 -0
  16. package/dist/edge/edgeProxy.js.map +1 -0
  17. package/dist/edge/nodeShim.d.ts +2 -0
  18. package/dist/edge/nodeShim.d.ts.map +1 -0
  19. package/dist/edge/nodeShim.js +217 -0
  20. package/dist/edge/nodeShim.js.map +1 -0
  21. package/dist/index.d.ts +39 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +36 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/lib/buildSourceBundle.d.ts +56 -0
  26. package/dist/lib/buildSourceBundle.d.ts.map +1 -0
  27. package/dist/lib/buildSourceBundle.js +153 -0
  28. package/dist/lib/buildSourceBundle.js.map +1 -0
  29. package/dist/lib/freePort.d.ts +5 -0
  30. package/dist/lib/freePort.d.ts.map +1 -0
  31. package/dist/lib/freePort.js +33 -0
  32. package/dist/lib/freePort.js.map +1 -0
  33. package/dist/lib/functionBuild.d.ts +99 -0
  34. package/dist/lib/functionBuild.d.ts.map +1 -0
  35. package/dist/lib/functionBuild.js +413 -0
  36. package/dist/lib/functionBuild.js.map +1 -0
  37. package/dist/lib/neonWsProxy.d.ts +41 -0
  38. package/dist/lib/neonWsProxy.d.ts.map +1 -0
  39. package/dist/lib/neonWsProxy.js +101 -0
  40. package/dist/lib/neonWsProxy.js.map +1 -0
  41. package/dist/lib/sourceZipUpload.d.ts +45 -0
  42. package/dist/lib/sourceZipUpload.d.ts.map +1 -0
  43. package/dist/lib/sourceZipUpload.js +129 -0
  44. package/dist/lib/sourceZipUpload.js.map +1 -0
  45. package/dist/lib/stealthLaunch.d.ts +35 -0
  46. package/dist/lib/stealthLaunch.d.ts.map +1 -0
  47. package/dist/lib/stealthLaunch.js +46 -0
  48. package/dist/lib/stealthLaunch.js.map +1 -0
  49. package/dist/lib/storeAutomation.d.ts +22 -0
  50. package/dist/lib/storeAutomation.d.ts.map +1 -0
  51. package/dist/lib/storeAutomation.js +85 -0
  52. package/dist/lib/storeAutomation.js.map +1 -0
  53. package/dist/playwright/baseConfig.d.ts +62 -0
  54. package/dist/playwright/baseConfig.d.ts.map +1 -0
  55. package/dist/playwright/baseConfig.js +68 -0
  56. package/dist/playwright/baseConfig.js.map +1 -0
  57. package/dist/playwright/globalSetup.d.ts +2 -0
  58. package/dist/playwright/globalSetup.d.ts.map +1 -0
  59. package/dist/playwright/globalSetup.js +139 -0
  60. package/dist/playwright/globalSetup.js.map +1 -0
  61. package/dist/playwright/index.d.ts +9 -0
  62. package/dist/playwright/index.d.ts.map +1 -0
  63. package/dist/playwright/index.js +9 -0
  64. package/dist/playwright/index.js.map +1 -0
  65. package/dist/probes/fonts.d.ts +4 -0
  66. package/dist/probes/fonts.d.ts.map +1 -0
  67. package/dist/probes/fonts.js +255 -0
  68. package/dist/probes/fonts.js.map +1 -0
  69. package/dist/probes/mirror.d.ts +4 -0
  70. package/dist/probes/mirror.d.ts.map +1 -0
  71. package/dist/probes/mirror.js +260 -0
  72. package/dist/probes/mirror.js.map +1 -0
  73. package/dist/probes/runProbe.d.ts +3 -0
  74. package/dist/probes/runProbe.d.ts.map +1 -0
  75. package/dist/probes/runProbe.js +219 -0
  76. package/dist/probes/runProbe.js.map +1 -0
  77. package/dist/probes/types.d.ts +72 -0
  78. package/dist/probes/types.d.ts.map +1 -0
  79. package/dist/probes/types.js +2 -0
  80. package/dist/probes/types.js.map +1 -0
  81. package/dist/scripts/_probeSourceUrl.d.ts +3 -0
  82. package/dist/scripts/_probeSourceUrl.d.ts.map +1 -0
  83. package/dist/scripts/_probeSourceUrl.js +119 -0
  84. package/dist/scripts/_probeSourceUrl.js.map +1 -0
  85. package/dist/scripts/addStore.d.ts +3 -0
  86. package/dist/scripts/addStore.d.ts.map +1 -0
  87. package/dist/scripts/addStore.js +46 -0
  88. package/dist/scripts/addStore.js.map +1 -0
  89. package/dist/scripts/buildDockerImage.d.ts +3 -0
  90. package/dist/scripts/buildDockerImage.d.ts.map +1 -0
  91. package/dist/scripts/buildDockerImage.js +60 -0
  92. package/dist/scripts/buildDockerImage.js.map +1 -0
  93. package/dist/scripts/captureAuth.d.ts +3 -0
  94. package/dist/scripts/captureAuth.d.ts.map +1 -0
  95. package/dist/scripts/captureAuth.js +124 -0
  96. package/dist/scripts/captureAuth.js.map +1 -0
  97. package/dist/scripts/captureContracts.d.ts +3 -0
  98. package/dist/scripts/captureContracts.d.ts.map +1 -0
  99. package/dist/scripts/captureContracts.js +517 -0
  100. package/dist/scripts/captureContracts.js.map +1 -0
  101. package/dist/scripts/captureRestContracts.d.ts +3 -0
  102. package/dist/scripts/captureRestContracts.d.ts.map +1 -0
  103. package/dist/scripts/captureRestContracts.js +245 -0
  104. package/dist/scripts/captureRestContracts.js.map +1 -0
  105. package/dist/scripts/checkOperationCoverage.d.ts +3 -0
  106. package/dist/scripts/checkOperationCoverage.d.ts.map +1 -0
  107. package/dist/scripts/checkOperationCoverage.js +302 -0
  108. package/dist/scripts/checkOperationCoverage.js.map +1 -0
  109. package/dist/scripts/cleanupStores.d.ts +3 -0
  110. package/dist/scripts/cleanupStores.d.ts.map +1 -0
  111. package/dist/scripts/cleanupStores.js +77 -0
  112. package/dist/scripts/cleanupStores.js.map +1 -0
  113. package/dist/scripts/createStores.d.ts +3 -0
  114. package/dist/scripts/createStores.d.ts.map +1 -0
  115. package/dist/scripts/createStores.js +66 -0
  116. package/dist/scripts/createStores.js.map +1 -0
  117. package/dist/scripts/deployAppVersion.d.ts +3 -0
  118. package/dist/scripts/deployAppVersion.d.ts.map +1 -0
  119. package/dist/scripts/deployAppVersion.js +591 -0
  120. package/dist/scripts/deployAppVersion.js.map +1 -0
  121. package/dist/scripts/devE2eBackend.d.ts +3 -0
  122. package/dist/scripts/devE2eBackend.d.ts.map +1 -0
  123. package/dist/scripts/devE2eBackend.js +117 -0
  124. package/dist/scripts/devE2eBackend.js.map +1 -0
  125. package/dist/scripts/devOnlineBackend.d.ts +3 -0
  126. package/dist/scripts/devOnlineBackend.d.ts.map +1 -0
  127. package/dist/scripts/devOnlineBackend.js +117 -0
  128. package/dist/scripts/devOnlineBackend.js.map +1 -0
  129. package/dist/scripts/installApp.d.ts +3 -0
  130. package/dist/scripts/installApp.d.ts.map +1 -0
  131. package/dist/scripts/installApp.js +163 -0
  132. package/dist/scripts/installApp.js.map +1 -0
  133. package/dist/scripts/listStores.d.ts +3 -0
  134. package/dist/scripts/listStores.d.ts.map +1 -0
  135. package/dist/scripts/listStores.js +18 -0
  136. package/dist/scripts/listStores.js.map +1 -0
  137. package/dist/scripts/runDocker.d.ts +3 -0
  138. package/dist/scripts/runDocker.d.ts.map +1 -0
  139. package/dist/scripts/runDocker.js +88 -0
  140. package/dist/scripts/runDocker.js.map +1 -0
  141. package/dist/scripts/runDockerAuth.d.ts +3 -0
  142. package/dist/scripts/runDockerAuth.d.ts.map +1 -0
  143. package/dist/scripts/runDockerAuth.js +108 -0
  144. package/dist/scripts/runDockerAuth.js.map +1 -0
  145. package/dist/scripts/runDockerOffline.d.ts +3 -0
  146. package/dist/scripts/runDockerOffline.d.ts.map +1 -0
  147. package/dist/scripts/runDockerOffline.js +129 -0
  148. package/dist/scripts/runDockerOffline.js.map +1 -0
  149. package/dist/scripts/runDockerOfflineExplore.d.ts +3 -0
  150. package/dist/scripts/runDockerOfflineExplore.d.ts.map +1 -0
  151. package/dist/scripts/runDockerOfflineExplore.js +116 -0
  152. package/dist/scripts/runDockerOfflineExplore.js.map +1 -0
  153. package/dist/scripts/runIsolatedDockerOffline.d.ts +3 -0
  154. package/dist/scripts/runIsolatedDockerOffline.d.ts.map +1 -0
  155. package/dist/scripts/runIsolatedDockerOffline.js +351 -0
  156. package/dist/scripts/runIsolatedDockerOffline.js.map +1 -0
  157. package/dist/scripts/runOffline.d.ts +3 -0
  158. package/dist/scripts/runOffline.d.ts.map +1 -0
  159. package/dist/scripts/runOffline.js +521 -0
  160. package/dist/scripts/runOffline.js.map +1 -0
  161. package/dist/scripts/runOfflineE2e.d.ts +3 -0
  162. package/dist/scripts/runOfflineE2e.d.ts.map +1 -0
  163. package/dist/scripts/runOfflineE2e.js +408 -0
  164. package/dist/scripts/runOfflineE2e.js.map +1 -0
  165. package/dist/scripts/runOfflineFullTests.d.ts +3 -0
  166. package/dist/scripts/runOfflineFullTests.d.ts.map +1 -0
  167. package/dist/scripts/runOfflineFullTests.js +1456 -0
  168. package/dist/scripts/runOfflineFullTests.js.map +1 -0
  169. package/dist/scripts/runSupermachine.d.ts +3 -0
  170. package/dist/scripts/runSupermachine.d.ts.map +1 -0
  171. package/dist/scripts/runSupermachine.js +474 -0
  172. package/dist/scripts/runSupermachine.js.map +1 -0
  173. package/dist/scripts/runSupermachineAuth.d.ts +3 -0
  174. package/dist/scripts/runSupermachineAuth.d.ts.map +1 -0
  175. package/dist/scripts/runSupermachineAuth.js +454 -0
  176. package/dist/scripts/runSupermachineAuth.js.map +1 -0
  177. package/dist/scripts/runTests.d.ts +3 -0
  178. package/dist/scripts/runTests.d.ts.map +1 -0
  179. package/dist/scripts/runTests.js +278 -0
  180. package/dist/scripts/runTests.js.map +1 -0
  181. package/dist/scripts/runVm.d.ts +3 -0
  182. package/dist/scripts/runVm.d.ts.map +1 -0
  183. package/dist/scripts/runVm.js +524 -0
  184. package/dist/scripts/runVm.js.map +1 -0
  185. package/dist/scripts/runVmAuth.d.ts +3 -0
  186. package/dist/scripts/runVmAuth.d.ts.map +1 -0
  187. package/dist/scripts/runVmAuth.js +475 -0
  188. package/dist/scripts/runVmAuth.js.map +1 -0
  189. package/dist/scripts/runVmScript.d.ts +3 -0
  190. package/dist/scripts/runVmScript.d.ts.map +1 -0
  191. package/dist/scripts/runVmScript.js +242 -0
  192. package/dist/scripts/runVmScript.js.map +1 -0
  193. package/dist/scripts/setupTestDb.d.ts +3 -0
  194. package/dist/scripts/setupTestDb.d.ts.map +1 -0
  195. package/dist/scripts/setupTestDb.js +61 -0
  196. package/dist/scripts/setupTestDb.js.map +1 -0
  197. package/dist/scripts/verifyContracts.d.ts +3 -0
  198. package/dist/scripts/verifyContracts.d.ts.map +1 -0
  199. package/dist/scripts/verifyContracts.js +258 -0
  200. package/dist/scripts/verifyContracts.js.map +1 -0
  201. package/dist/scripts/verifyRestContracts.d.ts +3 -0
  202. package/dist/scripts/verifyRestContracts.d.ts.map +1 -0
  203. package/dist/scripts/verifyRestContracts.js +237 -0
  204. package/dist/scripts/verifyRestContracts.js.map +1 -0
  205. package/dist/vite/offlineConfig.d.ts +34 -0
  206. package/dist/vite/offlineConfig.d.ts.map +1 -0
  207. package/dist/vite/offlineConfig.js +61 -0
  208. package/dist/vite/offlineConfig.js.map +1 -0
  209. package/dist/vite/onlineConfig.d.ts +42 -0
  210. package/dist/vite/onlineConfig.d.ts.map +1 -0
  211. package/dist/vite/onlineConfig.js +56 -0
  212. package/dist/vite/onlineConfig.js.map +1 -0
  213. package/docker/Dockerfile +67 -0
  214. package/docker/Dockerfile.vm +137 -0
  215. package/docker/README.md +50 -0
  216. package/docker/entrypoint.sh +198 -0
  217. package/package.json +85 -0
  218. package/src/contracts/normalize.ts +96 -0
  219. package/src/contracts/normalizeHtml.ts +98 -0
  220. package/src/edge/ca.cnf +14 -0
  221. package/src/edge/ca.crt +22 -0
  222. package/src/edge/ca.key +28 -0
  223. package/src/edge/cert.ts +117 -0
  224. package/src/edge/edgeProxy.ts +390 -0
  225. package/src/edge/server.cnf +28 -0
  226. package/src/edge/server.crt +26 -0
  227. package/src/edge/server.key +28 -0
  228. package/src/index.ts +67 -0
  229. package/src/lib/buildSourceBundle.ts +197 -0
  230. package/src/lib/freePort.ts +33 -0
  231. package/src/lib/functionBuild.ts +490 -0
  232. package/src/lib/neonWsProxy.ts +124 -0
  233. package/src/lib/sourceZipUpload.ts +168 -0
  234. package/src/lib/stealthLaunch.ts +57 -0
  235. package/src/lib/storeAutomation.ts +110 -0
  236. package/src/playwright/baseConfig.ts +120 -0
  237. package/src/playwright/globalSetup.ts +179 -0
  238. package/src/playwright/index.ts +11 -0
  239. package/src/probes/fonts.ts +279 -0
  240. package/src/probes/mirror.ts +283 -0
  241. package/src/probes/runProbe.ts +257 -0
  242. package/src/probes/types.ts +73 -0
  243. package/src/scripts/addStore.ts +59 -0
  244. package/src/scripts/buildDockerImage.ts +66 -0
  245. package/src/scripts/captureAuth.ts +145 -0
  246. package/src/scripts/captureContracts.ts +675 -0
  247. package/src/scripts/captureRestContracts.ts +319 -0
  248. package/src/scripts/checkOperationCoverage.ts +365 -0
  249. package/src/scripts/cleanupStores.ts +91 -0
  250. package/src/scripts/createStores.ts +77 -0
  251. package/src/scripts/deployAppVersion.ts +692 -0
  252. package/src/scripts/devOnlineBackend.ts +141 -0
  253. package/src/scripts/installApp.ts +188 -0
  254. package/src/scripts/listStores.ts +19 -0
  255. package/src/scripts/runDockerAuth.ts +120 -0
  256. package/src/scripts/runOffline.ts +577 -0
  257. package/src/scripts/runOfflineFullTests.ts +1634 -0
  258. package/src/scripts/runTests.ts +306 -0
  259. package/src/scripts/runVm.ts +562 -0
  260. package/src/scripts/runVmAuth.ts +541 -0
  261. package/src/scripts/runVmScript.ts +282 -0
  262. package/src/scripts/setupTestDb.ts +71 -0
  263. package/src/scripts/verifyContracts.ts +310 -0
  264. package/src/scripts/verifyRestContracts.ts +275 -0
  265. package/src/vite/onlineConfig.ts +60 -0
@@ -0,0 +1,278 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Run the in-container online suite: spin up Postgres + Vite + Playwright.
4
+ *
5
+ * This script is invoked INSIDE the test container by `runDocker.ts`.
6
+ * It can also be run on the host if you have a local Postgres at
7
+ * 127.0.0.1:5432 and Chrome installed (matches `npm run test:online` in the
8
+ * consuming app).
9
+ *
10
+ * Per-run isolation is via a UUID-named Postgres database. The DB is
11
+ * created at startup, migrated, used by the spawned Vite backend, and
12
+ * dropped on exit (unless TEST_PRESERVE_DB=true).
13
+ *
14
+ * Conventions (overridable via env, but Phase 0 just hardcodes them):
15
+ * - Backend: `npx vite --port <port> --strictPort --host 0.0.0.0`
16
+ * - Schema migration: `npx prisma migrate deploy`
17
+ * - Playwright config at `tests/test-online/playwright.config.ts`
18
+ * - DB name prefix: derived from the consuming app's package name
19
+ *
20
+ * Env vars forwarded into the backend process (hermetic — we do NOT
21
+ * inherit Shopify-related secrets from process.env beyond these):
22
+ * - PATH, HOME, USER (process basics)
23
+ * - DATABASE_URL, DIRECT_URL (per-run UUID DB)
24
+ * - SHOPIFY_API_KEY, SHOPIFY_API_SECRET, SCOPES (from .env.test)
25
+ * - SHOPIFY_APP_URL, PORT, HOST (from .env.test, derived)
26
+ * - SHOPIFY_UPSELLS_ID (if set; specific to apps with theme app
27
+ * extensions — harmless no-op otherwise)
28
+ */
29
+ import { spawn, execSync } from 'node:child_process';
30
+ import { randomUUID } from 'node:crypto';
31
+ import { existsSync, readFileSync } from 'node:fs';
32
+ import { resolve } from 'node:path';
33
+ import { fileURLToPath } from 'node:url';
34
+ import { setTimeout as sleep } from 'node:timers/promises';
35
+ import { Agent } from 'undici';
36
+ import { loadEnv, printEnvSummary } from '@essential-apps/shopify-test-core';
37
+ import { isPortFree } from '../lib/freePort.js';
38
+ // Vite serves a self-signed cert in test mode — node:fetch rejects
39
+ // these by default. Use a permissive dispatcher just for the
40
+ // readiness probe.
41
+ const insecureFetchDispatcher = new Agent({ connect: { rejectUnauthorized: false } });
42
+ const PG_HOST = 'localhost';
43
+ const PG_PORT = '5432';
44
+ const READY_TIMEOUT_MS = 120_000;
45
+ function readAppName() {
46
+ const pkgPath = resolve(process.cwd(), 'package.json');
47
+ if (!existsSync(pkgPath)) {
48
+ throw new Error(`No package.json at ${pkgPath}. Run this from the consuming app's repo root.`);
49
+ }
50
+ const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
51
+ if (!pkg.name)
52
+ throw new Error(`package.json at ${pkgPath} has no \`name\` field.`);
53
+ return pkg.name.replace(/^@[^/]+\//, '');
54
+ }
55
+ function dbUrl(name) {
56
+ // process.env.USER is empty in some container runtimes; PGUSER
57
+ // override wins. Last-resort fallback to 'root' (the container's
58
+ // default user).
59
+ const user = process.env['PGUSER'] || process.env['USER'] || 'root';
60
+ // Prisma's default connection_limit is `num_physical_cpus * 2 + 1`
61
+ // (commonly 9). Apps that fan out parallel queries on boot (Shopify
62
+ // app-remix's session-storage-prisma validating sessions, etc.)
63
+ // can saturate that pool — especially when each engine call is
64
+ // slowed by amd64 Rosetta translation inside the VM, holding
65
+ // connections longer. An exhausted pool throws
66
+ // PrismaClientInitializationError, which crashes Vite/Remix
67
+ // (unhandled rejection → process exit) and takes down the cleanup
68
+ // endpoint along with it. 25 is generous enough to handle test-time
69
+ // burstiness without being suspiciously high in production logs
70
+ // (Vite never actually opens that many — it's a ceiling).
71
+ // pool_timeout=20 (default 10) gives slow Rosetta engine starts a
72
+ // bigger window before they're considered "timed out".
73
+ return `postgresql://${user}@${PG_HOST}:${PG_PORT}/${name}?connection_limit=25&pool_timeout=20`;
74
+ }
75
+ async function waitForReady(url, timeoutMs) {
76
+ const deadline = Date.now() + timeoutMs;
77
+ let lastErr = '';
78
+ while (Date.now() < deadline) {
79
+ try {
80
+ const res = await fetch(url, {
81
+ redirect: 'manual',
82
+ // Cast: node fetch types omit dispatcher even though it's supported
83
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
84
+ dispatcher: insecureFetchDispatcher,
85
+ });
86
+ if (res.status > 0)
87
+ return;
88
+ }
89
+ catch (e) {
90
+ lastErr = e.message;
91
+ }
92
+ await sleep(2_000);
93
+ }
94
+ throw new Error(`Backend never became ready at ${url}. Last error: ${lastErr}`);
95
+ }
96
+ async function main() {
97
+ const env = loadEnv();
98
+ printEnvSummary(env);
99
+ if (!env.apiSecret) {
100
+ throw new Error(`SHOPIFY_API_SECRET is not set in .env.test.\n\n` +
101
+ `Get it from Partner Dashboard → Apps → "${env.devAppHandle}" → ` +
102
+ `Configuration → "Client credentials" → "Reveal client secret".\n` +
103
+ `Paste it into .env.test as SHOPIFY_API_SECRET=...`);
104
+ }
105
+ // localhost mode: SHOPIFY_APP_URL must be a https://localhost:PORT
106
+ // URL. Vite serves a self-signed cert via @vitejs/plugin-basic-ssl.
107
+ // The browser embeds the iframe at that URL — Playwright is
108
+ // configured with ignoreHTTPSErrors so the cert is accepted.
109
+ const appUrl = new URL(env.devAppUrl);
110
+ if (appUrl.hostname !== 'localhost' && appUrl.hostname !== '127.0.0.1') {
111
+ throw new Error(`SHOPIFY_APP_URL must be a localhost URL (https://localhost:PORT). ` +
112
+ `Got: ${env.devAppUrl}\n` +
113
+ `This setup uses Vite's self-signed cert in test mode (no tunnel).`);
114
+ }
115
+ if (appUrl.protocol !== 'https:') {
116
+ throw new Error(`SHOPIFY_APP_URL must use https:// — got ${env.devAppUrl}`);
117
+ }
118
+ const port = appUrl.port || '443';
119
+ // Pre-flight: refuse to run if the port is already in use. Avoids
120
+ // false-positive runs where Vite would silently take a different port.
121
+ if (!(await isPortFree(Number(port)))) {
122
+ throw new Error(`Port ${port} is in use, refusing to start.\n` +
123
+ `Find what's holding it: lsof -i :${port}\n` +
124
+ `Then either free it, or change SHOPIFY_APP_URL in .env.test ` +
125
+ `to a different port (and update Partner Dashboard accordingly).`);
126
+ }
127
+ const appName = readAppName();
128
+ // Postgres identifier rules: lowercase, underscores. Sanitize.
129
+ const dbPrefix = (process.env['TEST_ONLINE_DB_NAME_PREFIX'] ?? `${appName}_online`)
130
+ .toLowerCase()
131
+ .replace(/[^a-z0-9_]/g, '_');
132
+ const dbName = `${dbPrefix}_${randomUUID().replace(/-/g, '_')}`;
133
+ const url = dbUrl(dbName);
134
+ const preserveDb = process.env['TEST_PRESERVE_DB'] === 'true';
135
+ console.log(`[runTests] Test DB: ${url}`);
136
+ console.log(`[runTests] Backend: ${env.devAppUrl} (vite https, self-signed cert)`);
137
+ console.log('');
138
+ console.log('[runTests] createdb…');
139
+ execSync(`createdb -h ${PG_HOST} -p ${PG_PORT} ${dbName}`, { stdio: 'inherit' });
140
+ // Per-run secret for the test-internal store-cleanup endpoint.
141
+ // Generated fresh each run so we never depend on a long-lived
142
+ // shared secret in .env.test (which used to point at a personal
143
+ // dev tunnel and broke for any other dev / CI). Both the backend
144
+ // (validates) and the test process (sends header) see the same
145
+ // value via backendEnv below.
146
+ const cleanupSecret = randomUUID();
147
+ // Backend serves the cleanup endpoint at /test-internal/cleanup-shop.
148
+ // Reach it via the same localhost URL the test browser uses for
149
+ // the embedded app — no external tunnel involved.
150
+ const cleanupUrl = `${env.devAppUrl.replace(/\/$/, '')}/test-internal/cleanup-shop`;
151
+ // Hermetic env for the spawned Vite + Playwright. We do NOT inherit
152
+ // Shopify-related secrets from process.env — we hand-build them
153
+ // from .env.test only.
154
+ const backendEnv = {
155
+ PATH: process.env['PATH'] ?? '',
156
+ // See runOfflineFullTests.ts for the long-form note — empty HOME
157
+ // makes npm write its cache to literal `~/.npm` in cwd.
158
+ HOME: process.env['HOME'] || '/root',
159
+ USER: process.env['USER'] ?? '',
160
+ NODE_ENV: 'test',
161
+ DATABASE_URL: url,
162
+ DIRECT_URL: url,
163
+ SHOPIFY_API_KEY: env.devClientId,
164
+ SHOPIFY_API_SECRET: env.apiSecret,
165
+ SCOPES: env.scopes,
166
+ SHOPIFY_APP_URL: env.devAppUrl,
167
+ PORT: port,
168
+ HOST: env.devAppUrl,
169
+ // Store-cleanup wiring (see storePool.ts afterEach). Both the
170
+ // backend route handler (validates X-Test-Cleanup-Secret) and the
171
+ // Playwright test process (sends the header) read these.
172
+ TEST_ONLINE_CLEANUP_SECRET: cleanupSecret,
173
+ TEST_ONLINE_STORE_CLEANUP_URL: cleanupUrl,
174
+ // Theme app extension UUID — relevant for apps with theme app
175
+ // extensions (essential-upsell). Without this, vite/remix loads
176
+ // the dev-app value from .env (since vite/remix auto-loads .env
177
+ // even with NODE_ENV=test), so the Activate deep link points at
178
+ // the wrong extension and isAppEmbedActive never matches.
179
+ // Harmless no-op for apps that don't use this var.
180
+ ...(process.env['SHOPIFY_UPSELLS_ID']
181
+ ? { SHOPIFY_UPSELLS_ID: process.env['SHOPIFY_UPSELLS_ID'] }
182
+ : {}),
183
+ };
184
+ console.log('[runTests] prisma migrate deploy…');
185
+ execSync('npx prisma migrate deploy', { stdio: 'inherit', env: backendEnv });
186
+ let dev = null;
187
+ const killBackend = () => {
188
+ if (dev && !dev.killed) {
189
+ try {
190
+ dev.kill('SIGTERM');
191
+ }
192
+ catch {
193
+ // ignore
194
+ }
195
+ }
196
+ };
197
+ process.on('SIGINT', killBackend);
198
+ process.on('SIGTERM', killBackend);
199
+ let exitCode = 1;
200
+ try {
201
+ console.log('[runTests] booting Remix dev server (vite https, no tunnel, no Shopify CLI)…');
202
+ console.log('');
203
+ // Serve via Vite with the online-suite config overlay
204
+ // (viteOnlineConfig): it loads the app's OWN vite config and adds
205
+ // optimizeDeps.entries so every route's deps are pre-bundled at
206
+ // server startup. Without it, Vite discovers a route's deps on the
207
+ // first navigation, re-optimizes, and force-reloads the embedded
208
+ // iframe mid-test (the funnels "placement type list" flake). The
209
+ // overlay is online-only and additive — it never touches the app's
210
+ // own dev/build. Opt out with TEST_ONLINE_VITE_OPTIMIZE_ALL=0 →
211
+ // bare `vite` with the app config unchanged.
212
+ const viteArgs = ['vite', '--port', port, '--strictPort', '--host', '0.0.0.0'];
213
+ if (process.env['TEST_ONLINE_VITE_OPTIMIZE_ALL'] !== '0') {
214
+ viteArgs.push('--config', fileURLToPath(new URL('../vite/onlineConfig.js', import.meta.url)));
215
+ }
216
+ dev = spawn('npx', viteArgs, {
217
+ stdio: 'inherit',
218
+ env: backendEnv,
219
+ });
220
+ console.log(`[runTests] waiting for backend at ${env.devAppUrl}…`);
221
+ await waitForReady(env.devAppUrl, READY_TIMEOUT_MS);
222
+ console.log('[runTests] backend ready.');
223
+ console.log('');
224
+ console.log('[runTests] running Playwright…');
225
+ // Playwright test process needs more env than the backend — it
226
+ // reads TEST_ONLINE_ACCOUNT_EMAIL, SHOPIFY_APP_HANDLE, etc. from
227
+ // process.env. The backend gets the hermetic backendEnv;
228
+ // Playwright gets backendEnv + the .env.test metadata that's
229
+ // already in process.env (via the --env-file=.env.test flag on
230
+ // the runner).
231
+ const playwrightConfig = process.env['TEST_PLAYWRIGHT_CONFIG'] ?? 'tests/test-online/playwright.config.ts';
232
+ // PLAYWRIGHT_GREP narrows the run to tests matching a regex
233
+ // (Playwright's --grep). Documented as the env-var entry point in
234
+ // runOffline.ts; mirror it here so the vm path
235
+ // (which goes through runVm.ts → runTests.ts) honors it
236
+ // too. Without this, an env var that "works in offline mode"
237
+ // silently runs the whole suite under the vm.
238
+ const grep = process.env['PLAYWRIGHT_GREP'];
239
+ const grepArg = grep ? ` --grep ${JSON.stringify(grep)}` : '';
240
+ execSync(`npx playwright test --config ${playwrightConfig}${grepArg}`, {
241
+ stdio: 'inherit',
242
+ env: {
243
+ ...process.env,
244
+ ...backendEnv,
245
+ },
246
+ });
247
+ exitCode = 0;
248
+ }
249
+ catch (err) {
250
+ console.error(`[runTests] failed: ${err.message}`);
251
+ }
252
+ finally {
253
+ console.log('');
254
+ console.log('[runTests] killing backend…');
255
+ killBackend();
256
+ await sleep(2_000);
257
+ if (preserveDb) {
258
+ console.log(`[runTests] DB preserved for inspection: ${dbName}`);
259
+ console.log(` Connect: psql ${url}`);
260
+ console.log(` Drop: dropdb -h ${PG_HOST} -p ${PG_PORT} ${dbName}`);
261
+ }
262
+ else {
263
+ try {
264
+ execSync(`dropdb -h ${PG_HOST} -p ${PG_PORT} ${dbName}`, { stdio: 'inherit' });
265
+ console.log(`[runTests] dropped DB: ${dbName}`);
266
+ }
267
+ catch {
268
+ console.warn(`[runTests] could not drop DB (still in use?): ${dbName}`);
269
+ }
270
+ }
271
+ }
272
+ process.exit(exitCode);
273
+ }
274
+ main().catch((err) => {
275
+ console.error(err);
276
+ process.exit(1);
277
+ });
278
+ //# sourceMappingURL=runTests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runTests.js","sourceRoot":"","sources":["../../src/scripts/runTests.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAqB,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,mEAAmE;AACnE,6DAA6D;AAC7D,mBAAmB;AACnB,MAAM,uBAAuB,GAAG,IAAI,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;AAEtF,MAAM,OAAO,GAAG,WAAW,CAAC;AAC5B,MAAM,OAA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