👋 New to our project? Be sure to review the OpenMRS 3 Frontend Developer Documentation 🧑🏫
openmrs-esm-admin-tools provides microfrontends for various administrative functions and administrative modules in the OpenMRS ecosystem. It provides tools to allow admin users to effectively manage their 3.x installation without needing to drop to the v1 console.
Please see the O3 Docs config guide for information about configuring modules.
See the guidance in the Developer Documentation.
This repository uses Yarn.
To start the dev server for a specific package, run
yarn start --sources 'packages/esm-<package>-app'
This will start a dev server for that package.
To start a dev server running all the packages, run
yarn start-all
Note that this is very much not recommended.
To run tests for all packages, run:
yarn turbo test
To run tests in watch
mode, run:
yarn turbo test:watch
To run tests for a specific package, pass the package name to the --filter
flag. For example, to run tests for esm-patient-system-admin-app
, run:
yarn turbo test --filter="esm-system-admin-app"
To run a specific test file, run:
yarn turbo test -- dashboard
The above command will only run tests in the file or files that match the provided string.
You can also run the matching tests from above in watch mode by running:
yarn turbo test:watch -- dashboard
To generate a coverage
report, run:
yarn turbo coverage
By default, turbo
will cache test runs. This means that re-running tests wihout changing any of the related files will return the cached logs from the last run. To bypass the cache, run tests with the force
flag, as follows:
yarn turbo test --force
To set up environment variables for the project, follow these steps:
- Create a copy of the .env.example file by running the following command:
cp example.env .env
-
Open the newly created .env file in the root of the project.
-
Add the environment variables you need.
Note: These variables are currently only used for end-to-end tests.
To run E2E tests, make sure the dev server is running by using:
yarn start --sources 'packages/esm-*-app/'
Then, in a separate terminal, run:
yarn test-e2e --headed
Please read our e2e docs for more information about E2E testing.
See the Frontend Implementer Documentation for information about adding microfrontends to a distribution.