Wait for promises in test
Only add stage if it's not already there