From bfbe0e1f9ce0bf11082eaf50f3bc5c56c8d04be3 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Thu, 12 Oct 2023 16:50:16 +0200 Subject: [PATCH] Added developer documentation for getting end-to-end tests running. --- docs/en/for-developers/end-to-end-tests.md | 23 ++++++++++++++++++++++ docs/en/for-developers/index.md | 1 + 2 files changed, 24 insertions(+) create mode 100644 docs/en/for-developers/end-to-end-tests.md diff --git a/docs/en/for-developers/end-to-end-tests.md b/docs/en/for-developers/end-to-end-tests.md new file mode 100644 index 0000000000..54db100781 --- /dev/null +++ b/docs/en/for-developers/end-to-end-tests.md @@ -0,0 +1,23 @@ +# End-to-end Tests + +BHIMA has a large collection of end-to-end tests using the [Playwright testing environment](https://playwright.dev/docs/intro). The following guidelines how to get the tests working in your environment. This description assumes that you have already set up BHIMA development environment (see [Installation](./installing-bhima.md)). + +1. Install Playwwright: +```bash + npm install playwright +``` + +2. Verify that everything is consistent. The following commands should give the same version numbers: +```bash + grep 'playwright/test' yarn.lock # if you are using yarn + grep 'playwright/test' package.json + npx playwright --version +``` + +3. Install browsers that Playwright requires +```bash + npx playwright install +``` +NOTE: If you upgrade your version of Playwright in your sandbox, you may need to run this command again to update the browsers for Playwright. + +4. Run the end-to-end tests (see `package.json` for the commands for this). diff --git a/docs/en/for-developers/index.md b/docs/en/for-developers/index.md index c809f5b0ba..d07baedde5 100644 --- a/docs/en/for-developers/index.md +++ b/docs/en/for-developers/index.md @@ -5,4 +5,5 @@ This section provides useful tips and tricks to get developers up and running in 1. [Installation](./installing-bhima.md) 2. [Production deployment with systemd](./production-deployment-with-systemd.md) 3. [Upgrading an existing installation](./upgrading-bhima.md) +3. [End-to-end tests](./end-to-end-tests.md) 4. [Notes on barcodes](./barcodes.md)