Skip to content

Rewrite the mount commands to act like true Cypress commands #30897

Open
@ryanthemanuel

Description

Current behavior

Currently, the mount commands compose additional Cypress commands which makes the mount functions act more like user defined custom commands than first class Cypress commands.

Desired behavior

We should strive to eliminate all of the cy.wait, cy.then, etc. calling from within our mount commands:

Rather than doing all of the waiting, etc., we should listen to the framework mount events to know when the component has been fully inserted into the DOM and ready to run tests against.

The driver for this is to ensure that the stack trace we get for the mount command traces back to where cy.mount is called in a spec file, rather than in some .then callback deep inside Cypress code.

Cypress Version

14.0.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    CTIssue related to component testingtype: unexpected behaviorUser expected result, but got another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions