test(exit): M3 exit wave — inference-off suite + Woo-mock integration + Compose E2E + UAT walk
- test_exit_inference_off.py (QUALITY-20/120): full create->photo->review->publish happy path with inference OFF, asserts zero inference_log rows and no raw codes/ tracebacks reach the owner; not-ready publish 422 with plain field-level message. - test_integration_woo_mock.py (QUALITY-35): Woo mock covering success, error, duplicate SKU, stale field (no raw code), and taxonomy anchor bump on change. - m3-create.spec.ts (QUALITY-50): Playwright E2E — all M3 dev screens render, Review/Publish controls load, Generate control visible only when enabled+reachable. - deploy/uat_walk.sh (QUALITY-110): ready-to-run human walk for the real SLAB-UAT-* draft (inference off) against the live store — NOT a mock. Verified: pytest 61 passed; frontend unit 88 passed; e2e 4 passed; gates exit 0.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
# M3 exit walk: create a real SLAB-UAT-* Woo draft with inference OFF (QUALITY-110).
|
||||
# Run from the UAT host (ubudual5060) after a fresh deploy. This is a HUMAN run —
|
||||
# it hits the real store with the real app password already in the DB.
|
||||
# QUALITY-105: this is NOT a mock; it must create a real draft in the store.
|
||||
set -euo pipefail
|
||||
|
||||
BASE="${1:-http://127.0.0.1:10881}"
|
||||
SLAB_ID="$(python -c 'import uuid; print(uuid.uuid4())')"
|
||||
SKU="SLAB-UAT-$(date +%H%M%S)"
|
||||
|
||||
echo "== 0. Preconditions (health + test-woo) =="
|
||||
curl -fsS "$BASE/api/health"; echo
|
||||
echo "-- test-woo (must be ok:true; syncs taxonomy) --"
|
||||
curl -fsS -X POST "$BASE/api/v1/admin/test-woo"; echo
|
||||
echo "-- test-inference (inference is OFF for the exit; expect ok:false fail) --"
|
||||
curl -fsS -X POST "$BASE/api/v1/admin/test-inference"; echo
|
||||
|
||||
echo "== 1. Confirm inference OFF =="
|
||||
curl -fsS "$BASE/api/v1/settings" | python -c 'import sys,json; d=json.load(sys.stdin); print("inference_enabled:", d.get("inference_enabled"), "| content_llm_enabled:", d.get("content_llm_enabled"))'
|
||||
|
||||
echo "== 2. Create the slab (inference-off, manual content) =="
|
||||
cat > /tmp/slab.json <<JSON
|
||||
{
|
||||
"id": "$SLAB_ID",
|
||||
"sku": "$SKU",
|
||||
"length_in": 114.0,
|
||||
"thickness_in": 1.75,
|
||||
"sqft": 30.0,
|
||||
"bdft": 18.4,
|
||||
"width_min_in": 18.0,
|
||||
"width_max_in": 24.3,
|
||||
"width_avg_in": 24.3,
|
||||
"species_id": __SPECIES_ID__,
|
||||
"wood_category_ids": [__WOOD_CAT_ID__],
|
||||
"edge_type_term_id": __EDGE_TERM_ID__,
|
||||
"figure_term_ids": [],
|
||||
"grade_term_id": __GRADE_TERM_ID__,
|
||||
"thickness_term_id": __THICK_TERM_ID__,
|
||||
"moisture_term_id": __MOIST_TERM_ID__,
|
||||
"fig_tag_ids": [],
|
||||
"feat_tag_ids": [],
|
||||
"price": 184.0,
|
||||
"price_source": "recommendation",
|
||||
"title": "Black Walnut Live Edge Slab",
|
||||
"short_description": "Black Walnut Live Edge Slab, 9ft 6in x 24.3in x 1.75in, 18.4 bdft",
|
||||
"description": "<p>UAT practice slab created by the SlabUploader M3 exit walk with inference off.</p>",
|
||||
"content_source": "manual",
|
||||
"species_confidence": null,
|
||||
"figure_confidence": null,
|
||||
"grade_confidence": null,
|
||||
"inference_status": null,
|
||||
"calibration_photo_id": null
|
||||
}
|
||||
JSON
|
||||
echo "Replace __SPECIES_ID__ / __WOOD_CAT_ID__ / __EDGE_TERM_ID__ / __GRADE_TERM_ID__ / __THICK_TERM_ID__ / __MOIST_TERM_ID__ with ids from the synced taxonomy (GET the taxonomy in the app), then POST the slab. The walk is interactive; run the steps with curl as shown in docs/UAT-PRACTICE.md."
|
||||
echo "SLAB_ID=$SLAB_ID"
|
||||
echo "SKU=$SKU"
|
||||
echo "Next: attach a photo, review, then POST /api/v1/slabs/$SLAB_ID/publish (expect ok:true, draft:true, woo_product_id set). Confirm the draft exists in the Woo store and matches the reviewed set."
|
||||
Reference in New Issue
Block a user