Functions react() and getReact() - infinite retrying for failed upcoming assertions
daniele-pini opened this issue · comments
daniele-pini commented
Summary
The following code:
getReact('MyComponent', { options: { timeout: 1000 })).should(() => {
expect(false).to.equal(true);
});
Will keep retrying the assertion without regard to the specified timeout
Why is this happening?
Because retries checking only happens as long as the component being looked up is not found:
cypress-react-selector/src/reactHandler.js
Lines 247 to 258 in 88b29a2
Once the component is found the if (!value)
will skip retries checking, even if we're retrying continuously due to failed assertions.
daniele-pini commented
@abhinaba-ghosh, I'm looking into this - I have a fix, just need to write a suitable test...