Git Product home page Git Product logo

ampath-esm-3.x's Introduction

AMPATH O3

This monorepo houses custom frontend modules used in the AMPATH O3 frontend. These include:

Setup

Check out the developer documentation here.

Install dependencies by running:

yarn

Development

To run a local dev server for a specific frontend module, run:

yarn start --sources 'packages/esm-<insert-package-name>-app'

Where the argument to --sources is the name of the frontend module you want to run. It will run a dev server proxied to a hosted instance of the AMPATH backend by default.

You could provide yarn start with as many sources arguments as you require. For example, to run the patient registration and patient search modules only, use:

yarn start --sources 'packages/esm-patient-search-app' --sources 'packages/esm-patient-registration-app'

Troubleshooting

If you notice that your local version of the application is not working or that there's a mismatch between what you see locally versus what's in the reference application, you likely have outdated versions of core libraries. To update core libraries, run the following commands:

# Upgrade core libraries
yarn up openmrs @openmrs/esm-framework

# Reset version specifiers to `next`. Don't commit actual version numbers.
git checkout package.json

# Run `yarn` to recreate the lockfile
yarn

Contributing

Please read our contributing guide.

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-conditions-app, run:

yarn turbo test --filter="esm-patient-conditions-app"

To run a specific test file, run:

yarn turbo test -- basic-search

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 --basic-search

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

Unit tests

To run unit tests, use:

yarn test

E2E 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 test guide for more information about E2E testing.

Updating Playwright Version

To upgrade your Playwright version, ensure that you update both the package.json file and the e2e/support/bamboo/playwright.Dockerfile.

Design Patterns

For documentation about our design patterns, please visit our design system documentation website.

Deployment

The main branch of this repo is deployed in a demo environment.

Configuration

This module is designed to be driven by configuration files. Each module has a config-schema.ts file at its root. This file contains the schema for the configuration file that the module expects. The distro-level configuration file is located here. To learn more about configuration, read the Distro config and the Configuration guides in the official docs.

ampath-esm-3.x's People

Contributors

rugute avatar justusomondi avatar hiqedme avatar donaldkibet avatar korirc avatar denniskigen avatar henrykorir avatar pseurey avatar injiri avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.