twenty/packages/twenty-e2e-testing
Félix Malfait 736635a94b
Begin moving to postgres spilo + adding pgvector (#8309)
We will remove the `twenty-postgres` image that was used for local
development and only use `twenty-postgres-pilo` (which we use in prod),
bringing the development environment closer to prod and avoiding having
to maintain 2 images.


Instead of provisioning the super user after the db initialization, we
directly rely on the superuser provided by Spilo for simplicity. We also
introduce a change that tries to create the right database (`default` or
`test`) based on the context.
  

How to test:
```
docker build -t twentycrm/twenty-postgres-spilo:latest -f ./packages/twenty-docker/twenty-postgres-spilo/Dockerfile .
docker images --no-trunc | grep twenty-postgres-spilo
postgres-on-docker:
	docker run \
	--name twenty_pg \
	-e PGUSER_SUPERUSER=twenty \
	-e PGPASSWORD_SUPERUSER=twenty \
	-e ALLOW_NOSSL=true \
	-v twenty_db_data:/home/postgres/pgdata \
	-p 5432:5432 \
	REPLACE_WITH_IMAGE_ID
```
2024-11-15 09:38:30 +01:00
..
config E2E tests (#6717) 2024-08-27 11:07:10 +02:00
drivers Begin moving to postgres spilo + adding pgvector (#8309) 2024-11-15 09:38:30 +01:00
lib Playwright POM (#8109) 2024-11-07 15:38:28 +01:00
tests Playwright POM (#8109) 2024-11-07 15:38:28 +01:00
.env.example E2E tests (#6717) 2024-08-27 11:07:10 +02:00
.gitignore E2E tests (#6717) 2024-08-27 11:07:10 +02:00
package.json feat(e2e): twenty-e2e-testing with playwright (#6539) 2024-08-14 17:23:32 +02:00
playwright.config.ts E2E tests (#6717) 2024-08-27 11:07:10 +02:00
README.md E2E tests (#6717) 2024-08-27 11:07:10 +02:00

Twenty e2e Testing

Prerequisite

Installing the browsers:

yarn playwright install 

Run end-to-end tests

yarn run test:e2e

Start the interactive UI mode

yarn run test:e2e:ui

Run test only on Desktop Chrome

yarn run test:e2e:chrome

Run test in specific file

yarn run test:e2e <filename>

Runs the tests in debug mode.

yarn run test:e2e:debug

Q&A

Why there's path.resolve() everywhere?

That's thanks to differences in root directory when running tests using commands and using IDE. When running tests with commands, the root directory is twenty/packages/twenty-e2e-testing, for IDE it depends on how someone sets the configuration. This way, it ensures that no matter which IDE or OS Shell is used, the result will be the same.