To test the "Playground" via a localhost, in playwright tests, you need to set a value for the PLAYGROUND_BACKEND_HOST
environment variable, it will be used in the test to create a custom server for sending requests.
In case of using Docker Compose, this is http://host.docker.internal:8081
(protocol + value of the APIHUB_URL
variable from the qubership-apihub-backend.env file). Also, you need to add the variable ALLOWED_HOSTS=host.docker.internal
to the qubership-apihub-backend.env file.
In case of using docker compose + dev proxy, in addition to the previous settings, in playwright tests, you need to add the variable DEV_PROXY_MODE=true
, to skip tests that cannot be executed in this mode.
Live environment | Docker compose | Docker compose + dev proxy | |
---|---|---|---|
Playground tests | ✔️ | ✔️ ALLOWED_HOSTS=host.docker.internal - in docker composePLAYGROUND_BACKEND_HOST=http://host.docker.internal:8081 - in tests |
✔️ ALLOWED_HOSTS=host.docker.internal - in docker composePLAYGROUND_BACKEND_HOST=http://host.docker.internal:8081 - in test |
Tests with rediretcs to the Agent | ✔️ | ✔️ | ❌ Skipped with DEV_PROXY_MODE=true - in tests |
Expand/collapse the Package page sidebar test | ✔️ | ✔️ | ❌ Skipped with DEV_PROXY_MODE=true - in tests |