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

Closed
dschuessler opened this issue Jun 7, 2019 · 5 comments · Fixed by #5298
Closed

Cypress.dom.isDetached missing from Typescript types #4408

dschuessler opened this issue Jun 7, 2019 · 5 comments · Fixed by #5298
Labels

Comments

@dschuessler
Copy link

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

@kylerob
Copy link
Contributor

kylerob commented Oct 3, 2019

@jennifer-shehane Do you mind if I pick this up? Also should we add all of the dom functions to the declaration file? It looks like there are a good deal more in dom/index.js that could be added.

@cypress-bot cypress-bot bot added stage: work in progress and removed stage: ready for work The issue is reproducible and in scope labels Oct 5, 2019
@jennifer-shehane
Copy link
Member

@kylerob Go for it.

@cypress-bot cypress-bot bot added stage: ready for work The issue is reproducible and in scope and removed stage: work in progress labels Jan 10, 2020
@rovshenn
Copy link

@jennifer-shehane or @kylerob any progress on this? I have

"cypress": "^4.0.2",
"@types/node": "^10.12.18",
"typescript": "~3.7.2",
node -v 12.16.1

and I am still seeing this issue

@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review stage: work in progress and removed stage: ready for work The issue is reproducible and in scope stage: needs review The PR code is done & tested, needs review stage: work in progress labels Mar 2, 2020
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Mar 2, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 2, 2020

The code for this is done in cypress-io/cypress#5298, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

MadameSheema added a commit to elastic/kibana that referenced this issue Mar 3, 2020
* updates events viewer test

* updates login tasks

* updates ml conditional links

* updates url state

* updates timeline screen

* updates timeline tasks

* updates test files

* adds jenkins needed files

* ignoring isAttached lines due to a known error in Cypress (cypress-io/cypress#4408)

* updates loop script

* updates readme with new cypress command explanation

* removes skip

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
MadameSheema added a commit to MadameSheema/kibana that referenced this issue Mar 3, 2020
* updates events viewer test

* updates login tasks

* updates ml conditional links

* updates url state

* updates timeline screen

* updates timeline tasks

* updates test files

* adds jenkins needed files

* ignoring isAttached lines due to a known error in Cypress (cypress-io/cypress#4408)

* updates loop script

* updates readme with new cypress command explanation

* removes skip

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
MadameSheema added a commit to elastic/kibana that referenced this issue Mar 4, 2020
* updates events viewer test

* updates login tasks

* updates ml conditional links

* updates url state

* updates timeline screen

* updates timeline tasks

* updates test files

* adds jenkins needed files

* ignoring isAttached lines due to a known error in Cypress (cypress-io/cypress#4408)

* updates loop script

* updates readme with new cypress command explanation

* removes skip

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 16, 2020

Released in 4.2.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.2.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants