Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

update readme

ThieryMichel910035470276
diff --git a/README.md b/README.md
index 7905e564..be971823 100644
--- a/README.md
+++ b/README.md
@@ -65,13 +65,29 @@ The user and developer documentation for this project is available [in the `doc/
## Testing Changes
-This project contains unit tests. Run them with the following command:
+This project contains unit tests and e2e.
+Run unit test with the following command:
```sh
make test
```
+Run e2e test with:
+
+```sh
+make test-e2e
+```
+
+Note: the `make test-e2e` will run the the e2e test in ui mode against a vite server with hot reload for ease of development. On the CI the e2e test will be run against the built app. If you need to run the test against the built file instead. You can run:
+
+```sh
+make start-e2e-ci # To launch the CI e2e environment (serving the built app)
+# followed by
+npx playwright test --ui
+```
+
You can add your own unit tests powered by Jest anywhere in the `src` directory. The test files should be named `*.test.tsx` or `*.test.ts`.
+And you can also add your own e2e test. The e2e test files should be placed inside the `./e2e` folder
## Getting Updates
diff --git a/makefile b/makefile
index b11750c1..a033ecea 100644
--- a/makefile
+++ b/makefile
@@ -57,6 +57,8 @@ stop-supabase-e2e: ## stop the e2e supabase instance
start-e2e: start-supabase-e2e start-app-e2e ## start the stack in e2e mode (fresh supabase instance + app pointing to it)
+start-e2e-ci: start-supabase-e2e start-app-e2e-ci ## start the stack in e2e mode in CI (fresh supabase instance + built app pointing to it)
+
stop-e2e: stop-supabase-e2e stop-app-e2e ## stop the stack in e2e mode
build: ## build the app
@@ -94,7 +96,7 @@ test-integration:
test-e2e: start-e2e
npx playwright test --ui
-test-e2e-ci: start-supabase-e2e start-app-e2e-ci
+test-e2e-ci: start-e2e-ci
npx wait-on http-get://localhost:54341/auth/v1/health http-get://localhost:5175
npx playwright test