Set up Playwright for browser testing
- Playwright config for local browsers (Firefox by default) and Docker Chrome - docker-compose.chrome.yml for browserless/chrome container (arm64) - 4 connectivity smoke tests (home, contact, blog pages) - 3 auth tests (redirect, login, logout) with auth helpers - Custom fixtures with remote CDP connect support - Shell scripts for start/stop/full Docker Chrome workflow - Makefile targets: playwright, playwright-docker, playwright-full
This commit is contained in:
@@ -25,3 +25,28 @@ test:
|
||||
# Format code
|
||||
format:
|
||||
@make -C app format
|
||||
|
||||
# Run Playwright browser-based tests (requires running server)
|
||||
# Set PLAYWRIGHT_BASE_URL to point at the running Phoenix app
|
||||
playwright:
|
||||
@make -C app playwright
|
||||
|
||||
# Run Playwright in UI mode (headed browser)
|
||||
playwright-ui:
|
||||
@make -C app playwright-ui
|
||||
|
||||
# Run Playwright against Docker Chrome container (must be running)
|
||||
playwright-docker:
|
||||
@make -C app playwright-docker
|
||||
|
||||
# Full e2e workflow: start Chrome container, run tests, stop container
|
||||
playwright-full:
|
||||
@make -C app playwright-full
|
||||
|
||||
# Start Docker Chrome container
|
||||
playwright-docker-start:
|
||||
@make -C app playwright-docker-start
|
||||
|
||||
# Stop Docker Chrome container
|
||||
playwright-docker-stop:
|
||||
@make -C app playwright-docker-stop
|
||||
Reference in New Issue
Block a user