End-to-end tests for the MCP UI WebMCP monorepo.
This package contains Playwright-based E2E tests for:
- Chat UI App - Tests for the main chat UI application
- Remote MCP Starter - Tests for the MCP server with UI starter
- Integration Tests - Tests that verify both apps work together
# Run all E2E tests (runs all apps)
pnpm test
# Run only integration tests (starts both servers)
pnpm test:integration
# Run only chat-ui tests
pnpm test:chat-ui
# Run only remote-mcp tests
pnpm test:remote-mcp
# Run with Playwright UI
pnpm test:ui
# Run in debug mode
pnpm test:debug
# Run in headed mode (see browser)
pnpm test:headed
# View test report
pnpm test:reportcd e2e-tests
# Run all tests
pnpm test
# Run specific test suite
pnpm test:chat-ui
pnpm test:remote-mcp
pnpm test:integration
# Run with UI
pnpm test:uitests/e2e/
├── tests/
│ ├── chat-ui.spec.ts # Chat UI app tests
│ ├── remote-mcp-starter.spec.ts # Remote MCP tests
│ └── integration.spec.ts # Integration tests
├── playwright.config.ts # Default config (runs all tests with both servers)
├── playwright-chat-ui.config.ts # Chat UI specific config
├── playwright-remote-mcp.config.ts # Remote MCP specific config
├── playwright-integration.config.ts # Integration specific config
└── package.json
Tests the main chat UI application:
- Application loads correctly
- React app mounts
- No console errors
- Network requests succeed
- Responsive design works
Tests the MCP server with UI:
- Application loads correctly
- React app mounts
- No console errors
- Runs on correct port (8888)
- Responsive design works
Tests both apps running together:
- Both servers start successfully
- Both apps load in parallel
- No cross-app errors
- Both apps remain responsive
Each test suite has its own Playwright config:
- playwright.config.ts - Starts both servers, runs all tests
- playwright-chat-ui.config.ts - Starts chat-ui only (port 5173)
- playwright-remote-mcp.config.ts - Starts remote-mcp only (port 8888)
- playwright-integration.config.ts - Starts both servers for integration tests
Tests are configured to:
- Retry failed tests 2 times on CI
- Run serially on CI (workers: 1)
- Capture screenshots on failure
- Generate HTML reports
- Output GitHub Actions annotations
pnpm test:uiProvides:
- Visual test execution
- Time travel debugging
- DOM snapshots
- Console logs
- Network activity
pnpm test:debugOpens Playwright Inspector for step-by-step debugging.
After running tests:
pnpm test:reportKill processes using the ports:
lsof -ti:5173 | xargs kill
lsof -ti:8888 | xargs killInstall Playwright browsers:
cd e2e-tests
pnpm exec playwright installIncrease timeout in the relevant config file:
timeout: 180000, // 3 minutes