Skip to content
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

Can't run synpress tests inside docker container #790

Open
parkhomenko opened this issue Jun 21, 2023 Discussed in #786 · 1 comment
Open

Can't run synpress tests inside docker container #790

parkhomenko opened this issue Jun 21, 2023 Discussed in #786 · 1 comment

Comments

@parkhomenko
Copy link

Discussed in #786

Originally posted by parkhomenko June 13, 2023
I followed the guides for creating a docker-compose file inside this repository, but I always have an issue, that my tests are frozen on a "setupMetamask" step:
image

Could you please show me what I can do wrong? The same tests work perfectly if I run them on my local machine without docker, so the setup should be the same.
My synpress.config.ts is:

module.exports = defineConfig({
  e2e: {
    baseUrl: 'https://my-app-url',
    specPattern: 'tests/e2e/specs',
    supportFile: 'tests/support/index.ts',
    videosFolder: 'tests/e2e/videos',
    screenshotsFolder: 'tests/e2e/screenshots',
    video: true,
    chromeWebSecurity: false,
    screenshotOnRunFailure: true,
    defaultCommandTimeout: 30000,
    pageLoadTimeout: 30000,
    requestTimeout: 30000,
    setupNodeEvents(on, config) {
      synpressPlugins(on, config)
      return config
    },
  },
})

Environment variables I use:

- DISPLAY=display:0.0
- PRIVATE_KEY=${PRIVATE_KEY}
- DEBUG=${DEBUG}
- CYPRESS_DOCKER_RUN=true

and a base docker image that I use to run the tests is "synthetixio/docker-e2e:18.16-ubuntu"

@aziolek
Copy link

aziolek commented Jul 5, 2023

I do confirm I am facing exactly the same problem. It happens both while using docker-compose in my GitLab CI as well as docker-e2e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants