Skip to content

hmrc/customs-historic-statement-frontend

Repository files navigation

Customs Historic Statement Frontend

License Coverage Accessibility

A micro-frontend service - This service provides an interface which allows the user to download and view historic documents

This service is built following GDS standards to WCAG 2.2 AA

We use the GOV.UK design system to ensure consistency and compliance through the project

This applications lives in the "public" zone. It integrates with:

Secure Payments Service (SPS) / Enterprise Tax Management Platform (ETMP) via the Customs Financials API

Secure Document Exchange Service (SDES) bulk data API via the SDES proxy

Running the service

From the root directory

sbt run - starts the service locally

sbt runAllChecks - Will run all checks required for a successful build

Default service port on local - 9396

Required dependencies

There are a number of dependencies required to run the service.

The easiest way to get started with these is via the service manager CLI - you can find the installation guide here

Command Description
sm2 --start CUSTOMS_FINANCIALS_ALL Runs all dependencies
sm2 -s Shows running services
sm2 --stop CUSTOMS_HISTORIC_STATEMENT Stop the micro service
sbt run (from root dir) to compile the current service with your changes

Runtime Dependencies

  • AUTH
  • AUTH_LOGIN_STUB
  • AUTH_LOGIN_API
  • BAS_GATEWAY
  • CA_FRONTEND
  • SSO
  • USER_DETAILS
  • CUSTOMS_FINANCIALS_API
  • CUSTOMS_FINANCIALS_HODS_STUB
  • CUSTOMS_FINANCIALS_SDES_STUB
  • CONTACT_FRONTEND

Login enrolments

The service can be accessed by using below enrolments and with below sample EORI numbers, via http://localhost:9949/auth-login-stub/gg-sign-in (on local) or https://host:port/auth-login-stub/gg-sign-in on DEV/QA/STAGING

Redirect URL - /customs/payment-records

Enrolment Key Identifier Name Identifier Value
HMRC-CUS-ORG EORINumber GB744638982000
HMRC-CUS-ORG EORINumber GB744638982001

Testing

The minimum requirement for test coverage is 90%. Builds will fail when the project drops below this threshold.

Unit Tests

Command Description
sbt test Runs unit tests locally
sbt "test:testOnly *TEST_FILE_NAME*" runs tests for a single file

Coverage

Command Description
sbt clean coverage test coverageReport Generates a unit test coverage report that you can find here target/scala-3.3.5/scoverage-report/index.html

Available Routes

You can find a list of microservice specific routes here - /conf/app.routes

Application entrypoint: /customs/payment-records

Feature Switches

Caution!

There's a risk of WIP features being exposed in production! Don't enable features in application.conf, as this will apply globally by default

Enable features

Command Description
sbt "run -Dfeatures.some-feature-name=true" enables a feature locally without risking exposure

Available feature flags

Flag Description
fixed-systemdate-for-tests Fix the system date for running tests

Note: Microservices must be running with test-only routes explicitly enabled, via this switch in the app-config-<env>, the service manager microservice profile, or just via sbt run locally:

"-Dapplication.router=testOnlyDoNotUseInAppConf.Routes"

Helpful commands

Command Description
sbt runAllChecks Runs all standard code checks
sbt clean Cleans code
sbt compile Better to say 'Compiles the code'
sbt coverage Prints code coverage
sbt test Runs unit tests
sbt it/test Runs integration tests
sbt scalafmtCheckAll Runs code formatting checks based on .scalafmt.conf
sbt scalastyle Runs code style checks based on /scalastyle-config.xml
sbt Test/scalastyle Runs code style checks for unit test code /test-scalastyle-config.xml
sbt coverageReport Produces a code coverage report
sbt "test:testOnly *TEST_FILE_NAME*" runs tests for a single file
sbt clean coverage test coverageReport Generates a unit test coverage report that you can find here target/scala-3.3.5/scoverage-report/index.html
sbt "run -Dfeatures.some-feature-name=true" enables a feature locally without risking exposure

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors