@thefittingroom/shop-ui 5.0.23 → 5.0.25
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.
- package/README.md +18 -1
- package/dist/index.js +1209 -383
- package/package.json +19 -3
package/README.md
CHANGED
|
@@ -18,13 +18,30 @@ npm ci
|
|
|
18
18
|
| Script | What it does |
|
|
19
19
|
|---|---|
|
|
20
20
|
| `npm run build` | Clean + production build into `dist/` |
|
|
21
|
-
| `npm run check` | Type-check (`tsc --noEmit`) |
|
|
21
|
+
| `npm run check` | Type-check (`tsc --noEmit`) + ESLint + Prettier |
|
|
22
22
|
| `npm run watch` | Vite build in watch mode |
|
|
23
23
|
| `npm run serve` | Static-serve the repo on `:5173` with CORS |
|
|
24
24
|
| `npm run watch-serve` | Both `watch` and `serve` together; Ctrl+C stops both |
|
|
25
|
+
| `npm run test` / `npm run test:e2e` | Playwright e2e suite (Chromium) against the built bundle |
|
|
26
|
+
| `npm run test:e2e:ui` | Playwright UI runner for local debugging |
|
|
25
27
|
| `npm run gen-types` | Regenerate `src/api/gen/*.ts` from `tfr-backend` Go types |
|
|
26
28
|
| `npm run promote-latest [version]` | Move npm dist-tag `latest` onto a published version (defaults to current `package.json` version) |
|
|
27
29
|
|
|
30
|
+
## Running e2e tests
|
|
31
|
+
|
|
32
|
+
First-time setup: `npm install && npx playwright install chromium` (the
|
|
33
|
+
second command downloads the Chromium binary once; cached afterwards). Then
|
|
34
|
+
`npm run test:e2e` runs the suite. Specs live under `tests/e2e/`; they boot
|
|
35
|
+
the built bundle in headless Chromium against a static fixture page
|
|
36
|
+
(`tests/e2e/fixtures/host.html`) that mimics the minimal contract the Shopify
|
|
37
|
+
theme provides. Firebase is mocked via `InitParams.testHooks`
|
|
38
|
+
(see `src/lib/firebase-mock.ts`); REST endpoints are mocked via
|
|
39
|
+
`page.route()`. See AGENTS.md for the architecture and constraints.
|
|
40
|
+
|
|
41
|
+
For an interactive debug loop, `npm run watch-serve &` in one terminal and
|
|
42
|
+
`npm run test:e2e:ui` in another — Playwright reuses the live-rebuilt
|
|
43
|
+
`:5173`.
|
|
44
|
+
|
|
28
45
|
## Release process
|
|
29
46
|
|
|
30
47
|
Releases are explicit, human-initiated steps via a single GitHub Actions
|