feat(idea): create group auto-generates personas; channel removed; product->product/idea
Per product-idea focus: - GroupBuilder: 'สินค้า/บริการ/ไอเดีย' label; removed the channel select (channel is now chosen at chat time as a scenario, not at persona create). Create now auto-runs analyze so personas are generated immediately (no separate Analyze button). - GroupEdit: analyze button becomes 'สร้างบุคคลต้นแบบเพิ่มเติม' which APPENDS more personas (backend analyze?append=true reuses sales kit + keeps existing instead of replacing). - i18n product label updated. - User-journey test asserts append adds personas (15->30) and existing kept. All 9 backend suites pass. Rebuilt dist.
This commit is contained in:
@@ -85,4 +85,12 @@ for hidden in ("pains","tolerance","negotiation_levers","opener","income","backg
|
||||
assert hidden not in pfirst, f"trainee should not see '{hidden}' before chat"
|
||||
print("[ok] trainee sees only revealable persona (latent hidden)")
|
||||
|
||||
# 11. 'create more personas' = append (does not replace existing ones)
|
||||
before = len(C.get(f"/api/groups/{gid}/personas", headers=AH).get_json()["personas"])
|
||||
r = C.post(f"/api/groups/{gid}/analyze?append=true", headers=AH)
|
||||
assert r.status_code == 200, r.get_json()
|
||||
after = len(r.get_json()["personas"])
|
||||
assert after > before, f"append should add personas (before={before}, after={after})"
|
||||
print(f"[ok] append adds personas ({before} -> {after}); existing kept")
|
||||
|
||||
print("ALL USER-JOURNEY FLOW TESTS PASSED")
|
||||
|
||||
Reference in New Issue
Block a user