From d44abd1cc7b6d508e6c33293ff6f5cc10c24f9ad Mon Sep 17 00:00:00 2001 From: Travis Vasceannie Date: Mon, 29 Dec 2025 22:51:42 -0500 Subject: [PATCH] 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. --- Makefile | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f3d24a3..7bc2b1e 100644 --- a/Makefile +++ b/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)"