Consider creating `waitForFinalTick` helper, or similar
The following discussion from !167578 (merged) should be addressed:
-
@vanessaotto started a discussion: (+4 comments) discussion:
As @xanf pointed out in a discussion on Slack, I'd also have thought that there just need to be a waitForFinalTick-function, because the solution with multiple nextTick looks wrong. Especially in the 2nd part of the same test case I assume that this is now a false positive. It needs to be split into its own test case, or also "randomly" wait for 3-4 ticks to verify that the img src has not changed.
@xanf Would you say that there is a better solution, e.g. this time not testing the DOM but the internal
this.diagramUrlattribute. Or spying oncontentEditor.renderDiagraminstead? Or would we actually like to move forward with multiple next-ticks, wrapped in a function with a comment explaining why we're doing this?