项目作者: hmcts

项目描述 :
Citizen frontend application for Civil Money Claims
高级语言: TypeScript
项目地址: git://github.com/hmcts/cmc-citizen-frontend.git
创建时间: 2017-08-15T15:44:48Z
项目社区:https://github.com/hmcts/cmc-citizen-frontend

开源协议:MIT License

下载


CMC Frontend

Greenkeeper badge

Standard - JavaScript Style Guide

codecov

This is the frontend application for CMC. Service provides web UI for citizens, presented as sequence of HTML 5 web pages designed to GDS Service Design guidelines, so that they can make money claims and / or perform associated actions e.g submitting defence or requesting default judgement.

Service delegates most of the non UI responsibilities to underlying services e.g. claim-store or pdf-service.

Getting Started

Prerequisites

Running the application

Install dependencies by executing the following command:

  1. $ yarn install

Run:

  1. $ gulp

It will be available at https://localhost:3000

Running the application on docker (integrated environment)

See the README.md in hmcts/cmc-integration-tests

Developing

Code style

We use TSLint with StandardJS rules alongside sass-lint

Running the linting:
yarn lint

Running the tests

Mocha is used for writing tests.

Run them with:

  1. $ yarn tests

For functional testing:

  1. $ yarn test:routes

For accessibility testing:

  1. $ yarn tests:a11y

For test coverage:

  1. $ yarn test:coverage

For unit test coverage only:

  1. $ yarn test:coverage-unit

Running end to end tests

Integration tests are written using CodeceptJS framework and reside in src/integration-test directory. They are executed using Docker.

If you want to run them to see if your changes work, you will need to build a docker image containing your updates:

  1. $ docker-compose build citizen-integration-tests

Then you can go to the integration-tests project and run them with:

  1. $ ./bin/run-local-citizen-tests.sh

If you didn’t have a dockerized environment running it will be started up for you. If you prefer to start it up yourself beforehand, do:

  1. $ ./bin/start-local-environment.sh

For more details on the dockerized environment please refer to integration-tests repository’sREADME file.

Troubleshooting

Warnings while running yarn install on yarn version 1.0.1

There is currently an open issue : https://github.com/yarnpkg/yarn/issues/3751

Example:

  1. warning The case-insensitive file ..\cmc-citizen-frontend\node_modules\nyc\node_modules shouldn't be copied twice in one bulk copy
  2. warning The case-insensitive file ..\cmc-citizen-frontend\node_modules\nyc\node_modules\ansi-regex shouldn't be copied twice in one bulk copy

Preview Environment

We get a fully functional environment in Azure Kubernetes (AKS) per pull request. For more
info see: https://tools.hmcts.net/confluence/display/ROC/AKS+-+Azure+Managed+Kubernetes

License

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