sGMR frontend service for sgmr-data-api
- npm 6.9.0
- node v8.10.0
- Getting started
- Native development
- Development with docker
- Tests in native development
- Linter in native development
- E2E tests in native development
1. Clone this repo
2. Install package dependencies
npm install
3. Build development bundle (optional)
npm run build:dev
4. Start the application (optional)
npm start
2. Build the application Docker container
docker build -t sgmr-service .
3. Run the resulting Docker container
docker run -p 8080:8080 \
--env API_BASE_URL=https://your.api.com \
sgmr-service
Setup your environment as described in Native development
3. Running jest tests
npm test
Setup your environment as described in Native development
3. Running linter
npm run lint -- <directory>
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 sgmr-service along with sgmr-data-api, and ref-data-api applications, to be running before triggering Cypress.
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/sGMR
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/sGMR/register-user.spec.js
Running specific test with chrome browser
npm run cypress:test:local -- --browser chrome --spec cypress/integration/sGMR/user-register.spec.js
Running All E2E tests and generating mochawesome html report with screenshots
npm run cypress:test:report -- -b chrome
Running specific test and generating mochawesome html report with screenshots
npm run cypress:test:report -- -b chrome -s cypress/integration/sGMR/user-register.spec.js