Git Product home page Git Product logo

ukhomeoffice.cerberus-service's Introduction

cerberus-service

Cerberus frontend service for cerberus-api

Requirements

  • npm 6.9.0
  • node v8.10.0

Index

Getting started

1. Clone this repo

Native development

2. Install dependencies

$ npm install

3. Add environment variables (you don't need to use export on OSX)

$ export KEYCLOAK_AUTH_URL=https://your.sso.com/auth
$ export KEYCLOAK_CLIENT_ID=your-client-id
$ export KEYCLOAK_REALM=realm
$ export FORM_API_URL=https://form-api.example.com/
$ export REFDATA_API_URL=https://refdata-api.example.com/
$ export CERBERUS_API_URL=https://cerberus-api.example.com/

4. Build development bundle (optional)

$ npm run build:dev

5. Start the application (optional)

$ npm start

Development with docker

2. Build the application Docker container

docker build -t cerberus-service .

3. Run the resulting Docker container

docker run --name cerberus-service -p 8080:8080 \
  --env KEYCLOAK_AUTH_URL=https://your.sso.com/auth \
  --env KEYCLOAK_CLIENT_ID=your-client-id \
  --env KEYCLOAK_REALM=realm \
  --env FORM_API_URL=https://form-api.example.com \
  --env REFDATA_API_URL=https://refdata-api.example.com \
  --env CERBERUS_API_URL=https://cerberus-api.example.com \
  cerberus-service

Tests in native development

Setup your environment as described in Native development

3. Running jest tests

npm test

Linter in native development

Setup your environment as described in Native development

3. Running linter

npm run lint -- <directory>

E2E tests in native development

Setup your environment as described in Native development

There are two ways to run cypress tests, using the cypress test runner or running cypress tests using the command line.

By default tests run against local environment.

NOTE: You will need, the cerberus-service application, to be running before triggering Cypress.

Running cypress test runner

Running all tests

npm run cypress:runner

Running all tests using environment settings from a configuration file

npm run cypress:runner -- --env configFile=dev

Once TestRunner launched, click on the interested spec inside folder cypress/integration/cerberus

Running cypress tests using the command line

Running all tests on local Environment, (It executes tests headless mode on Electron Browser)

npm run cypress:test:local

Running all tests on Development Environment, (It executes tests headless mode on Electron Browser)

npm run cypress:test:dev

Running a specific test

npm run cypress:test:local -- --spec cypress/integration/cerberus/tasks.spec.js

Running specific test with chrome browser

npm run cypress:test:local -- --browser chrome --spec cypress/integration/cerberus/task-management.spec.js

ukhomeoffice.cerberus-service's People

Contributors

anilreddy999 avatar bothees avatar hed95 avatar jennikate avatar jgar123 avatar mgh100 avatar p3dr0migue1 avatar rafenden avatar

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.