Symptom
The #113 all-in-vs-market breakdown never mounts on the real checkout page.
Cause (from real checkout DOM, user-provided)
TCGplayer renders summary rows as label text node + value span inside one div:
<div>Item Total <span data-testid="packageItemTotal">$11.92</span></div>
<div> Shipping <span data-testid="packageShipping">FREE</span></div>
findOrderSummaryLabel requires an element whose own text is ONLY the label and contains no $. In the real shape, the only element containing the label also contains the value — so rows with dollar values are excluded by the $ rule, no Est. Tax label is ever found, the gate fails, and the block never renders. The fixture I authored used <span>Label</span><span>$X</span> pairs, which is why e2e passed.
Also from the real DOM: the label is "Item Total" (singular — regex already tolerates), and shipping can be the literal "FREE".
Fix
Row-shaped matching: accept elements whose normalized text STARTS with the label, is short (≤40 chars), and has ≤3 element children — then parse the amount from the row's own text ("FREE" → 0), falling back to the next sibling for flat label-only layouts. Scope the Items Total / Shipping lookups to the Est. Tax row's parent container so the left-column package box (which has its own "Item Total"/"Shipping FREE" rows) can't shadow the Order Summary values in multi-package carts.
Acceptance
Symptom
The #113 all-in-vs-market breakdown never mounts on the real checkout page.
Cause (from real checkout DOM, user-provided)
TCGplayer renders summary rows as label text node + value span inside one div:
findOrderSummaryLabelrequires an element whose own text is ONLY the label and contains no$. In the real shape, the only element containing the label also contains the value — so rows with dollar values are excluded by the$rule, no Est. Tax label is ever found, the gate fails, and the block never renders. The fixture I authored used<span>Label</span><span>$X</span>pairs, which is why e2e passed.Also from the real DOM: the label is "Item Total" (singular — regex already tolerates), and shipping can be the literal "FREE".
Fix
Row-shaped matching: accept elements whose normalized text STARTS with the label, is short (≤40 chars), and has ≤3 element children — then parse the amount from the row's own text ("FREE" → 0), falling back to the next sibling for flat label-only layouts. Scope the Items Total / Shipping lookups to the Est. Tax row's parent container so the left-column package box (which has its own "Item Total"/"Shipping FREE" rows) can't shadow the Order Summary values in multi-package carts.
Acceptance