#!/bin/bash set -e echo "Setting up Playwright E2E tests..." # Install dependencies echo "Installing npm dependencies..." npm install # Install Playwright browsers echo "Installing Playwright browsers..." npx playwright install # Create .env if it doesn't exist if [ ! -f .env ]; then echo "Creating .env file from template..." cp .env.example .env echo "" echo "IMPORTANT: Edit .env and set your test user credentials!" echo " TEST_USER_EMAIL, TEST_USER_PASSWORD, and TEST_USER_TOTP_SECRET" echo "" fi # Create .auth directory mkdir -p tests/.auth echo "Setup complete!" echo "" echo "Next steps:" echo " 1. Edit .env with your test user credentials" echo " 2. Create a test user (see README.md)" echo " 3. Run: npm test"