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

Cypress.dom.isDetached missing from Typescript types #4408

Open
dschuessler opened this issue Jun 7, 2019 · 0 comments

Comments

2 participants
@dschuessler
Copy link

commented Jun 7, 2019

Current behavior:

The method Cypress.dom.isDetached() type errors in Typescript projects.

Desired behavior:

The method Cypress.dom.isDetached() does not type error in Typescript projects.

Steps to reproduce: (app code and test code)

  1. Set up a Typescript Cypress project as described in https://docs.cypress.io/guides/tooling/typescript-support.html
  2. Write the following test:
describe('Demonstrates bug', function() {
  beforeEach(() => {
    cy.setup();
  });
  
  it('demonstrates Typescript error'), function() {
    cy.get('button').then(($el) => {
      Cypress.dom.isDetached($el)
    });
  });
});
  1. Get the following error:
Property 'isDetached' does not exist on type '{ isHidden(element: HTMLElement | JQuery<HTMLElement>): boolean; }'

Versions

Cypress 3.2.0
Typescript 3.4.5
Chrome 74.0.3729.169
macOS 10.14.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.