Skip to content

Testing & CI

This monorepo has three layers of automated testing: unit tests for shared utilities, typechecking for the app, and end-to-end UI flows via Maestro.

What is tested

LayerTargetTool
Unitpackages/utils (format/date)Vitest
Typecheckapps/frontend (TS app)tsc --noEmit
Typechecktools/docs-site (best-effort)astro check
E2EiOS app UI flowsMaestro

Running locally

Unit tests (utils)

Terminal window
pnpm --filter @rl-padel/utils test
# or from the package:
cd packages/utils && pnpm test

Covers every exported function in src/format.ts and src/date.ts (formatEuro, formatDate, formatTime, getInitials, isToday, isFuture, getNextNDays, formatWeekday, formatDayMonth, formatDateShort) including edge cases.

Typecheck (app)

Terminal window
cd apps/frontend && pnpm typecheck # tsc --noEmit

Run all package tests

Terminal window
pnpm test # runs `pnpm -r test` (currently: utils + app typecheck)

E2E (Maestro)

Requires a running iOS Simulator with the app installed, JDK 17, and the Maestro CLI. See apps/frontend/.maestro/README.md for full setup.

Terminal window
cd apps/frontend
maestro test .maestro/login.yaml
maestro test .maestro # all flows

Demo credentials (password demo12345): lid@rlpadel.nl, trainer@rlpadel.nl, eigenaar@rlpadel.nl.

CI overview

Two GitHub Actions workflows live in .github/workflows/:

  • ci.yml — runs on push and pull_request to main. Uses pnpm 9 + Node 20 (with pnpm cache).
    • lint-typecheck-test: installs deps, typechecks the app (tsc --noEmit), best-effort typechecks the docs, runs the utils unit tests.
    • expo-doctor: runs expo-doctor against the app (non-blocking).
  • e2e-ios.yml — manual (workflow_dispatch) only, runs on macos-latest. Documents and attempts the full native path: boot a simulator, prebuild + xcodebuild the app, install it, install Maestro, run the flows. The native build is heavy (~20-40 min) and signing-sensitive, so its steps are continue-on-error and marked best-effort.

Known limitation: Liquid Glass and Maestro

The app’s bottom tab bar uses expo-glass-effect (GlassView / Liquid Glass). Glass views hide their React Native children from Maestro’s view hierarchy, so tabs can’t be matched by text or testID. The E2E flows tap tabs by coordinate instead (tab bar at y≈96%, items at x≈10/30/50/70/90%). When adding assertable UI, keep testIDs on elements outside glass containers. See apps/frontend/.maestro/README.md for details.