Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

Cannot access a components state or methods when using aliases. #293

@bizmonogatari

Description

@bizmonogatari

In previous version of this library, the following code worked:

    // This is code to simulate a file being selected for upload
    cy.get('@App').then((instance: any) => {
      const testFile1 = new File(['data to upload'], 'img.png', { type: 'image/png' })
      instance.getFiles = cy.stub().returns([testFile1])
      cy.get('[data-cy=filePicker]').trigger('change')
    })

This does not seem to work anymore because the object retrieved using cy.get('@App') does not contain its methods or its state (which I would also like access to). At the moment it seems that only the "props" and "type" fields are available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions