Acceptance tests

Fixes #315.
You should never hard code a specific sleep time:
1. Test runs extra slow if it's too long.
2. Test fails if it's too short.

Instead, use the `loop_until` construct, or just a while loop here to loop until condition is met.