feca-mailshots-plugin/tests/e2e/run.sh

18 lines
434 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)"
FIXTURE_PORT="${FIXTURE_PORT:-8092}"
BASE_URL="${E2E_BASE_URL:-http://127.0.0.1:${FIXTURE_PORT}}"
cd "${ROOT_DIR}"
FIXTURE_PORT="${FIXTURE_PORT}" scripts/run_fixture_server.sh start >/dev/null
if [[ ! -d node_modules ]]; then
npm install
fi
npx playwright install chromium
E2E_BASE_URL="${BASE_URL}" npx playwright test