From 0bc1148b550e74926424a39efdfb7fe7d4cd7bcc Mon Sep 17 00:00:00 2001 From: User Date: Wed, 31 Jul 2024 21:57:04 -0500 Subject: [PATCH 1/3] Add e2e section in README.md --- frontend/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/frontend/README.md b/frontend/README.md index 7dd453b6dc..8db593e980 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -115,3 +115,21 @@ The frontend code is structured as follows: * `frontend/src/hooks` - Custom hooks. * `frontend/src/routes` - The different routes of the frontend which include the pages. * `theme.tsx` - The Chakra UI custom theme. + +## End-to-End Testing with Playwright + +The frontend includes initial end-to-end tests using Playwright. To run the tests, you need to have the Docker Compose stack running. Then, you can run the tests with the following command: + +```bash +npx playwright test +``` + +You can also run your tests in UI mode to see the browser and interact with it running: + +```bash +npx playwright test --ui +``` + +To update the tests, navigate to the tests directory and modify the existing test files or add new ones as needed. + +For more information on writing and running Playwright tests, refer to the official [Playwright documentation](https://playwright.dev/docs/intro) \ No newline at end of file From b1b71c6edf99ae932aebce6e8623441e6b628422 Mon Sep 17 00:00:00 2001 From: User Date: Thu, 1 Aug 2024 11:01:33 -0500 Subject: [PATCH 2/3] Update docs --- README.md | 1 + frontend/README.md | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d7e04da26c..b2dcf9aa41 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ - ๐Ÿ’ƒ Using TypeScript, hooks, Vite, and other parts of a modern frontend stack. - ๐ŸŽจ [Chakra UI](https://chakra-ui.com) for the frontend components. - ๐Ÿค– An automatically generated frontend client. + - ๐Ÿงช [Playwright](https://playwright.dev) for End-to-End testing. - ๐Ÿฆ‡ Dark mode support. - ๐Ÿ‹ [Docker Compose](https://www.docker.com) for development and production. - ๐Ÿ”’ Secure password hashing by default. diff --git a/frontend/README.md b/frontend/README.md index 8db593e980..a5f970e3c8 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -118,7 +118,13 @@ The frontend code is structured as follows: ## End-to-End Testing with Playwright -The frontend includes initial end-to-end tests using Playwright. To run the tests, you need to have the Docker Compose stack running. Then, you can run the tests with the following command: +The frontend includes initial end-to-end tests using Playwright. To run the tests, you need to have the Docker Compose stack running. Start the stack with the following command: + +```bash +docker compose up -d +``` + +Then, you can run the tests with the following command: ```bash npx playwright test @@ -130,6 +136,12 @@ You can also run your tests in UI mode to see the browser and interact with it r npx playwright test --ui ``` +To stop and remove the Docker Compose stack and clean the data created in tests, use the following command: + +```bash +docker compose down -v +``` + To update the tests, navigate to the tests directory and modify the existing test files or add new ones as needed. For more information on writing and running Playwright tests, refer to the official [Playwright documentation](https://playwright.dev/docs/intro) \ No newline at end of file From 2c77c535b124f9f23d9e7d6687b360f7f46420d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 1 Aug 2024 11:46:44 -0500 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Update=20frontend/READ?= =?UTF-8?q?ME.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/README.md b/frontend/README.md index a5f970e3c8..13e3a8c488 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -144,4 +144,4 @@ docker compose down -v To update the tests, navigate to the tests directory and modify the existing test files or add new ones as needed. -For more information on writing and running Playwright tests, refer to the official [Playwright documentation](https://playwright.dev/docs/intro) \ No newline at end of file +For more information on writing and running Playwright tests, refer to the official [Playwright documentation](https://playwright.dev/docs/intro). \ No newline at end of file