Refactoring e2e test preparation script to use promises instead of nested callbacks