Add check for animation completion to unit tests