Closed lmazurek closed 2 years ago
Hello everyone :)
I imported cypress-testing-library into support/index.js:
support/index.js
import '@testing-library/cypress/add-commands';
CTL Commands work in the tests, but they do not work when I try to use them in my custom commands, e.g.:
Cypress.Commands.add('getAutosuggestByLabel', label => { return cy.getByLabelText(label); })
When using this command I get:
TypeError cy.getByLabelText is not a function
Is that normal, or did I do something wrong?
PS. Yes the above command is silly, but it's just an example ;)
darn, I've just noticed I used get instead of find.... so sorry :)
Hello everyone :)
I imported cypress-testing-library into
support/index.js
:CTL Commands work in the tests, but they do not work when I try to use them in my custom commands, e.g.:
When using this command I get:
Is that normal, or did I do something wrong?
PS. Yes the above command is silly, but it's just an example ;)