Description
cypress-testing-library
version: ^6.0.1node
version: v12.13.1npm
(oryarn
) version: npm v6.12.1
Relevant code or config
cy.findByText('Submit CTA')
.should('exist')
.click()
What happened:
CypressError: Timed out retrying: cy.click() failed because this element is detached from the DOM.
Problem description:
This problem is outlined in this thread cypress-io/cypress#7306 where DOM nodes are detached prior to attempting the clicks. I thought that #78 would take care of that problem but it looks like the problem exists when running the code above. As you can imagine this makes tests flaky and it doesn't look like cypress has native support for this yet.
In this post they provide a workaround to this problem by using the pipe plugin however when used in combination with cypress-testing-library
it looks like the problem still exists.
I'm posting here simply because we are using the library and I was wondering if #78 was intended to fix this issue and I'm not sure if maybe I'm misusing findByText. Any help or direction is appreciated.
Thanks