tyler36 / ddev-cypress

Cypress E2E testing for use with DDEV
Apache License 2.0
11 stars 9 forks source link

Set fallback for DISPLAY #32

Closed tyler36 closed 1 year ago

tyler36 commented 1 year ago

This PR set a fallback for the DISPLAY environmental variable.

If not present, it will fallback to the docker host IP address.

tyler36 commented 1 year ago

See https://docs.docker.com/compose/environment-variables/set-environment-variables/ See https://docs.docker.com/compose/environment-variables/envvars-precedence/

tyler36 commented 1 year ago

This wont work as a solution for MacOS because this:

On MacOS, ssh'ing in to the Cypress box gives me a $DISPLAY of /private/tmp/com.apple.launchd.e2GTZQiXPQ/org.xquartz:0 Which, on MacOS, Cypress has no access to. A potential solution might be to add .Xauthority, according to some. However I've not found that even to exist on MacOS...