Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Running the frontend tests in the ESS environment

Open the To bring up duo-backend in test confguration simply run: fba-compose -f /mnt/c/programming/docker-orchestration/docker-compose.yml file in your local docker-orchestration repo, then in the section for duo-backend change the DEPENDENCY_CONFIG variable to e2e. Save the file and restart the proposal system with fba-compose down and then fba-compose up -d duo-frontende2e.yml up -d duo-frontend, this uses docker-compose.e2e.yml to override some config values and start the backend in test mode.

You can now run the E2E tests with fba-compose run cypress-e2e.

...

Code Block
languagetypescript
if (featureFlags.getEnabledFeatures().get(FeatureId.OAUTH)) {
 
this.skip();
}

To run in this environment, you must change your backend configuration:

...

Open the docker-compose.yml file in your local docker-orchestration repo.

...

In the environment variables section for duo-backend, change the DEPENDENCY_CONFIG environment variable to stfc.

...

  this.skip();
}

To run in this environment, you must change your backend configuration:

  1. In cypress.config.ts change the value of DEV_AUTH_SERVER_URL to 'http://cypress-dev-auth-server:5000'. Also change baseUrl to 'http://localhost:8081'.

  2. Rebuild the e2e image so that the updated config is copied into it: fba-compose build cypress-e2e.

  3. Save the file and restart everythingeverything in stfc test mode: fba-compose down ; fba-compose -f /mnt/c/programming/docker-orchestration/docker-compose.e2e.stfc.yml up -d duo-frontend(note: docker-compose.e2e.stfc.yml is a different overide files with config for connecting to our mockserver)

  4. Run the E2E tests with fba-compose run cypress-e2e.

...

  1. Ensure the user-office-core is cloned into windows 'C:\Programming\user-office-core'.

  2. Open thedocker-compose.yml file in your local docker-ochestration repo.

  3. In the environment variables section for duo-backend, ensure the DEPENDENCY_CONFIG environment variable is set to e2e and uncomment the section required to run e2e tests.

  4. In the cypress-dev-auth-server, add:
    ports:
    - 5700:5000

  5. In ‘apps\e2e\cypress.config.ts’ update the DEV_AUTH_SERVER_URL to 'http://localhost:5700' and baseUrl to 'http://localhost:8081'

  6. Replace the SDK in the frontend with the frontend in the linux environment (from'\\wsl.localhost\Ubuntu-20.04\home\<user_name>\repos\user-office-core\apps\frontend\src\generated' to 'C:\Programming\user-office-core\apps\frontend\src\generated').

  7. Run npm install in user-office-core.

  8. Remove and restart the backend container. (fba-compose rm duo-backend and fba-compose -f /mnt/c/programming/docker-orchestration/docker-compose.e2e.yml up -d duo-backendfrontend).

  9. Make sure Cypress is installed in Windows, using npm install cypress --save-dev.

  10. Run fba-compose up cypress-e2e to start the test container.

  11. Run npm run cy:open within e2e which will prompt the Chrome window to run the tests.

...