This service is for business travellers carrying commercial goods for both import or export. It has two modes; Public Facing and Assisted Digital i.e. Admin which requires stride login.
To start the required services via service manager, run the command:
sm2 --start MERCHANDISE_IN_BAGGAGE_ALL --appendArgs '{"PAYMENTS_PROCESSOR":["-Dmicroservice.services.merchandise-in-baggage.port=8280"]}'
To start the journey in public facing mode, browse the urls below for import and export journeys respectively:
Import local url
: http://localhost:8281/declare-commercial-goods/start-importExport local url
: http://localhost:8281/declare-commercial-goods/start-export
To start the journey in admin mode, browse the url:
Import or Export Choice local url
: http://localhost:8281/declare-commercial-goods/import-export-choice
The stride roles for the admin mode are tps_payment_taker_call_handler,digital_mib_call_handler
.
To run unit tests, integration tests, a11y tests, scalafmt, coverage and check dependencies, execute the script:
./run_all_tests.sh
To run the UI tests against a branch with changes made in this repo, follow the steps below:
- Start all required services and stop this service by running the commands:
sm2 --start MERCHANDISE_IN_BAGGAGE_ALL --appendArgs '{"PAYMENTS_PROCESSOR":["-Dmicroservice.services.merchandise-in-baggage.port=8280"]}'
sm2 --stop MERCHANDISE_IN_BAGGAGE_FRONTEND
- Start this service locally with the correct flags by executing the script:
./run-locally.sh
- Run the UI tests which can be found here.
OR
To run the UI tests without any changes made in this repo, follow the steps below:
- Start all required services and this frontend with the correct flags via service manager by running the appropriate command:
Pubic Facing mode:
sm2 --start MERCHANDISE_IN_BAGGAGE_ALL --appendArgs '{"PAYMENTS_PROCESSOR":["-Dmicroservice.services.merchandise-in-baggage.port=8280"]}'
Admin mode:
sm2 --start MERCHANDISE_IN_BAGGAGE_ALL --appendArgs '{"PAYMENTS_PROCESSOR":["-Dmicroservice.services.merchandise-in-baggage.port=8280"],"MERCHANDISE_IN_BAGGAGE_FRONTEND":["-DadminJourneyFilter.enabled=true"]}'
- Run the UI tests which can be found here.
Have node installed on your machine.
To run the tests locally, simply run:
sbt clean A11y/test
This service is built to accept traffic from the admin.tax.service.gov.uk
domain as well for assisted digital journeys.
The service can detect where the traffic has come from by inspecting the x-forwarded-host
header, this is done in
auth/StrideAuthAction.scala
- this will change some content on some of the pages and also alters the payment journey.
When testing locally, you can enable a filter which will add a header to each request to simulate it coming from the admin domain.
This can be done by updating the adminJourneyFilter.enabled
flag in application.conf
or run-locally.sh
to be true
or alternatively passing it in as a system property e.g. sbt run -DadminJourneyFilter.enabled=true
.
This code is open source software licensed under the Apache 2.0 License.