cypress.d.ts 803 B

12345678910111213141516171819202122232425262728293031
  1. // in cypress/support/index.ts
  2. // load type definitions that come with Cypress module
  3. /// <reference types="cypress" />
  4. /// <reference types="@badeball/cypress-cucumber-preprocessor" />
  5. import {
  6. dataCy,
  7. getTestElement,
  8. getTestElementByClass
  9. } from './support/commands'
  10. declare global {
  11. namespace Cypress {
  12. interface Chainable {
  13. /**
  14. * Custom command to select DOM element by data-cy attribute.
  15. * @example cy.dataCy('greeting')
  16. */
  17. dataCy: typeof dataCy
  18. /**
  19. * Custom Command - getTestElement
  20. * Gets elements via the data-test-id-attribute
  21. * fails if more than one of the same attribute name found
  22. */
  23. getTestElement: typeof getTestElement
  24. getTestElementByClass: typeof getTestElementByClass
  25. }
  26. }
  27. }
  28. export {}