Skip to main content

Section 1.2 Parsons Left-Numbering Overflow Tests II

Comprehensive test cases for the numbered="left" overflow fix. Groups 1-8 appeared in v1; Groups 9-14 cover edge cases identified by code inspection that were not in v1.

Subsection 1.2.1 Group 9: language="math" (MathJax async sizing)

Activity 1.2.1.

Case 9-A: language="math", adaptive, indentation hidden, left-numbered. MathJax rendering is awaited inside the block-width loop; the label column must be added after that await resolves or the area will be sized to the pre-render (narrow) width.

Activity 1.2.2.

Case 9-B: language="math", static (non-adaptive), indentation enabled, left-numbered. Combines the MathJax sizing path with the indent-column width budget.

Activity 1.2.3.

Case 9-C: Wide math expressions, adaptive, left-numbered. Large rendered equations push block width further than any code line would; this is the worst case for the MathJax-then-label sizing order.

Subsection 1.2.2 Group 10: "Help Me" β†’ removeIndentation() path

Activity 1.2.4.

Case 10-A: Adaptive, indentation enabled, left-numbered. After 3 failed attempts the "Help Me" button becomes active. If all distractors are already removed and blocks ≀ 3, pressing Help Me triggers removeIndentation(), which has its own blockWidth += 25 branch. Verify the source area does not overflow after Help Me fires.

Activity 1.2.5.

Case 10-B: Adaptive, long lines, indentation enabled, left-numbered. Long lines maximise blockWidth in the removeIndentation() recalculation, exposing any remaining off-by-one in the +25 px branch.

Subsection 1.2.3 Group 11: Multi-line blocks

Activity 1.2.6.

Case 11-A: Blocks with multiple clines (joined into one draggable unit), adaptive, indentation hidden, left-numbered. The label sits beside a tall block; confirm horizontal layout is unaffected.

Activity 1.2.7.

Case 11-B: Multi-cline blocks with indentation enabled, left-numbered. Tests that a tall indented block does not push the label column outside the source area.

Subsection 1.2.4 Group 12: DAG grader

Activity 1.2.8.

Case 12-A: DAG grader (order-independent), adaptive, indentation hidden, left-numbered. The tagged blocks follow the same sizing path; confirm labels don’t overflow the source area.

Subsection 1.2.5 Group 13: Maximum indent level (answer4)

Activity 1.2.9.

Case 13-A: Four indent levels, adaptive, left-numbered. This triggers the answer4 CSS class, the deepest indent supported by the standard CSS. The source area width budget is at its minimum: \((availableWidth - 4 \times 30 - 80) / 2 - 25\) px.

Activity 1.2.10.

Case 13-B: Four indent levels, 10+ blocks (double-digit labels), adaptive, left-numbered. This is the narrowest possible source area combined with the widest label column β€” the triple-threat case.

Subsection 1.2.6 Group 14: Explicit shuffle order

Activity 1.2.11.

Case 14-A: Explicit block order, adaptive, left-numbered. The order attribute bypasses the random shuffle and places blocks in a fixed sequence. The sizing code runs identically, but this exercises the order-specific branch in createBlocks().