Fix end2end unit tests correctly waiting for promises to be resolved before proceeding
Fix end2end unit tests correctly waiting for promises to be resolved before proceeding

vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks