Control Flow Lab
Every scenario below exposes the same three things: an iteration counter, an elapsed-seconds clock, and a cf-verdict element that reads PENDING, PASS, or FAIL. That verdict is the one thing to assert on — a loop is only "correct" here if the verdict says so, not just because your script didn't throw. Every interactive element also carries a data-testid, the one part of this module that deliberately breaks from the rest of the site's plain-id convention, since that's the locator strategy most control-flow-heavy frameworks (Tosca included) are built around.
Already been through If/Else Conditions or While & Loops? Those stay as quick single-page warmups — this module is the deeper, gradeable version of the same four structures, plus a bounded for loop.
Approval Router
If/Else — a random request amount, two always-visible buttons, only one correct branch.
Priority Triage
Else-If chain — a four-way severity route with a VIP flag exposed as a string, not a checkbox.
Batch Job Monitor
While — a genuine 6-minute polling loop (30s fast mode for building) that survives refresh and punishes fixed sleeps.
Roll to Six
Do-While — roll at least once, then keep rolling until you hit a 6, guaranteed within 12 rolls.
Ledger Sweep
For — sum 25 rows where status is POSTED, including a trailing-space status only a trimmed compare catches.