Skip to content

Commit 0972570

Browse files
committed
feat: add REPORT=1 flag to dev-e2e for post-run HTML report
Opens the Playwright HTML report in a browser after tests finish, showing screenshots, traces, and step-by-step test execution for visual verification of tested workflows. Usage: make dev-e2e FILE=navigation REPORT=1
1 parent aba2216 commit 0972570

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ make e2e
117117
make dev-e2e FILE=navigation
118118
make dev-e2e FILE=navigation GREP="help menu"
119119
make dev-e2e GREP="should navigate"
120+
make dev-e2e FILE=navigation REPORT=1 # Open HTML report after run
120121

121122
# Or call the script directly for more control:
122123
./scripts/test-e2e.sh # All E2E (full-stack)

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,19 @@ e2e:
112112
@echo "Using E2E slot $(HDX_E2E_SLOT) (ch=$(HDX_E2E_CH_PORT) mongo=$(HDX_E2E_MONGO_PORT) api=$(HDX_E2E_API_PORT) app=$(HDX_E2E_APP_PORT))"
113113
./scripts/test-e2e.sh
114114

115-
# Run a specific E2E test file or grep pattern (dev mode: containers kept running)
115+
# Run a specific E2E test file or grep pattern (dev mode: hot reload)
116116
# Usage:
117117
# make dev-e2e FILE=navigation # Run tests/e2e/**/navigation*.spec.ts
118118
# make dev-e2e FILE=navigation GREP="help menu" # Run matching tests within that file
119119
# make dev-e2e GREP="should navigate" # Run matching tests across all files
120+
# make dev-e2e FILE=navigation REPORT=1 # Open HTML report after tests finish
120121
.PHONY: dev-e2e
121122
dev-e2e:
122123
@echo "Using E2E slot $(HDX_E2E_SLOT) (ch=$(HDX_E2E_CH_PORT) mongo=$(HDX_E2E_MONGO_PORT) api=$(HDX_E2E_API_PORT) app=$(HDX_E2E_APP_PORT))"
123-
./scripts/test-e2e.sh --dev $(if $(FILE),tests/e2e/**/$(FILE)*.spec.ts) $(if $(GREP),--grep "$(GREP)") $(ARGS)
124+
./scripts/test-e2e.sh --dev $(if $(FILE),tests/e2e/**/$(FILE)*.spec.ts) $(if $(GREP),--grep "$(GREP)") $(ARGS); \
125+
ret=$$?; \
126+
$(if $(REPORT),cd packages/app && npx playwright show-report;) \
127+
exit $$ret
124128

125129

126130

agent_docs/development.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ make dev-e2e FILE=navigation GREP="help menu"
105105
# Grep across all files
106106
make dev-e2e GREP="should navigate"
107107

108+
# Open HTML report after tests finish (screenshots, traces, step-by-step)
109+
make dev-e2e FILE=navigation REPORT=1
110+
108111
# Or call the script directly for more control
109112
./scripts/test-e2e.sh --ui --last-failed
110113

0 commit comments

Comments
 (0)