Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

johnsonandjohnson/openmrs-esm-admin-tools

 
 

Repository files navigation

👋 New to our project? Be sure to review the OpenMRS 3 Frontend Developer Documentation 🧑‍🏫

OpenMRS CI

OpenMRS ESM Admin Tools

What is this?

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.

How do I configure this module?

Please see the O3 Docs config guide for information about configuring modules.

Setup

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.

Running tests

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

E2E tests

To set up environment variables for the project, follow these steps:

  1. Create a copy of the .env.example file by running the following command:
cp example.env .env
  1. Open the newly created .env file in the root of the project.

  2. 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.

Deployment

See the Frontend Implementer Documentation for information about adding microfrontends to a distribution.

About

Administrative microfrontends for OpenMRS 3.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 85.3%
  • JavaScript 6.2%
  • SCSS 4.4%
  • Shell 2.7%
  • Dockerfile 1.4%