Skip to content

ci(qa): implement whole-app tiered CI safety net and E2E contract suite#148

Open
khaira777 wants to merge 2 commits into
mainfrom
fix/ci-qa-tiered-safety-net
Open

ci(qa): implement whole-app tiered CI safety net and E2E contract suite#148
khaira777 wants to merge 2 commits into
mainfrom
fix/ci-qa-tiered-safety-net

Conversation

@khaira777

Copy link
Copy Markdown
Contributor

Summary

Build a tiered safety net for every product boundary. This PR introduces dual-server process smoke testing, KDS WebSocket realtime mutation contracts, Playwright E2E browser tests for KDS login/session persistence and POS 44px touch targets, and full CI/release workflow hardening.

Key Changes

  • Workflow Hardening: Pin all actions to full 40-character SHAs across .github/workflows/ci.yml, nightly-release.yml, and release.yml. Added path filtering, least-privilege permissions, dependency review, and job timeouts.
  • Dual-Server Test Bootstrap: Created tests/e2e-server.cjs to boot compiled Main API (:3001) and Standalone KDS (:3002) with deterministic test data in an isolated temporary directory.
  • Dual-Server Smoke Test: Created tests/smoke-test.test.ts to verify simultaneous dual-server health and owner authentication.
  • KDS Realtime & Contract Suite: Extended tests/kds-integration.test.ts with a real WebSocket client to verify auth handshakes, REST status broadcasts, Main API order update events, and role denial for non-kitchen roles.
  • Playwright E2E: Configured Playwright with webServer readiness polling on http://127.0.0.1:3002/api/health to eliminate startup races. Added e2e/kds-login.spec.ts for login/session restoration and e2e/layout-integrity.spec.ts for POS 44px touch targets.
  • Documentation: Rewrote docs/QA_CI_STRATEGY_REVIEW.md reflecting the whole-app tiered CI strategy.

Verification

  • npm run lint: PASS
  • npm run build: PASS
  • npm test: PASS (All 55 test suites passing)
  • cd frontend && npm run test:e2e: PASS (2/2 Playwright specs passing)

- Redesign .github/workflows/ci.yml with path-filtering, least-privilege permissions, dependency review, and 40-character action SHA pinning.
- Offload cross-platform packaging & test matrix to nightly-release.yml.
- Create tests/e2e-server.cjs for isolated dual-server test bootstrap with deterministic seeded credentials (owner, manager, chef).
- Add tests/smoke-test.test.ts to verify dual-server health and auth.
- Add tests/kds-integration.test.ts with real WebSocket client assertions for auth handshake, REST status broadcasts, and Main API order updates.
- Configure frontend Playwright E2E with Playwright webServer health polling on :3002 to eliminate startup races.
- Implement frontend/e2e/kds-login.spec.ts for KDS login & session persistence.
- Implement frontend/e2e/layout-integrity.spec.ts for POS 44px touch targets.
- Harden .github/workflows/release.yml with commit SHA pins and job timeouts.
- Update docs/QA_CI_STRATEGY_REVIEW.md with whole-app contract strategy.
@khaira777
khaira777 requested a review from itsbkm as a code owner July 24, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant