cypress-io/cypress-react-unit-test

Click spy does not work when running all tests together

bahmutov opened this issue · 8 comments

In project https://github.com/bahmutov/calculator/tree/cypress-test when running ALL tests together, the click spy on the Button does not work if executing after App spec tests.

button -- clicks

Works when running Button tests by itself.

Any process?

imam commented

+1 No progress?

imam commented

Let me add to my current analysis:

"Click", can only worked once, if you put the "click" component in the first test. After that, it sort-of dissappear on every test

imam commented

Update:

Click worked once for the first mount, but would not worked if there is any second mount

imam commented

this is solved easily by reverting this 65b54ba#diff-6d186b954a58d5bb740f73d84fe39073

Is there any reason why it was removed?

imam commented

Nevermind it isn't solved

Current situation:

onClick event handler wouldn't worked after the first `.mount`
onClick event handler wouldn't work after the first `.mount`

The same situation

Running all specs together is not supported, but v4 should have fixed clicking issues.