This document describes how to run the integration tests for Landkid on the dev instance.
The integration tests for Landkid are setup to target a Bitbucket repository, only available to Atlassian employees.
Currently, those integration tests cannot run in CircleCI because the Bitbucket repository they access is only accessible through VPN.
Developers would need to run the tests locally to validate their changes.
For testing purposes, we recommend to use the dev instance.
(For strict local dev loop, see this document )
- Push your changes to CircleCI
- Grab the image number from the
publish
step in CircleCI build from your PR in GitHub - for example: https://app.circleci.com/pipelines/github/atlassian/landkid/396/workflows/4445d64a-b96d-4f2c-bec4-f0d8d4a6b251/jobs/1499 ->circle-1499
- Access the atlassian-frontend-landkid-deployment repository
- Create a branch and replace
LANDKID_VERSION
var in this file by the image number from step 2. - Commit and push your changes
- Deployment to
dev
environment would need to be manually from the latest pipeline / your latest change.
In this repository:
- Create your own copy of
cypress.env.json
- the file is.gitignore
but make sure it is not committed by mistake. - Ask access to the folder
Landkid credentials for testing
in LastPass - Fill out the environment variables required
{
"BITBUCKET_APP_PASSWORD": "bitbucket app password",
"LANDKID_SESSION_ID": "landkid.sid cookie from https://atlassian-frontend-landkid.dev.services.atlassian.com/current-state/, this is used by circleCI",
"LANDKID_DEV_SESSION_ID"; "this is used in the local dev loop, use the LANDKID_SESSION_ID value to test a dev deployment locally otherwise use the landkid.sid cookie in your local instance of landkid",
"LANDKID_DEV_URL": "https://atlassian-frontend-landkid.dev.services.atlassian.com/current-state/ to test a dev deployment or https://[basurl]/current-state for local testing",
"CUSTOM_TOKEN": "token for specific endpoints - use the HASHED_CUSTOM_TOKEN"
}
To get the LANDKID_SESSION_ID
, you would need to visit the dev instance and grab the landkid.sid
from your browser in chrome://settings/siteData and look for atlassian-frontend-landkid.dev
.
This environment variable is required to be authenticated while running the tests.
- Run
yarn test:integration:watch
to watch and debug the tests oryarn test:integration
to run it inheadless
mode.
Note: if you need to see any logs when running in headless
mode, add ELECTRON_ENABLE_LOGGING=1
to the command yarn test:integration
.