What would you like?
I want to be able to do this:
Cypress.Commands.add({
myCommand(arg) {
// ...
},
myOtherCommand(arg) {
// ...
}
});
Why is this needed?
This way we can maintain a commands.js file that looks like this:
export function myCommand(arg) {
// ...
}
export function myOtherCommand(arg) {
// ...
}
And we can add them all like this:
import * as commands from './commands';
Cypress.Commands.add(commands);
Other
This will be especially useful for typescript where declaring the function separately from the Cypress.Commands.add(...) call is helpful for maintaining correct typing in Cypress.Chainable.
What would you like?
I want to be able to do this:
Why is this needed?
This way we can maintain a commands.js file that looks like this:
And we can add them all like this:
Other
This will be especially useful for typescript where declaring the function separately from the
Cypress.Commands.add(...)call is helpful for maintaining correct typing inCypress.Chainable.