Giter Club home page Giter Club logo

ia-aip-frontend's Introduction

ia-aip-frontend

Purpose

Prerequisites

To run the project you will need to have the following installed:

  • Node.js
  • Yarn

For information about the software versions used to build this application and a complete list of its dependencies see package.json

Running the application

Fore Local development you will need to set the following environment variables:

IDAM_SECRET=OOOOOOOOOOOOOOOO
IDAM_WEB_URL=http://localhost:3501
IDAM_API_URL=http://localhost:5000
S2S_SECRET=AAAAAAAAAAAAAAAC
S2S_URL=http://localhost:4502
CCD_API_URL=http://localhost:4452
S2S_MICROSERVICE_NAME=iac
MICROSERVICE=ccd_gateway
DOC_MANAGEMENT_URL=http://dm-store:4506
CASE_DOCUMENT_AM_URL=http://localhost:4455
ADDRESS_LOOKUP_TOKEN=THE_ADDRESS_LOOKUP_TOKEN

Specific features, the app contains some toggleable features to enable these use the following environment variables according to your needs.

USE_SESSION_LOGGER=true
TIMELINE_ENABLED=true
ASK_FOR_MORE_TIME_ENABLED=true

You can run the application as follows:

yarn install
yarn dev

These commands will download any required dependencies, and start a webserver listening on port 3000

Running with mocks

The application relies on having a running version of CCD and idam you can run mock versions of these with

yarn dev:mock

This will run the app and point it to the mocked IDAM and CCD services. It does not matter what username or password you enter but the following users will create different results.

Username Behaviour
[email protected] Does not find a case to load in mock CCD so creates a new case
[email protected] Loads a case from mock CCD. This case can be updated in a session but changes will not be persisted when a user logs out

If the username is not recognised then [email protected] behaviour will be used.

Using the application

To understand if the application is working, you can call its health endpoint:

curl https://localhost:3000/health

If the API is running, you should see this response:

{"status":"UP"}

Running verification tests:

You can run the unit and functional tests as follows:

yarn test

You can run the smoke against a running instance as follows:

yarn test:smoke

You can run the security check as follows:

yarn test:nsp

Build pipeline

The pipeline build has the following steps

Yarn command Description
yarn cache clean
yarn check
yarn --mutex network install --frozen-lockfile
yarn lint
yarn build
yarn test Runs yarn test:unit && cross-env USE_REDIS=false yarn codecept:functional functional tests start service against mocks and do not use Redis. Can add environment variable FUNCTIONAL_TESTS to specify a regex to just run some of the functional tests.
yarn test:coverage
yarn test:a11y Starts service and runs against mocks. Just hits each page and checks it is accessible.
yarn sonar-scan
yarn test:smoke Hits the health endpoint of the deployed service.
yarn test:functional End to end test that runs against a deployed service.

Adding Git Conventions

Include the git conventions.

  • Make sure your git version is at least 2.9 using the git --version command
  • Run the following command:
git config --local core.hooksPath .git-config/hooks

Once the above is done, you will be required to follow specific conventions for your commit messages and branch names.

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

Optional:

  • Install this plugin in Chrome: https://github.com/refined-github/refined-github

    It will automatically set the title for new PRs according to the first commit message, so you won't have to change it manually.

    Note that it will also alter other behaviours in GitHub. Hopefully these will also be improvements to you.

In case of problems

  1. Get in touch with your Technical Lead and inform them, so they can adjust the git hooks accordingly

  2. Instruct IntelliJ not to use Git Hooks for that commit or use git's --no-verify option if you are using the command-line

  3. 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.

Styles

In case we added some custom styles, or modified existing one we need to refresh the build:

  1. in package.json we need to change "build": "webpack --config webpack/webpack.dev.js"
  2. yarn build
  3. yarn dev

ia-aip-frontend's People

Contributors

alexbaeza avatar amandarichards avatar augustio avatar bradsorour avatar burale avatar chrisgrimble avatar colmlynch60 avatar dependabot[bot] avatar filippo-possenti-version1 avatar gavinslilley avatar gregorio-massara avatar ikirsanov avatar indu2019 avatar jakecohensol avatar jamiephillipshmcts avatar jip1984 avatar jkumar-moj avatar kleog avatar ludo05 avatar makowalski avatar marcellofabbri avatar nilay913 avatar paul-peasegood avatar raghera avatar rajeshthuraiyur avatar sabahirfan avatar sajjadh-v1 avatar srinivasuluputcha avatar t0nin0s avatar tarun-palisetty avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ia-aip-frontend's Issues

Use of mutation testing in ia-aip-frontend - Help needed

Hello there!

My name is Ana. I noted that you use the mutation testing tool StrykerJS in the project.
I am a postdoctoral researcher at the University of Seville (Spain), and my colleagues and I are studying how mutation testing tools are used in practice. With this aim in mind, we have analysed over 3,500 public GitHub repositories using mutation testing tools, including yours! This work has recently been published in a journal paper available at https://link.springer.com/content/pdf/10.1007/s10664-022-10177-8.pdf.

To complete this study, we are asking for your help to understand better how mutation testing is used in practice, please! We would be extremely grateful if you could contribute to this study by answering a brief survey of 21 simple questions (no more than 6 minutes). This is the link to the questionnaire https://forms.gle/FvXNrimWAsJYC1zB9 .

We apologize if you have already received message multiple times or if you have already had the opportunity to complete the survey. If you have already shared your feedback, we want to convey our appreciation, kindly disregard this message, and please accept our apologies for any inconvenience.

Drop me an e-mail if you have any questions or comments ([email protected]). Thank you very much in advance!!

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid schedule: Invalid schedule: Failed to parse "3am"

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.