-
Notifications
You must be signed in to change notification settings - Fork 0
Testing and QA
Lucas YourLastName edited this page Jul 11, 2026
·
1 revision
Unit tests (Vitest + Testing Library), end-to-end tests (Playwright), and automated accessibility/security gates — runnable locally and in CI.
Detailed source: Step 10 — Testing & QA.
-
Baseline (repo root): ESLint + TypeScript + a build gate, wired into CI
(
lint · typecheck · build). - Playbook (Step 10): adds Vitest, Playwright, and a11y/security audits.
npm install -D vitest @testing-library/react @testing-library/jest-dom \
@testing-library/user-event jsdomvitest.config.ts:
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: { environment: 'jsdom', setupFiles: ['./vitest.setup.ts'], globals: true },
})vitest.setup.ts:
import '@testing-library/jest-dom/vitest'Run them:
npm run test # (wire this script to "vitest")npm install -D @playwright/test
npx playwright install --with-deps
npx playwright codegen http://localhost:5173 # record flowsplaywright.config.ts:
import { defineConfig } from '@playwright/test'
export default defineConfig({
testDir: './tests',
webServer: { command: 'npm run dev', url: 'http://localhost:5173', reuseExistingServer: true },
use: { baseURL: 'http://localhost:5173', trace: 'on-first-retry' },
})Example smoke test (tests/smoke.spec.ts):
import { test, expect } from '@playwright/test'
test('home renders + no console errors', async ({ page }) => {
const errors: string[] = []
page.on('console', (m) => m.type() === 'error' && errors.push(m.text()))
await page.goto('/')
await expect(page).toHaveTitle(/.+/)
expect(errors, errors.join('\n')).toHaveLength(0)
})npm install -D @axe-core/playwright # a11y assertions inside e2e
npm audit # dependency vulnerabilitiesExtend the CI verify job (from Step 09) with the test stages:
- run: npm run ci:test
- run: npx playwright install --with-deps
- run: npx playwright test
- run: npm run ci:rules || true # Firestore rules testsnpm run test # unit/component green
npx playwright test # e2e green- Use test-mode credentials and the emulator suite for e2e — never prod data.
- Keep a rules unit test (
@firebase/rules-unit-testing) in the suite to catch data-exposure regressions. - Run
npm audit+ secret scanning on every PR. - Treat e2e fixtures/tokens as secrets — inject via CI secrets, not the repo.
- Identify your critical-path journeys (auth, core CRUD, checkout) and ensure each has e2e coverage.
SFWA-WTL-G1 · Standard Firebase Web App, Wayne Tech Lab Generation 1 · Provided by Wayne Tech Lab LLC under MIT · Use at your own risk · Subject to daily change · Repository
- Home
- Quick Start
- WTL Standard Setup Guide
- One-Line Install
- Platform Matrix
- Linux Setup
- Windows Setup
- Architecture and Stack
- Project Structure
- SYSTEMX Root and Folder Standard
- Setup Playbook
- Environment Variables
- Security
- Deployment
- Testing and QA
- MCP and Agents
- GitHub Authors and Contribution Notes
- SYSTEMX WEBPORTAL
- White Paper
- Executive Summary
- CISO Note From the Founder
- Wayne Tech Lab Purpose
- Security Overview
- Long-Term Warnings
- .ENV Solutions
- Menu Operations
- Setup and Deployment
- Start and End of Day
- SYSTEMX Sync and Controlled Updates
- Agent 0 and Subagents
- Agent 0 Operating Model
- How Subagents Work
- Starter Prompts and Smart Routing
- Third-Party Responsibility
- User Ingest and Production Setup
- FAQ