Our cypress tests have been a bit flaky lately. I think this is partially due to our usage of cypress' .then instead of .should. The cypress docs recommend using .should as it'll automatically retry:

As they note, we should be aware that the callback in a .should could be run multiple times, so we should make sure that there are no side effects in the callback.
So I'd say:
- If it's an assertion, use .should instead of .then (make sure there are no side-effects)
- If you want to work with the subject yielded from the previous command, and it's not an assertion, use .then
If everyone agrees I say we refactor our tests to follow the above.
Our cypress tests have been a bit flaky lately. I think this is partially due to our usage of cypress'
.theninstead of.should. The cypress docs recommend using.shouldas it'll automatically retry:As they note, we should be aware that the callback in a
.shouldcould be run multiple times, so we should make sure that there are no side effects in the callback.So I'd say:
If everyone agrees I say we refactor our tests to follow the above.