Records Build and Test of the Contact page
Build, unit, integration and performance test instructions and the summary, the corrected scroll rule and the review on test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
# Build and Test Summary — contact-page
|
||||
|
||||
Tested on branch `feature/contact-page` (units 1–3 on master a58bc1c, plus the review changes), locally on Windows, 2026-10-25.
|
||||
|
||||
## Build
|
||||
- **Tool**: pnpm + Vite (`tsc && vite build`)
|
||||
- **Status**: ✅ Success (0.8 s locally). CI: run 573 failed (runner process terminated after `pnpm install`) and 574 failed (router DNS) — both infrastructure; run 575 (`workflow_dispatch`, deploy_test, `9c2601d`): `check`, `deploy-test`, `lighthouse` ✅
|
||||
- **Main bundle**: 149.3 kB gzip (was 169.6 kB: Rolldown moved shared modules into a separate chunk; homepage performance measured identical, see performance)
|
||||
|
||||
## Unit tests
|
||||
- **Total**: 367 in 71 files. **Passed**: 367. **Failed**: 0. Coverage thresholds met; 92.7% of statements overall
|
||||
- **Status**: ✅ Pass
|
||||
|
||||
## Integration (browser, production build)
|
||||
16 checks across the scenarios in `integration-test-instructions.md`, all ✅ after one fix:
|
||||
- **Found in this stage**: on a phone, "Stuur een berichtje" on Soorten fotoshoots opened `/contact` at the previous scroll position (scrollY 652) instead of the top. Cause: the contact route removes `?pakket=` with a second navigation that used `resetScroll: false` (copied from the homepage, where it serves the `#contact` jump); it replaced the incoming navigation before the router had reset the scroll. Fix: keep the default scroll reset on that navigation (BR-CP-12 corrected). Rechecked at 1440 and 390 px: top of the page.
|
||||
- Network check: no photo request below 1024 px, priority High from 1024 px.
|
||||
|
||||
## Performance
|
||||
See `performance-test-instructions.md`: desktop all ≥ 0.99; mobile `/contact` 0.88–0.90 (budget 0.9, kept by the owner) and `/` 0.78–0.80 (pre-existing, owner: separately). Accessibility 1.0 everywhere after the accent-button contrast fix.
|
||||
|
||||
## Additional
|
||||
- **Security**: `pnpm audit --prod --audit-level high` clean. No new dependencies, external resources or CSP changes (`data:` images were already allowed). No e-mail address in served HTML or JSON-LD. `?pakket=` validated against the package ids and never rendered (property-tested).
|
||||
- **Contract / E2E suite**: N/A (static front end without an API); the browser checks cover the user flows.
|
||||
|
||||
## Review changes after the test deploy
|
||||
- Submit button of the contact form right-aligned (homepage and contact page), the privacy line below it aligned with it.
|
||||
|
||||
## Overall
|
||||
- **Build**: ✅ **Tests**: ✅ **Integration**: ✅ **Performance**: desktop ✅, mobile per the owner's decisions
|
||||
- **Operations phase**: declined at Requirements Analysis. Next: PR to master (merging also deploys to test).
|
||||
@@ -0,0 +1,23 @@
|
||||
# Build Instructions — contact-page
|
||||
|
||||
This feature adds no dependencies, build steps or environment variables.
|
||||
|
||||
## Prerequisites
|
||||
- **Node.js** 24 and **pnpm** (version pinned in `web/package.json`)
|
||||
- **Environment variables**: none for the build. `LIGHTHOUSE_PERFORMANCE=warn` only in CI.
|
||||
|
||||
## Build steps
|
||||
```bash
|
||||
cd web
|
||||
pnpm install # also runs `chakra typegen` (postinstall); needed for the new accent.deeper token
|
||||
pnpm build # tsc && vite build
|
||||
```
|
||||
|
||||
## Verify
|
||||
- **Expected output**: `✓ built in …` and no TypeScript errors
|
||||
- **Artifacts**: `web/dist/`. New in this feature: `dist/assets/contact-*.jpg` and `contact-portret-*.jpg` (hashed), `dist/og-contact.jpg` (stable URL for the preview image), the page chunk `contact-*.js` (4.6 kB) and the shared `ContactForm-*.js` chunk (15 kB), which the homepage and the contact page load on demand
|
||||
- **Accepted warning**: Vite's chunk-size warning for the main bundle (known, NFR-P-01)
|
||||
|
||||
## Troubleshooting
|
||||
- **"Port 4173 is already in use"**: a leftover `vite preview` (on Windows, killing the shell does not stop its node process). Check with `Get-NetTCPConnection -LocalPort 4173`, and coordinate with "claim 4173" / "4173 free" with parallel feature sessions.
|
||||
- **CI `check` ends with exit code -1 after `pnpm install`, or "lookup github.com … server misbehaving"**: a network/DNS problem on the Pi or the router (seen on 2026-10-25, runs 573 and 574), not the code. Check the router's DNS (`nslookup github.com 192.168.1.1`), then dispatch the run again.
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
# Integration Test Instructions — contact-page
|
||||
|
||||
Browser checks on the production build (`pnpm build && pnpm preview`, port 4173), across pages and units. A scratchpad puppeteer script (`puppeteer-core` from Lighthouse CI's dependencies, local Chrome) ran them on 2026-10-25; they can be repeated by hand.
|
||||
|
||||
| # | Scenario | Expected |
|
||||
|---|---|---|
|
||||
| 1 | Soorten fotoshoots → "Stuur een berichtje" at Newborn (1440 / 390 px) | lands on `/contact` at the top, `?pakket=` removed from the URL, Newborn preselected, gate mail subject "Aanvraag fotoshoot: Newborn" |
|
||||
| 2 | Soorten fotoshoots → Loveshoot link, "Boek je shoot" | `/contact` |
|
||||
| 3 | Over mij → "neem contact op", "Boek je shoot" | `/contact` |
|
||||
| 4 | Homepage price card "Boek …" | stays on the homepage form (`/?pakket=…#contact`) |
|
||||
| 5 | `/contact` at 320, 390, 768, 1024, 1440 px, scrolled to the end | no horizontal overflow, CLS < 0.1 |
|
||||
| 6 | Keyboard on `/contact` (1440 px) | tab order: form (gate mail button) before the wide card |
|
||||
| 7 | Served HTML and JSON-LD of `/contact` | no e-mail address; `ContactPage` present |
|
||||
| 8 | Network: `/contact` at 390–1023 px vs 1024+ px | no request for `contact.jpg` below 1024 px; one request with priority High from 1024 px (LCP = the photo) |
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
# Performance Test Instructions — contact-page
|
||||
|
||||
```bash
|
||||
cd web
|
||||
pnpm build
|
||||
pnpm lighthouse # mobile (lighthouserc.cjs), then desktop (lighthouserc.desktop.cjs)
|
||||
```
|
||||
|
||||
Announce "claim 4173" to parallel feature sessions first and "4173 free" afterwards; avoid other heavy work on the machine while Lighthouse runs (it measures CPU).
|
||||
|
||||
## Budgets (mobile performance)
|
||||
| Page | Budget | Measured (2026-10-25) |
|
||||
|---|---|---|
|
||||
| `/` | 0.8 | 0.78–0.80 — pre-existing (identical on the unit 2 build, 3 runs each); owner: handle separately |
|
||||
| `/contact` | 0.9 | 0.88 / 0.90 / 0.88 — owner chose to keep 0.9 |
|
||||
| `/over-mij`, `/soorten-fotoshoots` | 0.85 | 0.85–0.88 |
|
||||
|
||||
The contact page shares the cause of the photo pages: the page text appears only after the main bundle and the route chunk have run (client rendering), so LCP lands around 3.1–3.2 s in Lighthouse's simulation. Prerendering is the structural fix (NFR-P-01). In CI, performance is report-only (D6), so these do not block a merge; locally `pnpm check` fails on them.
|
||||
|
||||
Desktop: every page ≥ 0.99; `/contact` 0.99 / 1 / 1 / 1. Accessibility, best practices and SEO (indexed pages) are 1.0 everywhere.
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# Unit Test Instructions — contact-page
|
||||
|
||||
```bash
|
||||
cd web
|
||||
pnpm test # vitest run --coverage (unit, component, property-based, axe)
|
||||
```
|
||||
|
||||
- **Expected**: 71 test files, 367 tests, 0 failures; coverage thresholds met (100% for `src/lib/**`, `seo.ts`, `sitemap.ts`)
|
||||
- **Property-based tests** print their seed (`fast-check seed: …`); rerun a failure with `FC_SEED=<seed> pnpm test`
|
||||
- **New in this feature**: `lib/contactChannels`, `lib/withReplyTime`, `PrivacyNote`, `ContactPanel`, `ContactDetails`, `contact/ContactAside`, `webPage`/`contactPage` in `seo.test.ts`, the contact route in `app.test.tsx`
|
||||
- **Note**: run without an output filter (e.g. `rtk proxy pnpm test` in agent shells), so a failing test is visible in full
|
||||
+1
-1
@@ -39,7 +39,7 @@ Text alternative: from 1024 px the page shows the form with the photo and card b
|
||||
|---|---|
|
||||
| BR-CP-10 | The route keeps `pakket` from the search only when it is text (same `validateSearch` as the homepage). |
|
||||
| BR-CP-11 | `ContactPanel load="eager"` receives it and applies the preselect per BR-CPN-02 (unit 2). |
|
||||
| BR-CP-12 | After it was applied, the route replaces the URL with `/contact` without search, no history entry, no scroll, no focus move. An invalid value is removed the same way. |
|
||||
| BR-CP-12 | After it was applied, the route replaces the URL with `/contact` without search, no history entry, no focus move; the page starts at the top. An invalid value is removed the same way. *Corrected at Build and Test: 'no scroll' left a visitor coming from a scrolled page mid-page.* |
|
||||
|
||||
## Texts and headings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user