0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 00:46:45 +01:00
posthog/bin/e2e-test-runner
Karl-Aksel Puulmann 30b6692920
React component tests with cypress (#3233)
* WIP: get cypress something doing

* Get a test running

* Get css loading, stub posthog

* Move helpers to separate file

* Givens > given2

It plays nicer with beforeEach

* Test for session filters

* Test date navigation

* Test filtering

* Try keep old tests running

* Try get tests running under CI

* Prettify fixtures

* Cleanup, use cypress 6

* Add yarn build

* Fix e2e cypress tests

* given2 => givens

* Rename `frontend-test-runner` to `e2e-test-runner`

* Fix cypress test

* Add webpack-preprocessor as a devDependency

* Improve freezing time

* Make css inclusions automatic for component tests
2021-02-09 17:28:01 +02:00

13 lines
551 B
Bash
Executable File

#!/bin/bash
set -e
dropdb --if-exists posthog_e2e_test
createdb posthog_e2e_test
DEBUG=1 DATABASE_URL=postgres://localhost:5432/posthog_e2e_test python manage.py migrate &&
DEBUG=1 DATABASE_URL=postgres://localhost:5432/posthog_e2e_test python manage.py setup_dev &
yarn add cypress-terminal-report
./bin/start-frontend &
CYPRESS_BASE_URL=http://localhost:8080 npx cypress open --config-file cypress.e2e.json &
DEBUG=1 TEST=1 DATABASE_URL=postgres://localhost:5432/posthog_e2e_test python manage.py runserver 8080
yarn remove cypress-terminal-report