Repository navigation
Testing Strategy
What we test, at which layer, and the coverage bar. The gate that enforces it is Code Quality Gates.
| Layer | Tool | Where | Runs |
|---|---|---|---|
| Unit / component | Jest (+ React Testing Library on web) | every workspace | every PR (affected workspaces) |
| Web E2E | Playwright | apps/frontend/e2e |
frontend-path PRs (public smoke + a11y); the credentialed auth suite runs only on manual dispatch behind the e2e environment — see #1869
|
| Desktop E2E | Playwright (Electron) | apps/desktop/tests/e2e |
PRs and pushes to main/dev (desktop-e2e.yml) |
| Mobile E2E | Detox | apps/mobileAppYC/e2e |
manual / local only (not wired into CI) |
| Accessibility | jest-axe / axe-core | apps/frontend |
every frontend PR |
| Visual regression | Chromatic (Storybook) | components | on component change |
Recommended CI order: unit first (fast feedback), then the public web E2E jobs on frontend PRs; mobile E2E stays a manual/local pass for now.
- New code = new tests. Any new file must reach ≥ 90% statements / branches / functions on first commit — no new file ships without tests.
-
Frontend is stricter: target ≥ 95% statements/branches/functions/lines across
apps/frontend; any file you touch must end at equal-or-higher coverage than you found it. - Coverage is reported to SonarCloud; the quality gate reads new-code coverage.
| You add | Required test |
|---|---|
| Service function / API call | Jest unit: success + all error branches |
| Zustand store / Redux slice | Jest: every action, selector, edge case |
| Custom hook |
renderHook covering all returns and branches |
| Utility / lib function | Jest unit with full branch coverage |
| UI component (web) | RTL render + at least one interaction test |
| Screen (mobile) | Jest + Testing Library render test |
| E2E-critical flow | Playwright (web) or Detox (mobile) |
# Targeted (preferred during development) - never the full suite by default
# Note the plural flag: Jest 30 (both apps) renamed --testPathPattern to
# --testPathPatterns; the singular form now errors.
pnpm --filter frontend run test -- --testPathPatterns="Availability"
pnpm --filter mobileAppYC run test -- --testPathPatterns="<YourFile>"
# Web E2E
pnpm --filter frontend e2e # headless; also e2e:headed / e2e:ui
# first time: cd apps/frontend && pnpm exec playwright install
# Mobile E2E
pnpm --filter mobileAppYC e2e:build:ios && pnpm --filter mobileAppYC e2e:iosFull E2E setup (config/spec locations, how the Playwright and Detox harnesses launch): docs/e2e-testing.md.
Every new web component ships a jest-axe assertion (expect(results).toHaveNoViolations()), enforced as part of the frontend Jest suite in the single-run CI pipeline (ci.yaml's test stage — the former frontend-a11y workflow was folded in by PR #1939). Manual regression checks that tooling can't automate (200% zoom, reflow, reduced motion) are in the Accessibility checklists.
-
Mocking
@yosemite-crew/types: spreadjest.requireActual('@yosemite-crew/types')orforms.tsfails to load. -
Mobile suite isolation: raw
react-test-renderertrees must be drained/unmounted or a random test can flake per full parallel run (root cause of #1822). - The
type-check(npx tsc --noemit) step can take 60-120s — budget for it.
- Code Quality Gates · Engineering Standards · CI/CD Pipeline · per-app testing: Backend · Frontend · Mobile
Home · Architecture · ADRs · Plans · Roadmap · Contributing · Main repo · DeepWiki · Discord
Yosemite Crew is a product of DuneXploration UG (haftungsbeschränkt). This wiki mirrors the repository; where a page and the repo disagree, the repo wins. See the Wiki Style Guide.
Product & Domain
Architecture
Applications
- Backend — Overview
- Frontend / PIMS Web — Overview
- Mobile — Overview
- Desktop PIMS Shell
- Developer Portal
- SuperAdmin
Design & Accessibility
Engineering Handbook
Decisions (ADRs)
Design Docs & Plans
Meta
Canonical code & docs: main repo · Auto-generated companion: DeepWiki