feat: brand 白名单下发(站点覆盖/租户头像/CORS) + widget/chat 客户端 key 租户化 + 会话站点标
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -73,13 +73,22 @@ def test_autoinvite_specialcase_removed_and_guard_kept():
|
||||
|
||||
def test_gdpr_privacy_notice_present():
|
||||
"""GDPR 三入口结构锁(Task 9 质量审查): 邀请卡/聊天面板/独立页的
|
||||
privacy 提示是纯模板字符串,无此断言则重构时会无声丢失。"""
|
||||
privacy 提示是纯模板字符串,无此断言则重构时会无声丢失。
|
||||
|
||||
等价迁移(Task 10): 隐私链接原锚 widget.js/chat.html 硬编码
|
||||
hesupipe.com URL——品牌值已迁 seed_profiles/*/tenant.json 的
|
||||
brand.privacy_url,经 /api/public/brand 下发后由 JS 填 href(为空隐藏)。
|
||||
断言语义等价: 仍锁"三入口结构 + 隐私链接出自 brand.privacy_url"机制,
|
||||
值锚定改由 test_widget_namespacing.test_brand_values_live_in_seed_profiles
|
||||
承担(jiancai privacy_url = hesupipe.com/privacy-policy)。"""
|
||||
wjs = _read("widget.js")
|
||||
assert "invite-privacy" in wjs and "chat-footer" in wjs
|
||||
assert 'href="https://hesupipe.com/privacy-policy/"' in wjs
|
||||
assert "privacy_url" in wjs # 挂件隐私链接读 brand(Task 10 迁移点)
|
||||
assert 'target="_blank" rel="noopener"' in wjs
|
||||
chat = _read("chat.html")
|
||||
assert "privacy policy" in chat and "privacy-policy/" in chat
|
||||
assert "privacy policy" in chat # 三入口文案仍在出厂模板
|
||||
cjs = _read("js/chat.js")
|
||||
assert "privacy_url" in cjs # 独立页 href 由 brand 填(原锚 chat.html 硬编码 URL)
|
||||
|
||||
|
||||
def test_position_class_panel_alignment():
|
||||
|
||||
Reference in New Issue
Block a user