Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1.7 kB · 43 lines
Shell
1234567891011121314151617181920212223242526272829303132333435363738394041424344#!/usr/bin/env bash## Run the headless-web e2e suite (Playwright) against a self-contained# `streamplace e2e` harness — the web counterpart to hack/e2e-local.sh.## hack/e2e-web-local.sh [--upstream-station] [-- <extra playwright args>]## Prerequisites:# * A streamplace binary with the embedded web bundle (`make dev`).# EXPO_PUBLIC_WEB_TRY_LOCAL is *not* required: the Playwright global# setup drives Settings -> Advanced and points the app at the harness# node itself (the web counterpart of .maestro/setup/server-setup.yaml), so# a plain `make dev` build works. Building with# EXPO_PUBLIC_WEB_TRY_LOCAL=true only changes the app's compile-time# default (window origin instead of https://stream.place).# * Playwright + its chromium browser installed in js/e2e-web# (pnpm --filter @streamplace/e2e-web install-browser; needs root for# --with-deps, so run it inside the container).# * For the OAuth flow, the harness's HTTPS mode: see hack/lib/e2e-harness.sh.## On a dev host without the cgo runtime, run this inside the build container.set -euo pipefail
cd "$(dirname "$0")/.."REPO="$PWD"
if [ "${1:-}" = "--upstream-station" ]; then export SP_E2E_UPSTREAM_STATION=true shiftfi[ "${1:-}" != "--" ] || shift# shellcheck source=hack/lib/e2e-harness.sh. hack/lib/e2e-harness.she2e_harness_startif [ "${E2E_UPSTREAM_STATION:-}" = true ] && [ $# -eq 0 ]; then set -- upstream-station.spec.tsfi
# --- run the flows ---------------------------------------------------------# No `exec` here: that would replace this shell and discard the EXIT trap,# leaving the harness and its children running after a successful run.cd "$REPO/js/e2e-web"pnpm exec playwright test "$@"