Files
SlabUploader/test-results/gate-b-2026-09-07/vitest.txt
T
grokbot_ty b3e2faf690 test: Gate B pass evidence 2026-09-07 (vitest/pytest/health)
Evidence for Test Bar report: 16 pass / 1 fail (D-1) / 1 not run (OPS-1).
Fail logged on issue #29.
2026-09-07 17:06:14 +00:00

156 lines
14 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
RUN v2.1.9 /workspace/gitea-atd/Ty_Tech/SlabUploader/frontend
✓ src/__tests__/tv8-pricing.test.ts > TV-8 Pricing > computeRecommendedPrice > bdft × price_per_bdft rounds to expected recommended price
✓ src/__tests__/tv8-pricing.test.ts > TV-8 Pricing > computeRecommendedPrice > 0 bdft yields 0
✓ src/__tests__/tv8-pricing.test.ts > TV-8 Pricing > computeSlabPrice — with pricing rule > recommended price pre-fills when no override
✓ src/__tests__/tv8-pricing.test.ts > TV-8 Pricing > computeSlabPrice — with pricing rule > user override stored as rounded override price
✓ src/__tests__/tv8-pricing.test.ts > TV-8 Pricing > computeSlabPrice — no pricing rule > recommended price is null, manual price stored
✓ src/__tests__/tv8-pricing.test.ts > TV-8 Pricing > computeSlabPrice — no pricing rule > manual price rounds half-up to 2 decimals
✓ src/__tests__/tv9-thickness-band.test.ts > TV-9 Thickness → Woo range > 1 inch rounds up into 1"–1 1/2"
✓ src/__tests__/tv9-thickness-band.test.ts > TV-9 Thickness → Woo range > 0.75 inches maps to 3/4"–1"
✓ src/__tests__/tv9-thickness-band.test.ts > TV-9 Thickness → Woo range > 0.875 inches maps to 3/4"–1"
✓ src/__tests__/tv9-thickness-band.test.ts > TV-9 Thickness → Woo range > 1.5 inches maps to 1 1/2"–2"
✓ src/__tests__/tv9-thickness-band.test.ts > TV-9 Thickness → Woo range > returns null when no range contains the thickness
✓ src/__tests__/tv9-thickness-band.test.ts > TV-9 Thickness → Woo range > rounds thickness to nearest 1/8" before matching
stdout | src/__tests__/tv3-tv10-units.test.ts > TV-3 Scale, sqft, bdft > bdft = sqft × thickness_in with no divide-by-12
{"case":"TV-3","lengthIn":96,"thicknessIn":1.5,"sqft":0.64,"bdft":0.96,"expectedBdft":0.96,"identity_1sqft_1in":1}
stdout | src/__tests__/tv3-tv10-units.test.ts > TV-10 Rounding > half-up / nearest-step matches TECH-SPEC vectors
{"case":"TV-10","length":{"raw":96.04,"rounded":96,"expected":96},"sqft":{"raw":0.641,"rounded":0.64,"expected":0.64},"bdft":{"raw":11.525,"rounded":11.53,"expected":11.53},"price":{"raw":12.345,"rounded":12.35,"expected":12.35}}
✓ src/__tests__/tv3-tv10-units.test.ts > TV-3 Scale, sqft, bdft > bdft = sqft × thickness_in with no divide-by-12
✓ src/__tests__/tv3-tv10-units.test.ts > TV-3 Scale, sqft, bdft > bdft is monotonic in thickness and sqft
✓ src/__tests__/tv3-tv10-units.test.ts > TV-10 Rounding > half-up / nearest-step matches TECH-SPEC vectors
stdout | src/__tests__/tv4-tv5-axis.test.ts > TV-4 Width samples at 6" stations > reports min, max, average perpendicular to confirmed axis on 96" length
{"case":"TV-4","lengthPx":96,"widthPx":24,"scale":1,"stations":[6,12,18,24,30,36,42,48,54,60,66,72,78,84,90],"widths":[23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684],"min":23.999999046325684,"max":23.999999046325684,"average":23.999999046325684,"expectedWidthIn":24}
stdout | src/__tests__/tv4-tv5-axis.test.ts > TV-5 Angled-end length axis > follows prevailing length; widths stay perpendicular after confirm
{"case":"TV-5","direction":{"x":1,"y":0},"lengthPx":96,"widthPx":24,"bodySampleCount":12,"bodyWidths":[23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684,23.999999046325684],"min":0,"max":23.999999046325684,"average":21.19999910990397,"rotatedDirection":{"x":6.123233995736766e-17,"y":1}}
✓ src/__tests__/tv4-tv5-axis.test.ts > TV-4 Width samples at 6" stations > reports min, max, average perpendicular to confirmed axis on 96" length
✓ src/__tests__/tv4-tv5-axis.test.ts > TV-5 Angled-end length axis > follows prevailing length; widths stay perpendicular after confirm
✓ src/__tests__/tv1-tv2-mask.test.ts > TV-1 green-sheet chroma-key > keeps interior green-ish patch that does not touch the border
✓ src/__tests__/tv1-tv2-mask.test.ts > TV-1 green-sheet chroma-key > re-runs live when knobs change and still skips U2Net
✓ src/__tests__/tv1-tv2-mask.test.ts > TV-2 black-sheet threshold + border flood-fill > keeps dark interior wood that does not touch the border
✓ src/__tests__/tv1-tv2-mask.test.ts > TV-2 black-sheet threshold + border flood-fill > flood-fill removes only border-connected dark pixels
✓ src/__tests__/tv1-tv2-mask.test.ts > mask confirm hooks (pure) > starts pending, confirm and retake transition without DOM
stdout | src/__tests__/validation.test.ts > V-1 SKU validation > accepts all valid SKU boundary strings
V-1 valid: "ABC" → length=3, valid=true
V-1 valid: "012" → length=3, valid=true
V-1 valid: "A0A" → length=3, valid=true
V-1 valid: "A-B" → length=3, valid=true
V-1 valid: "0-1" → length=3, valid=true
V-1 valid: "BW-0042" → length=7, valid=true
V-1 valid: "SLAB-UAT-001" → length=12, valid=true
V-1 valid: "A9Z" → length=3, valid=true
V-1 valid: "AAAAAAAAAAAAAAAAAAAAAAAA" → length=24, valid=true
V-1 valid: "A1B2C3D4E5F6G7H8I9J0K-12" → length=24, valid=true
V-1 valid: "A-A-A-A-A-A" → length=11, valid=true
V-1 valid: "1-2-3-4-5-6" → length=11, valid=true
V-1 valid: "ABCDEF" → length=6, valid=true
stdout | src/__tests__/validation.test.ts > V-1 SKU validation > rejects all invalid SKU boundary strings
V-1 invalid: "A" → valid=false, errors=too_short, invalid_charset
V-1 invalid: "AB" → valid=false, errors=too_short, invalid_charset
V-1 invalid: "AAAAAAAAAAAAAAAAAAAAAAAAA" → valid=false, errors=too_long, invalid_charset
V-1 invalid: "abc" → valid=false, errors=invalid_charset
V-1 invalid: "bw-0042" → valid=false, errors=invalid_charset
V-1 invalid: "aB3" → valid=false, errors=invalid_charset
V-1 invalid: "ABC!" → valid=false, errors=invalid_charset
V-1 invalid: "A B" → valid=false, errors=invalid_charset
V-1 invalid: "A_B" → valid=false, errors=invalid_charset
V-1 invalid: "ABC.D" → valid=false, errors=invalid_charset
V-1 invalid: "ABC#1" → valid=false, errors=invalid_charset
V-1 invalid: "ABC/1" → valid=false, errors=invalid_charset
V-1 invalid: "ABC\1" → valid=false, errors=invalid_charset
V-1 invalid: "" → valid=false, errors=too_short, invalid_charset
stdout | src/__tests__/validation.test.ts > V-2 content field maxLength validation > accepts title at exactly maxLength
V-2 title: length=200, valid=true
stdout | src/__tests__/validation.test.ts > V-2 content field maxLength validation > rejects title that exceeds maxLength by 1 character
V-2 title invalid: length=201, valid=false, errors=exceeds_max_length
stdout | src/__tests__/validation.test.ts > V-2 content field maxLength validation > accepts short_title at exactly maxLength
V-2 short_title: length=200, valid=true
stdout | src/__tests__/validation.test.ts > V-2 content field maxLength validation > rejects short_title that exceeds maxLength by 1 character
V-2 short_title invalid: length=201, valid=false, errors=exceeds_max_length
stdout | src/__tests__/validation.test.ts > V-2 content field maxLength validation > accepts description at exactly maxLength
V-2 description: length=2500, valid=true
stdout | src/__tests__/validation.test.ts > V-2 content field maxLength validation > rejects description that exceeds maxLength by 1 character
V-2 description invalid: length=2501, valid=false, errors=exceeds_max_length
stdout | src/__tests__/validation.test.ts > V-3 validation module version hash > computes a stable hash from current validation rules
V-3 module hash: "v1"
stdout | src/__tests__/validation.test.ts > V-3 validation module version hash > validateModuleHash returns true when client hash matches current module
V-3 match: hash="v1", valid=true
stdout | src/__tests__/validation.test.ts > V-3 validation module version hash > validateModuleHash returns 412 with fresh module when client hash mismatches
V-3 mismatch: clientHash="v0", serverHash="v1", errors=validation_module_stale
✓ src/__tests__/validation.test.ts > V-1 SKU validation > accepts all valid SKU boundary strings
✓ src/__tests__/validation.test.ts > V-1 SKU validation > rejects all invalid SKU boundary strings
✓ src/__tests__/validation.test.ts > V-1 SKU validation > isSkuValid returns true for valid SKUs and false for invalid SKUs
✓ src/__tests__/validation.test.ts > V-1 SKU validation > rejects SKU with lowercase letters
✓ src/__tests__/validation.test.ts > V-1 SKU validation > rejects SKU that is too short or too long
✓ src/__tests__/validation.test.ts > V-1 SKU validation > accepts SKU at exact boundaries (3 and 24 characters)
✓ src/__tests__/validation.test.ts > V-1 SKU validation > accepts hyphens anywhere in the SKU including edges
✓ src/__tests__/validation.test.ts > V-1 SKU validation > rejects SKU with spaces, underscores, periods, slashes, backslashes, or other special chars
✓ src/__tests__/validation.test.ts > V-1 SKU validation > returns specific error codes for different failure reasons
✓ src/__tests__/validation.test.ts > V-2 content field maxLength validation > accepts title at exactly maxLength
✓ src/__tests__/validation.test.ts > V-2 content field maxLength validation > rejects title that exceeds maxLength by 1 character
✓ src/__tests__/validation.test.ts > V-2 content field maxLength validation > accepts short_title at exactly maxLength
✓ src/__tests__/validation.test.ts > V-2 content field maxLength validation > rejects short_title that exceeds maxLength by 1 character
✓ src/__tests__/validation.test.ts > V-2 content field maxLength validation > accepts description at exactly maxLength
✓ src/__tests__/validation.test.ts > V-2 content field maxLength validation > rejects description that exceeds maxLength by 1 character
✓ src/__tests__/validation.test.ts > V-2 content field maxLength validation > accepts empty strings for optional content fields
✓ src/__tests__/validation.test.ts > V-2 content field maxLength validation > accepts multi-byte UTF-8 characters and counts Unicode code points, not UTF-16 units
✓ src/__tests__/validation.test.ts > V-2 content field maxLength validation > rejects content exceeding maxLength even with multi-byte UTF-8
✓ src/__tests__/validation.test.ts > V-2 content field maxLength validation > isContentValid rejects any field that exceeds its maxLength
✓ src/__tests__/validation.test.ts > V-2 content field maxLength validation > validateContentField returns field-specific error codes
✓ src/__tests__/validation.test.ts > V-3 validation module version hash > computes a stable hash from current validation rules
✓ src/__tests__/validation.test.ts > V-3 validation module version hash > validateModuleHash returns true when client hash matches current module
✓ src/__tests__/validation.test.ts > V-3 validation module version hash > validateModuleHash returns 412 with fresh module when client hash mismatches
✓ src/__tests__/validation.test.ts > V-3 validation module version hash > returns the correct validation module version
✓ src/__tests__/validation.test.ts > V-3 validation module version hash > fresh module includes current version hash and rules
stdout | src/__tests__/tv6-tv7-crop.test.ts > TV-6 3:4 crop, 80% fill, transparent PNG, ≥1600px > computes crop target dimensions preserving 3:4 aspect and 80% fill at extremes
{"case":"TV-6","target1":{"slabW":1281,"slabH":3000,"frame":{"width":1601,"height":2135},"aspect":0.7498829039812647},"target2":{"slabW":2000,"slabH":1600,"frame":{"width":1500,"height":2000},"aspect":0.75}}
stdout | src/__tests__/tv6-tv7-crop.test.ts > TV-6 3:4 crop, 80% fill, transparent PNG, ≥1600px > finds slab bounding box correctly
{"case":"TV-6","bounds":{"left":1360,"top":100,"right":2640,"bottom":3099,"widthPx":1281,"heightPx":3000}}
stdout | src/__tests__/tv6-tv7-crop.test.ts > TV-6 3:4 crop, 80% fill, transparent PNG, ≥1600px > crops large source to 3:4 with 80% fill, shorter side ≥ 1600, transparent PNG
{"case":"TV-6","frameW":1601,"frameH":2135,"shorterSide":1601,"meetsMinPx":true,"marginAlpha":0,"slabCenterAlpha":255,"aspect":0.7498829039812647}
stdout | src/__tests__/tv6-tv7-crop.test.ts > TV-6 3:4 crop, 80% fill, transparent PNG, ≥1600px > property: fill at extremes equals FILL_TARGET at limiting dimension
{"case":"TV-6","fillAtLimitingDim":0.8001249219237976,"expectedFill":0.8}
stdout | src/__tests__/tv6-tv7-crop.test.ts > TV-7 Too-small source — warn, no upscale, not publishable > detects undersized source and refuses upscale
{"case":"TV-7","slabW":400,"slabH":300,"frameW":281,"frameH":375,"shorterSide":281,"outputPxMin":1600,"undersized":true}
stdout | src/__tests__/tv6-tv7-crop.test.ts > TV-7 Too-small source — warn, no upscale, not publishable > cropTo34 returns meetsMinPx = false for undersized source
{"case":"TV-7","frameW":281,"frameH":375,"shorterSide":281,"meetsMinPx":false}
stdout | src/__tests__/tv6-tv7-crop.test.ts > TV-7 Too-small source — warn, no upscale, not publishable > property: no upscale path — output is never larger than source
{"case":"TV-7","noUpscaleCheck":{"small":{"source":"800x640","output":"281x375"},"large":{"source":"4000x3200","output":"1601x2135"}}}
✓ src/__tests__/tv6-tv7-crop.test.ts > TV-6 3:4 crop, 80% fill, transparent PNG, ≥1600px > computes crop target dimensions preserving 3:4 aspect and 80% fill at extremes
✓ src/__tests__/tv6-tv7-crop.test.ts > TV-6 3:4 crop, 80% fill, transparent PNG, ≥1600px > finds slab bounding box correctly
✓ src/__tests__/tv6-tv7-crop.test.ts > TV-6 3:4 crop, 80% fill, transparent PNG, ≥1600px > crops large source to 3:4 with 80% fill, shorter side ≥ 1600, transparent PNG
✓ src/__tests__/tv6-tv7-crop.test.ts > TV-6 3:4 crop, 80% fill, transparent PNG, ≥1600px > property: fill at extremes equals FILL_TARGET at limiting dimension
✓ src/__tests__/tv6-tv7-crop.test.ts > TV-7 Too-small source — warn, no upscale, not publishable > detects undersized source and refuses upscale
✓ src/__tests__/tv6-tv7-crop.test.ts > TV-7 Too-small source — warn, no upscale, not publishable > cropTo34 returns meetsMinPx = false for undersized source
✓ src/__tests__/tv6-tv7-crop.test.ts > TV-7 Too-small source — warn, no upscale, not publishable > property: no upscale path — output is never larger than source
Test Files 7 passed (7)
Tests 54 passed (54)
Start at 17:00:05
Duration 1.45s (transform 730ms, setup 0ms, collect 1.07s, tests 1.04s, environment 2ms, prepare 641ms)
EXIT:0