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

DEBUG_PRINT_LIMIT env var appears to have no effect #225

Open
Joe-Withey opened this issue Jul 1, 2022 · 3 comments
Open

DEBUG_PRINT_LIMIT env var appears to have no effect #225

Joe-Withey opened this issue Jul 1, 2022 · 3 comments

Comments

@Joe-Withey
Copy link

  • cypress-testing-library version: @testing-library/cypress: 8.0.2
  • node version: 17.8.0
  • npm (or yarn) version: 8.5.5

Relevant code or config

DEBUG_PRINT_LIMIT=1000000 cypress run

What you did:

Trying to use the DEBUG_PRINT_LIMIT variable in the testing library documentation to show the whole dom when a selector fails.

What happened:

DEBUG_PRINT_LIMIT stayed at the default level

Suggested solution:

Could we check that this library supports the DEBUG_PRINT_LIMIT variable?

@dhulme
Copy link

dhulme commented Aug 12, 2022

I've noticed the same issue. I also tried with env property inside cypress.config.ts

@avegancafe
Copy link

Also have noticed this, dumping out the whole DOM isn't incredibly useful for me and this seems to be the only way to limit that DOM output on find failure

@adam-thomas-privitar
Copy link

adam-thomas-privitar commented Nov 4, 2022

If you are using vite with cypress, vite does not automatically compile process.env into your compiled test output. Since in cypress everything, including this lib, is basically compiled and executed in the browser it is subject to your compilers env definitions so I'd guess most likely anyone with this problem probably has an issue in their build compiler settings. You have to do this for vite:

define: {
      "process.env.DEBUG_PRINT_LIMIT": 10000
    }

In vite config

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

4 participants