Skip to content

chris-prince-cgi/court-interpreter-scheduling

 
 

Repository files navigation

Court-scheduler

Dev

  • Running in docker
$ docker-compose -f docker-compose.dev.yml up -d

NB: the frontend and api need to be run outside of Docker to take advantage of watch-mode for development

  • Login to keycloak to add yourself a new user:

http://localhost:8080/auth

use the following credentials to access the keycloak admin panel:

username: admin
password: password

keycloak

add user

add user

Database Seeding

To generate dummy data: docker exec -d court-nest npm run seed:run

To populate with JSON data

  1. Login to app via a web browser
  2. Retrieve the JWT token from network tab
  3. Use Postman to POST a JSON array of interpreters to http://localhost:4000/api/v1/interpreter/upload using the JWT token as the Authorization header: Bearer <token>

The JSON file in e2e/cypress/fixtures/interpreters can be used as per the above to seed the database.

NB: the following section will produce an application stack with 3 interpreters that can be used to test the application manually in prod mode at http://localhost:5000

End to end testing

The following three commands in order will kick off e2e testing via the docker-compose.test.yml file, alternatively simply run make e2e-test:

docker-compose -f docker-compose.test.yml build

docker-compose -f docker-compose.test.yml up -d client api postgres keycloak

docker-compose -f docker-compose.test.yml up cypress --abort-on-container-exit --exit-code-from cypress

URL

Dev: https://dev-court-interpreter-scheduling.apps.silver.devops.gov.bc.ca/

Test: https://test-court-interpreter-scheduling.apps.silver.devops.gov.bc.ca/

Upload CSV

  1. save excel file to csv

  2. postman: POST /interpreter/csv

Body:

  • file: select the csv file
  • isEmptyTable (boolean): Empty the interpreter table
  • isAnonymous (boolean): Anonymize the interpreter
  • isVisual (boolean): When uploading the visual interpreters, please use value: true
  • isUpdate (boolean): if want to update the exist interpreters, would take more time.
  1. For Regular Interpreters:
  • file
  • isEmptyTable: depends
  • isAnonymous: true, if env = 'test', 'dev'
  • isUpdate: true
  1. For Visual Interpreters:
  • file
  • isAnonymous: true, if env = 'test', 'dev'
  • isUpdate: true

Add GUID to scope

  • Add Client Scope image

  • Create Mapper image

    image

  • go to Clients, add client scope to our clients: court-fe and court-client image

  • Then you can test: image

    image

Test GUID Scope locally

  • Add new user

  • Add User Attribute image

About

Web app for scheduling court interpreters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 90.1%
  • JavaScript 3.3%
  • Makefile 3.3%
  • HCL 1.3%
  • Shell 0.7%
  • CSS 0.7%
  • Other 0.6%