tests(functional): fix promise return, clean up.
Merge pull request #1035 from vladikoff/test-promise-fix

tests(functional): fix promise return, clean up.