move Then-step to the end of the file
use wait_until_assert instead on sleep(1)