Skip to content

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

@egucciar

Description

@egucciar

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"
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions