chore: add end-to-end testing targets to Makefile
- Introduced new targets for running Playwright end-to-end tests, including options for UI mode and Rust gRPC integration tests. - Updated help section in the Makefile to include descriptions for the new e2e testing commands. All quality checks pass.
This commit is contained in:
27
Makefile
27
Makefile
@@ -2,7 +2,7 @@
|
||||
# Runs TypeScript, Rust, and Python quality checks
|
||||
|
||||
.PHONY: all quality quality-ts quality-rs quality-py lint type-check test-quality \
|
||||
lint-rs clippy fmt fmt-rs fmt-check check help
|
||||
lint-rs clippy fmt fmt-rs fmt-check check help e2e e2e-ui e2e-grpc
|
||||
|
||||
# Default target
|
||||
all: quality
|
||||
@@ -125,6 +125,26 @@ check-fix:
|
||||
lint-fix-py:
|
||||
ruff check --fix .
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# E2E Tests
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
## Run Playwright e2e tests (requires frontend running on :5173)
|
||||
e2e:
|
||||
@echo "=== Playwright E2E Tests ==="
|
||||
cd client && NOTEFLOW_E2E=1 NOTEFLOW_E2E_NO_SERVER=1 NOTEFLOW_E2E_BASE_URL=http://localhost:5173 npx playwright test
|
||||
|
||||
## Run Playwright e2e tests with UI
|
||||
e2e-ui:
|
||||
@echo "=== Playwright E2E Tests (UI Mode) ==="
|
||||
cd client && NOTEFLOW_E2E=1 NOTEFLOW_E2E_NO_SERVER=1 NOTEFLOW_E2E_BASE_URL=http://localhost:5173 npx playwright test --ui
|
||||
|
||||
## Run Rust gRPC integration tests (tests real backend wiring)
|
||||
e2e-grpc:
|
||||
@echo "=== Rust gRPC Integration Tests ==="
|
||||
@echo "Requires: gRPC server running on :50051"
|
||||
cd client/src-tauri && NOTEFLOW_INTEGRATION=1 cargo test --test grpc_integration -- --ignored --nocapture
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Help
|
||||
#-------------------------------------------------------------------------------
|
||||
@@ -164,3 +184,8 @@ help:
|
||||
@echo "Formatting:"
|
||||
@echo " fmt Format all code (Biome + rustfmt)"
|
||||
@echo " fmt-check Check all formatting"
|
||||
@echo ""
|
||||
@echo "E2E Tests:"
|
||||
@echo " e2e Run Playwright e2e tests (requires frontend on :5173)"
|
||||
@echo " e2e-ui Run Playwright e2e tests with UI mode"
|
||||
@echo " e2e-grpc Run Rust gRPC integration tests (real backend wiring)"
|
||||
|
||||
Reference in New Issue
Block a user