You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Server-side rendering, server components |`nextjs-ssr`|
135
+
| Static Next.js / client-only |`nextjs`|
136
+
| Translations or CSS |`react` (easiest)|
137
+
| Custom OAuth flows |`custom-auth-server` (see [CUSTOM_AUTHENTICATION.md](CUSTOM_AUTHENTICATION.md)) |
137
138
138
139
The `react` example is recommended as the default — it has the fastest reload cycle.
139
140
140
141
## Running tests
141
142
142
-
Start the emulator first, then:
143
+
Start the emulator first (or let `pnpm test:e2e` start it via Playwright `globalSetup` when it is not already running), then:
143
144
144
145
```bash
145
-
#All tests:
146
+
#Package unit tests:
146
147
pnpm test
148
+
149
+
# Example smoke (all six examples, serial):
150
+
pnpm test:e2e
151
+
152
+
# Single example smoke:
153
+
pnpm test:e2e:react
154
+
pnpm test:e2e:angular
155
+
# … see root package.json for test:e2e:<example> scripts
147
156
```
148
157
149
-
Planned example browser smoke tests (`pnpm test:e2e`) are described in [developer-docs/work-queues/playwright-e2e-smoke.md](developer-docs/work-queues/playwright-e2e-smoke.md).
158
+
E2E scope and CI layers: [developer-docs/architecture/testing-strategy.md](developer-docs/architecture/testing-strategy.md).
**Port configurability:** not pinned in `vite.config.ts` / `next.config.ts`. All examples accept CLI/`PORT` overrides for e2e; Playwright's per-project`webServer` owns lifecycle. See [AD-4](../decisions.md#ad-4-playwright-managed-dev-servers-serial-shared-emulator).
25
+
**Port configurability:** not pinned in `vite.config.ts` / `next.config.ts`. All examples accept CLI/`PORT` overrides for e2e; Playwright's top-level`webServer`(selected by `E2E_PROJECT`) owns lifecycle. Exact e2e commands: `e2e/fixtures/example-meta.ts`. See [AD-4](../decisions.md#ad-4-playwright-managed-dev-servers-serial-shared-emulator).
26
26
27
27
**custom-auth-server port:** default `:4000` collides with the Firebase Emulator UI (`:4000`), so e2e binds `:4001` — [AD-6](../decisions.md#ad-6-custom-auth-server-binds-4001-for-e2e). Its smoke is non-browser (boot + HTTP assert); it is not in root `pnpm build`.
Copy file name to clipboardExpand all lines: developer-docs/decisions.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Example apps are verified with **Playwright smoke tests**, not full user-flow e2
30
30
31
31
## AD-4: Playwright-managed dev servers, serial, shared emulator
32
32
33
-
Each example has a **unique e2e port**(react 5173, shadcn 5174, nextjs 3000, nextjs-ssr 3001, angular 4200, custom-auth-server 4001). Playwright's per-project **`webServer`**starts each example's dev server, waits for its URL, and stops it — replacing hand-rolled preflight/postflight/PID scripts. Execution is **serial** (`workers: 1`, one dev server up at a time selected via `E2E_PROJECT`) for resource predictability and clean logs; because ports are unique, parallelization is possible later but deferred ([Deferred](work-queues/playwright-e2e-smoke.md#deferred)). **`globalSetup`** builds packages (`build:packages`, asserting `dist/` exists — examples consume built `@firebase-oss/ui-*`) and ensures a single Auth emulator on `:9099` for the whole run; **`globalTeardown`** stops what it started. Angular reuses its package `start` semantics (`pnpm clean && ng serve`) rather than duplicating the `.angular/cache` clean.
33
+
Each example has a **unique e2e port**— see [examples-inventory.md](architecture/examples-inventory.md). Playwright's **top-level**`webServer` (one at a time, selected via `E2E_PROJECT`) starts each UI example's dev server, waits for its URL, and stops it — replacing hand-rolled preflight/postflight/PID scripts. Execution is **serial** (`workers: 1`) for resource predictability and clean logs; because ports are unique, parallelization is possible later but deferred ([Deferred](work-queues/playwright-e2e-smoke.md#deferred)). **`globalSetup`** builds packages (`build:packages`, asserting `dist/` exists — examples consume built `@firebase-oss/ui-*`), ensures a single Auth emulator on `:9099` for the whole run (reuse-aware), and starts it when not already running; **`globalTeardown`** stops what globalSetup started unless the serial runner is mid-suite (`E2E_KEEP_EMULATOR=1`). Angular reuses its package `start` semantics (`pnpm clean && ng serve`) rather than duplicating the `.angular/cache` clean.
34
34
35
35
---
36
36
@@ -50,7 +50,7 @@ The Express `custom-auth-server` defaults to `:4000`, which collides with the **
50
50
51
51
## AD-7: e2e runs in a separate CI workflow with broad triggers
52
52
53
-
Browser smoke runs in its **own workflow**, not folded into the unit `test.yaml`. Path-filtering is intentionally **broad**: examples depend on `packages/**` (built `@firebase-oss/ui-*`), the root `package.json`, `pnpm-lock.yaml`, and the `pnpm-workspace.yaml` catalog, so narrow `examples/**`-only filters would miss real regressions. Triggers therefore include packages, examples, root manifests, lockfile, workspace catalog, and the e2e/workflow files themselves. Playwright browser binaries are **cached keyed on the resolved Playwright version** so the cache restores the actual browser artifact; Chromium-only for MVP.
53
+
Browser smoke runs in its **own workflow**, not folded into the unit `test.yaml`. Path-filtering is intentionally **broad**: examples depend on `packages/**` (built `@firebase-oss/ui-*`), `scripts/**` (serial runner), `firebase.json` (emulator config), the root `package.json`, `pnpm-lock.yaml`, and the `pnpm-workspace.yaml` catalog, so narrow `examples/**`-only filters would miss real regressions. Triggers therefore include packages, examples, scripts, root manifests, lockfile, workspace catalog, emulator config, and the e2e/workflow files themselves. Playwright browser binaries are **cached keyed on the resolved Playwright version** so the cache restores the actual browser artifact; Chromium-only for MVP.
0 commit comments