Files
Dragan Spiridonov 4e513b431d fix: resolve 3 P0 blockers and CI failures from QE v3.8.13 audit
- Delete dead MCP server.ts (911 lines, never used in production — entry.ts
  imports MCPProtocolServer). Add legacy aliases in index.ts for backwards compat.
- Fix ESLint: rename .eslintrc.js to .eslintrc.cjs (CommonJS in ESM project)
- Fix hardcoded version '3.0.0' in protocol-server.ts and http-server.ts —
  now reads dynamically from package.json
- Fix vitest process hang: add worker-level afterAll force-exit (setup-worker.ts)
  and global teardown safety net. Native modules (better-sqlite3, hnswlib-node)
  held open handles preventing fork worker exit.
- Add test gate to npm-publish.yml — 194 unit test files must pass before publish
- Disable benchmark.yml release trigger (benchmarks/suite.ts doesn't exist)
- Remove continue-on-error from test steps in optimized-ci.yml (was masking failures)
- Add getToolDefinitions() to MCPProtocolServer for test introspection
- Update e2e and integration tests to use production server API

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 16:51:59 +00:00
..

E2E Tests

This directory contains critical user journey E2E tests that verify major user-facing behaviors with real browser automation.

Test Philosophy

E2E tests are expensive (slow, flaky, require infrastructure). We keep them minimal and focused on critical user journeys:

Journey What it Tests Why it Matters
Execute passing test Full test execution → pass result Core functionality works
Execute failing test Test with intentional failure → error details Error handling works
Execute test suite Multiple cases → aggregated results Suite execution works

What NOT to Test Here

These belong in tests/unit/ or tests/integration/:

  • Individual step types (navigate, click, assert, etc.)
  • Browser client commands
  • Snapshot parsing
  • Multi-session coordination
  • Error edge cases

Running E2E Tests

# Run all E2E tests (requires browser)
npm test -- tests/e2e/

# Skip in CI (automatic via CI=true)
CI=true npm test -- tests/e2e/

Requirements

  • agent-browser CLI installed (npx agent-browser --version)
  • Non-CI environment (tests auto-skip when CI=true)

Infrastructure/integration tests (with mocks) are in:

  • tests/integration/browser/ - Browser client integration tests
  • tests/unit/domains/ - Domain logic unit tests