chore: Use local clickhouse instance for playwright tests#1711
chore: Use local clickhouse instance for playwright tests#1711
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Code Review✅ No critical issues found. The PR successfully refactors E2E tests to use a local Docker ClickHouse instance instead of a remote demo instance. The implementation is solid with good error handling, health checks, and comprehensive test data generation. Minor observations (not blocking):
The architecture is clean, separates fullstack vs local modes well, and includes proper cleanup/health check mechanisms. |
- Add Docker Compose service for local ClickHouse instance - Add init script to create e2e_* tables in ClickHouse - Add seed-clickhouse.ts to populate test data - Add global-setup-local.ts for local mode setup - Update test scripts to support local ClickHouse - Update .env.e2e to point to local ClickHouse instead of demo server - Add stop-e2e.sh script for cleanup This enables E2E tests to run against a local Docker ClickHouse instance with seeded test data, instead of relying on the public demo server. Both full-stack mode (MongoDB + API + ClickHouse) and local mode (frontend + ClickHouse) now use the same local ClickHouse instance.
The global-setup-fullstack.ts was missing the seedClickHouse() call, which meant tests had no data to work with.
- Add saveSearchAndWaitForNavigation() to avoid race condition - Starts waiting for URL change BEFORE submitting form - Eliminates flaky tests where modal closes but URL hasn't changed yet - Replaces manual pattern of await modal hidden + await URL change - Simplify search-filters.spec.ts to use known test data - Use hardcoded 'info' severity from seeded data instead of dynamic discovery - Remove 18 lines of complex conditional logic - More reliable and easier to understand These changes leverage consistent test data from ClickHouse seeding.
E2E Test Results✅ All tests passed • 0 passed • 0 skipped • 726s
Tests ran across 4 shards in parallel. |
3d7cb2b to
8d16aca
Compare
No description provided.