-
Notifications
You must be signed in to change notification settings - Fork 5
chore: Further updates to the local development setup #1111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
bcb867b
5b7c7bc
b3b5b25
8ebc1ac
c94fa0f
7f3be2f
488143c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,30 +5,45 @@ the Beacons system, see the `../webapp/`, `../service/` and `../backoffice/` dir | |
|
|
||
| ## End-to-end testing | ||
|
|
||
| Automated end-to-end tests use [Cypress](https://www.cypress.io/) and are run in GitHub Actions against the publish images before deploying to the `dev` and `staging` environments. | ||
| Automated end-to-end tests use [Cypress](https://www.cypress.io/) and are run in GitHub Actions against the published images before deploying to the `dev` and `staging` environments. | ||
|
|
||
| To run end-to-end tests locally: | ||
|
|
||
| - Copy `tests/.env.example` as `tests/.env` and populate it with the contents of the "Beacons Webapp Local .env.local config" secure note in 1Password for the corresponding environment variables. | ||
|
|
||
| ```sh | ||
| $ docker compose -f docker-compose.e2e.yml up | ||
| $ npm run test:e2e | ||
| ```shell | ||
| docker compose -f docker-compose.e2e.yml up | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I ended up just running it with |
||
| ``` | ||
|
|
||
| In another terminal window... | ||
|
|
||
| ```shell | ||
| npm run test:e2e | ||
| ``` | ||
|
|
||
| ### Occasional Cypress test failures | ||
|
|
||
| - Automated end-to-end tests require the `SESSION_TOKEN`, and may fail unexpectedly, due to rotating session tokens. To resolve this, log into local/dev/staging webapp using the test account. Locate the session token in dev tools: Application -> cookies -> \_\_Secure-next-auth.session-token -> value. | ||
| - Copy this value and update the corresponding secret in the GitHub repository. | ||
| Automated end-to-end tests require the `SESSION_TOKEN`, and may fail unexpectedly, due to rotating session tokens. | ||
|
|
||
| To resolve this: | ||
|
|
||
| - Log into local, dev or staging using the "Test B2C account" from 1Password. | ||
| - Locate the session token in dev tools: Application -> cookies -> \_\_Secure-next-auth.session-token -> value. | ||
| - Copy this value and update the corresponding secret: | ||
| - `SESSION_TOKEN` in your local `.env` files. | ||
| - `SESSION_TOKEN` in the "Beacons Webapp Local .env.local config" secure note in 1Password. | ||
| - `TEST_WEBAPP_AZURE_B2C_SESSION_TOKEN` in the GitHub Actions secrets. | ||
|
|
||
| ## Integration testing | ||
|
|
||
| Todo: Does this belong in Service? | ||
|
|
||
| As part of our integration tests, a test user "test@test.com" is created in the Azure TEST tenancy. As a part of these tests, this user should be automatically deleted. | ||
| In the event that the test user is not deleted, the integration tests can fail: | ||
|
|
||
| - "Another object with the same value for property proxyAddresses already exists." | ||
|
|
||
| In order to remediate this failure, the "test@test.com" user will need to be deleted from the test tenancy. The tests should then succeed. | ||
| In order to remediate this failure, the "test@test.com" user will need to be deleted from the test B2C tenant in Azure. The tests should then succeed. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's no longer hard coded, this can be deleted now. |
||
|
|
||
| ## Smoke testing | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do like if you ran
tree | grep ".md".