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

Property 'findByTestId' does not exist on type 'cy & CyEventEmitter' - only in .cy.tsx (component testing) files #271

Open
egucciar opened this issue Jan 23, 2024 · 1 comment

Comments

@egucciar
Copy link

Problem description:

I have cypress types working and configured in tsconfig.json, however, the type does not appear to work outside of the /cypress folder.

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "types": [
      "cookie-session",
      "cypress",
      "node",
      "cypress-real-events",
      "cypress-wait-until",
      "@testing-library/cypress",
      "@cypress/grep",
      "webpack-env"
    ]
  },
  "exclude": ["**/*.test.tsx", "**/*.test.ts", "**/__tests__", "common/test-utils"],
  "include": [
    "./cypress.config.ts",
    "cypress",
    "**/*.cy.tsx",
    "**/*.d.ts",
    "webapp/src",
    "ui",
    "common",
    "./**/*.json",
    "webapp/Config.ts"
  ]
}
@MatanBobi MatanBobi transferred this issue from testing-library/dom-testing-library Jan 24, 2024
@MatanBobi
Copy link
Member

I'm transferring this to the cypress-testing-library repo :)

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