Comparison
Auto-waitingvsEnd-to-end test
Auto-waiting
you deleted the `sleep(500)` because the runner already retries the assertion until it passes or times out.
A test runner retrying a query or assertion until it succeeds or a timeout expires, instead of asserting once against an asynchronous interface. It is what removed fixed sleeps from browser testing, and fixed sleeps are simultaneously the main cause of flakiness and of slow suites. It cannot rescue an assertion about something that should not appear, which still needs an explicit wait for a stable state.
Full entry →End-to-end test
you drove a real browser through the whole signup flow against a running server.
A test exercising the deployed system as a user does, in a real browser, against real or near-real services. It is the only kind that can prove a flow works, and it is slow, expensive and the most likely to be flaky. Keep a small number covering the paths that must never break, and push everything else down to cheaper layers.
Full entry →