Open Baluditor opened 4 months ago
I've done some more testing and I found the following:
# Base URL overwrite is somewhat working. Withouth it, the test would run agains the localhost. Setting it solves that issue, but accessing it with cypress.env('baseUrl') will still returns 'localhost'.
CYPRESS_baseUrl: ${{ env.swa_preview_hostname_first_part }}-${{ github.event.pull_request.number }}.${{ env.swa_preview_hostname_second_part }}
# But baseUrl still can't be used in the tests, thus setting a hostUrl variable which will have the correct value.
CYPRESS_hostUrl: ${{ env.swa_preview_hostname_first_part }}-${{ github.event.pull_request.number }}.${{ env.swa_preview_hostname_second_part }}
So basically, I had the assumption that overwriting the baseUrl would affect the e2e baseUrl
too, but this dosen't seem to work.
Current behavior
I have the following
cypress.config.ts
:and my
test.yml
file:My issue is that the
baseUrl
will behttp://localhost:3000
no matter what I do. I see that the env vars are set in Github Workflow:According to the docs this should work.
Desired behavior
My expectations is that baseUrl overwritten.
Test code to reproduce
N/A
Cypress Version
Cypress package version: 13.8.1
Node version
Node version: 18.17.1
Operating System
ubuntu-22.04
Debug Logs
No response
Other
No response