Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom command is not available #4174

Closed
Tazovsky opened this issue May 10, 2019 · 1 comment
Closed

Custom command is not available #4174

Tazovsky opened this issue May 10, 2019 · 1 comment

Comments

@Tazovsky
Copy link

Tazovsky commented May 10, 2019

Current behavior:

Regarding documentation all I need to add custom command is to put it in cypress/support/commands.js so I added example custom command in command.js

Cypress.Commands.add("alert", () => { 
    alert("! test alert !")
 })

but function is not available using cy.alert() - why?

My index.js is:

import './commands'

Versions

Cypress v3.2.0

OS: macOS

@jennifer-shehane
Copy link
Member

Hey @Tazovsky, any info on how you resolved your issue is appreciated since someone else may run into the same.

@cypress-io cypress-io locked and limited conversation to collaborators Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants