Dynamic Waits
mediumEverything here happens later. Explicit waits or flaky tests — your choice.
Delayed element
The element does not exist in the DOM until exactly 5 seconds after you click. Wait for it explicitly — a hard-coded sleep of 4.9s fails, a sleep of 6s wastes a second on every run.
Click the button, then wait for it.
Simulated AJAX
Clicking load disables the button and shows a spinner plus skeleton rows for 2.5 seconds before the data renders. Assert the rows only after the spinner is gone.
No data loaded yet.
Progress bar
Start fills the bar from 0 to 100% over about 8 seconds. Stop it at exactly 75% — the status tells you how close you got.
Progress idle.
Self-enabling control
The second button starts disabled. Arming it begins a 4-second countdown, after which it enables itself. Wait for the enabled state — don't click blind.
The second button is disabled. Arm it to start the 4s countdown.
Status transitions
Running the job drives the status through queued → processing (after 1.5s) → done (after 4s total). Assert each intermediate state, not just the final one.
idleNo job has been started yet.