2020-05-19 20:48:10 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
2021-12-21 17:08:14 +01:00
|
|
|
DATABASE="posthog_e2e_test"
|
|
|
|
|
|
|
|
export PGHOST="${PGHOST:=localhost}"
|
|
|
|
export PGUSER="${PGUSER:=posthog}"
|
|
|
|
export PGPASSWORD="${PGPASSWORD:=posthog}"
|
|
|
|
export PGPORT="${PGPORT:=5432}"
|
|
|
|
export DATABASE_URL="postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:${PGPORT}/${DATABASE}"
|
|
|
|
|
|
|
|
dropdb --if-exists $DATABASE
|
|
|
|
createdb $DATABASE
|
|
|
|
DEBUG=1 python manage.py migrate &&
|
|
|
|
DEBUG=1 python manage.py setup_dev &
|
2021-04-08 19:14:06 +02:00
|
|
|
yarn add cypress@6.7.0 cypress-terminal-report@2.1.0 @cypress/react@4.16.4 @cypress/webpack-preprocessor@5.7.0
|
2021-02-26 15:50:21 +01:00
|
|
|
|
2021-12-21 17:08:14 +01:00
|
|
|
NO_RESTART_LOOP=1 ./bin/plugin-server &
|
2021-02-26 15:50:21 +01:00
|
|
|
# Only start webpack if not already running
|
|
|
|
nc -vz 127.0.0.1 8234 2> /dev/null || ./bin/start-frontend &
|
|
|
|
|
2021-02-09 16:28:01 +01:00
|
|
|
CYPRESS_BASE_URL=http://localhost:8080 npx cypress open --config-file cypress.e2e.json &
|
2021-12-21 17:08:14 +01:00
|
|
|
OPT_OUT_CAPTURE=1 SECURE_COOKIES=0 DEBUG=0 TEST=1 E2E_TESTING=1 EMAIL_HOST=email.test.posthog.net SITE_URL=test.posthog.net python manage.py runserver 8080
|
2021-04-08 19:14:06 +02:00
|
|
|
yarn remove cypress cypress-terminal-report @cypress/react @cypress/webpack-preprocessor
|