...
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-frontend
e2e.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 | ||
---|---|---|
| ||
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:
In
cypress.config.ts
change the value ofDEV_AUTH_SERVER_URL
to'http://cypress-dev-auth-server:5000'
. Also changebaseUrl
to'http://localhost:8081'
.Rebuild the e2e image so that the updated config is copied into it:
fba-compose build cypress-e2e
.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)Run the E2E tests with
fba-compose run cypress-e2e
.
...
Ensure the user-office-core is cloned into windows
'C:\Programming\user-office-core'
.Open the
docker-compose.yml
file in your local docker-ochestration repo.In the environment variables section for
duo-backend
, ensure theDEPENDENCY_CONFIG
environment variable is set toe2e
and uncomment the section required to run e2e tests.In the
cypress-dev-auth-server
, add:ports:
- 5700:5000
In ‘apps\e2e\cypress.config.ts’ update the
DEV_AUTH_SERVER_URL
to'http://localhost:5700'
andbaseUrl
to'http://localhost:8081'
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'
).Run
npm install
in user-office-core.Remove and restart the backend container. (
fba-compose rm duo-backend
andfba-compose -f /mnt/c/programming/docker-orchestration/docker-compose.e2e.yml up -d duo-backendfrontend
).Make sure Cypress is installed in Windows, using
npm install cypress --save-dev
.Run
fba-compose up cypress-e2e
to start the test container.Run
npm run cy:open
withine2e
which will prompt the Chrome window to run the tests.
...