GithubHelp home page GithubHelp logo

ansahdavid / api-documentation-frontend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hmrc/api-documentation-frontend

0.0 0.0 0.0 28.72 MB

License: Apache License 2.0

Shell 0.14% JavaScript 1.74% Python 0.32% Scala 49.63% HTML 37.86% RAML 7.23% SCSS 3.09%

api-documentation-frontend's Introduction

api-documentation-frontend

Frontend for API documentation - part of the Developer Hub

Steps to run acceptance test

[Note: Acceptance and Unit tests will fail if they are running at the same time as api-documentation-frontend.]

  1. Run Assets Frontend using command sm --start ASSETS_FRONTEND where HMRC projects have been checked out.

  2. Install chrome driver if you have not done already .

    2a. If using MAC OS this can be done using command brew cask install chromedriver

    2b. If not using MAC chromedriver can be downloaded from https://chromedriver.storage.googleapis.com/index.html?path=2.29/

  3. Go to API Documentation Frontend project and Run sbt clean test. This will create some artifacts in the target directory for the acceptance test to pick up.

  4. To execute test

    4a On chrome use command sbt acceptance:test -Dbrowser=chrome-local or just sbt acceptance:test.

    4b. On firefox use command sbt acceptance:test -Dbrowser=firefox-local

    4c. To run all the tests run the shell file run_all_test.sh A report will also be generated identifying any dependencies that need upgrading. This requires that you have defined CATALOGUE_DEPENDENCIES_URL as an environment variable pointing to the dependencies endpoint on the Tax Platform Catalogue's API.

Current Known Issues

  1. If you are planning to run test on Firefox use firefox version 46 or lower as selenium version 2.53.0 is not compatible to work with Firefox version 47. Old firefox releases can be downloaded from https://ftp.mozilla.org/pub/firefox/releases/

Testing approach

  • Unit tests should make up the majority of tests so that test coverage should drop marginally when run against only unit tests.
  • Acceptance tests should be a thin layer of coverage on happy paths only to ensure that journeys hang together.

Running locally with dependencies

To run locally use ./run_local_with_dependencies.sh as well as starting any apis you want to see the documentation for with service manager.

Note: API definitions (mongo -d api-definition -c api) will need their serviceBaseUrl pointing to http://localhost:<port>: To update:

db.api.updateOne({ serviceName: “<your service name>” }, { $set: { serviceBaseUrl: “http://localhost:<port>” } })

api-documentation-frontend's People

Contributors

peteslater-ee avatar andyspaven avatar nc-1234 avatar d6fb avatar rose-garratt avatar ryan-garrett avatar adampridmore avatar gurpreetbhamra avatar fluentsynergydw avatar billymitchell14 avatar peteslater avatar lburgos avatar mickschonhut avatar matevans avatar tonyheap avatar anjumabbas5 avatar konradwudkowski avatar robdawson-hmrc avatar hughfdjackson avatar mattclark-zerogravit avatar edjannoo avatar mi-akram avatar crystalmark avatar liandra-giacomine avatar mattgreenuk avatar syed-ali-hmrc avatar stewabel avatar cjrowe avatar rashadmughal avatar james-work-account 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.