Giter Club home page Giter Club logo

merchandise-in-baggage-frontend's Introduction

merchandise-in-baggage-frontend

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.

Starting services

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:

To start the journey in admin mode, browse the url:

The stride roles for the admin mode are tps_payment_taker_call_handler,digital_mib_call_handler.

Running Tests

To run unit tests, integration tests, a11y tests, scalafmt, coverage and check dependencies, execute the script:

./run_all_tests.sh

Running UI Tests

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.

Running Accessibility Tests

Prerequisites

Have node installed on your machine.

Execute tests

To run the tests locally, simply run:

sbt clean A11y/test

Enabling 'Admin Mode'

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.

License

This code is open source software licensed under the Apache 2.0 License.

merchandise-in-baggage-frontend's People

Contributors

jordanrowe avatar pasgat avatar sureshhmrc avatar paulhodgson avatar sarthak83 avatar andy1138 avatar gastonracui avatar robpetterson avatar edcope avatar max-hmrc avatar garytate123 avatar frikit avatar matthewwardcap avatar lmugnai avatar hmrc-web-operations avatar ryandac avatar taiwo-ab avatar stephenheath101 avatar leeroyc720 avatar fraser-sprott avatar dannypennington97 avatar anu9 avatar don-mac avatar ewanhardingham avatar platops-teams-and-repositories-live avatar mrberesford avatar mywyau avatar paulc-tds avatar jassalrichy avatar slavvco avatar

Stargazers

KIDI'S-TECH avatar spamegg avatar

Watchers

 avatar  avatar James Cloos avatar  avatar  avatar Sean Ellis avatar Colm Cavanagh avatar  avatar Ashwini Rudrappa avatar Les Jones avatar Adrian Jones avatar  avatar Olabode Alarapon avatar Reeshi Shah avatar Mark Wright avatar Umar Gurung avatar Yang Wong avatar  avatar

merchandise-in-baggage-frontend's Issues

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.