Quirks Lab — product requirements
Quirks Lab is a practice site of tricky web UI patterns: sign-in and widgets inside open, closed and nested shadow roots, nested same-origin iframes, canvas-only targets and a "dynamic" room with hover menus, late content, rotating identifiers, native dialogs, drag-to-sort and a blocking promo overlay. Each pattern has a visible, checkable outcome.
Problem. Interface automation and manual testers need a stable place to practise elements that defeat naive locators, with an unambiguous on-screen result for every interaction.
Users
- Automation engineer — Operate shadow-DOM, iframe, canvas and timing-sensitive controls and confirm the outcome where it really surfaces.
- Manual tester — Exercise each pattern by hand and compare against exact messages.
Goals
- Every interaction produces an exact, observable message or state change.
- Outcomes that cross a boundary (frame to page, element to server) are really delivered, not just claimed locally.
- Values entered by the user are stored and echoed exactly as entered.
Out of scope
- Cross-origin iframes
- File download contents
- Mobile touch gestures beyond pointer events
Contents
Shadow DOM room: sign-in and vault
Sign-in card inside an open shadow root and a vault inside a closed shadow root.
- Initial header "Not signed in"
- After a valid sign-in the card reads "Signed in as Tess Tester" and the header shows "Tess Tester"
- The password field is masked
- Both fields empty: "Username and password are required"
- Wrong password: "Invalid credentials" and the header still says "Not signed in"
- Signed out, "Reveal code": "Sign in first to reveal the code"
- Signed in, "Reveal code": shows "QX-7319-ALPHA" and the button becomes "Hide code"
- "Hide code" masks the code again as dots
Shadow DOM room: widgets
Nested counter, slotted tabs and a div-based combobox inside shadow roots.
- Starts at 0 with "-" disabled
- Three clicks on "+" read 3; one click on "-" then reads 2
- At 10 "+" is disabled
- "Specs" shows "Build channel: stable · Shadow roots: open, closed, nested."
- "Reviews" shows a quote ending "- 5 stars" and hides the Specs text
- Choosing "Team" in the combobox shows trigger "Plan: Team" and "Selected plan: Team"
Feedback with a form-associated rating
A star-rating custom element that takes part in a native form and is stored by the server.
- Submit with no stars: "Pick 1 to 5 stars"
- Name "Ada", 4 stars, comment: "Saved FB-NNNN · 4/5 stars from Ada"
- Five stars are echoed as "5/5 stars"; a rating is never recorded as 0 when stars were chosen
Frames room
Inline srcdoc iframe and three-level nested same-origin iframes that report to the top page.
- Empty name: "Please type a name"
- Name "Lin": "Hello, Lin!" inside the frame
- Confirm is disabled until "I agree to the delivery terms" is ticked
- After Confirm the inner frame says "Sent to the page"
- The top page status then reads "Confirmed by inner frame · Express shipping" for the Express choice (Standard shipping by default)
- The inner frame never claims delivery unless the top page was actually updated
Canvas room
Shape targets and a signature pad drawn on canvases without DOM nodes.
- Prompt "Target 1 of 3: click the green circle"
- A wrong shape shows "Missed (clicked the blue square)"
- Correct hit shows "Hit: green circle" and advances the prompt
- After all three: "All 3 targets hit"
- Initially "Strokes: 0" and Save disabled
- Two strokes: "Strokes: 2", Save enabled, Save shows "Signature saved (2 strokes)"
- Clear empties the pad, "Strokes: 0", Save disabled
Dynamic room
Hover menu, late content, rotating ids, native dialogs, drag-sort, gated controls and popup.
- Hovering "Export" shows CSV and PDF; clicking CSV shows "Exported report.csv"
- While running: spinner "Generating..." and the button disabled
- Result "Report RPT-NNNN ready · 128 rows"
- Toast "Changes published" disappears after about 2.5 s
- Three clicks show "Drafts saved: 3"
- Delete + Cancel: "Delete cancelled"; Delete + OK: "Item deleted"
- Rename with "Invoice 42 (final)": "Renamed to Invoice 42 (final)"
- Initial order is 3, 1, 5, 2, 4: "Order wrong: 3, 1, 5, 2, 4"
- After dragging into 1..5: "Order correct"
- Continue is disabled until "I have read the lab rules" is ticked, then "Continued after consent"
- Bold text typed as "agenda" saves as "Saved 21 characters (with bold text)"
- "Open help in a new window" opens a window titled "Help center" with a working "Close window"
Non-functional requirements
Glossary and rules
| Open shadow root | A shadow tree reachable through element.shadowRoot. |
|---|---|
| Closed shadow root | A shadow tree not reachable from script; read it from the screen. |