Cypress.dom.isDetached missing from Typescript types
See original GitHub issueCurrent 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)
- Set up a Typescript Cypress project as described in https://docs.cypress.io/guides/tooling/typescript-support.html
- 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)
});
});
});
- 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
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
TypeScript - Cypress Documentation
Cypress ships with official type declarations for TypeScript. This allows you to write your tests in TypeScript. Install TypeScript To use TypeScript.
Read more >Solving The Element Is Detached From DOM Error In Cypress
A video of a page refreshing and breaking a Cypress test and several possible solutions. Many people complain about the dreaded "Element is...
Read more >Why is Cypress saying my element is detached after just ...
The previous command that ran was: > cy.eq() This DOM element likely became detached somewhere between the previous and current command.
Read more >cy.type() failed because this element is detached from the dom - You ...
I am new to Cypress and as far as I understand, I need to use cy.wrap() in this situation, in order to be...
Read more >cypress-io/cypress - Gitter
@jradom check for the slow loading elements to be visible? jradom ... cypress/plugins/index.js , but either the file is missing, it contains a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
@jennifer-shehane or @kylerob any progress on this? I have
and I am still seeing this issue