hmcts / civil-general-apps-ccd-definition

Backend CCD Definition for General Applications
MIT License
2 stars 2 forks source link
jenkins-cft jenkins-cft-a-c

civil-general-apps-ccd-definition

Build (Dev)

run:

./bin/import-ccd-definition-dev.sh

Testing

The repo uses codeceptjs framework for e2e tests.

To install dependencies enter yarn install.

To run e2e tests enter yarn test:e2e in the command line.

Optional configuration

To run tests with browser window open set SHOW_BROWSER_WINDOW=true. By default, the browser window is hidden.

Smoke test

To run smoke tests enter yarn test:smoke.

API test

Before running API tests, you will need the SENDGRID_API_KEY environment variable setup and to be running the service locally along with all containers.

To run API tests enter yarn test:api.

Adding Git Conventions

Include the git conventions.

If you violate a convention, the git error message will report clearly the convention you should follow and provide additional information where necessary.

Optional:

In case of problems

  1. Get in touch with your Technical Lead so that they can get you unblocked
  2. If the rare eventuality that the above is not possible, you can disable enforcement of conventions using the following command

    git config --local --unset core.hooksPath

    Still, you shouldn't be doing it so make sure you get in touch with a Technical Lead soon afterwards.

Development / Debugging Environment - Preview with Mirrord

As an alternative for a development environment there is a procedure in place where after running the command below the required services for Civil are created in Preview under the developer's name, so these will be exclusively for the named developer use.

While connected to the VPN simply run one of the below commands from your project's (civil-ccd-definition) folder: Note: be sure to have Docker running

npx @hmcts/dev-env@latest && ./bin/setup-devuser-preview-env.sh

You can optionally specify a branch for CCD definitions and Camunda definitions like below or leave it blank to use master.

npx @hmcts/dev-env@latest && ./bin/setup-devuser-preview-env.sh camundaBranch dmnBranch waStandaloneBranch

Once the pods are up and running you can connect to them using a plugin called Mirrord on Intellij. https://mirrord.dev

If you want to clean up the environment just run:

npx @hmcts/dev-env@latest --delete

To run the specialised charts, where you can get Work Allocation for instance, run:

npx @hmcts/dev-env@latest --template values.enableWA.preview.template.yaml && ./bin/setup-devuser-preview-env.sh

License

This project is licensed under the MIT License - see the LICENSE file for details