Closed chelsea-designs closed 1 year ago
this is strange. it seems like you have done everything right and yet cypress does not recognize the command, have you tried adding your own custom command to e2e.ts and see if it’s found by your test? I could imagine that the support file is somehow not being loaded, maybe check your cypress.config.ts file
Thanks for your reply. Yes you were right, the supportFile in cypress.config.ts was pointing to index.ts so I've added import 'cypress-plugin-api' to that file instead which worked. Thanks for your help :)
Good Morning,
I've tried to add the plugin but I'm getting 'cy.api is not a function'.
Steps I've taken:
npm i cypress-plugin-api
and I see "cypress-plugin-api" in my node_modules folder.import 'cypress-plugin-api'
to cypress/support/e2e.ts file."cypress-plugin-api"
to types in tsconfig.jsoncy.request
withcy.api
.vs
Any help gratefully received?