test: GDPR三入口结构断言(Task 9质量审查)
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -67,3 +67,14 @@ def test_autoinvite_specialcase_removed_and_guard_kept():
|
||||
fn = _extract_function(src, "startInviteTimer")
|
||||
assert "if (!autoInvite) return;" in fn, \
|
||||
"startInviteTimer 必须保留 data-auto-invite=false 永不自动弹的守卫"
|
||||
|
||||
|
||||
def test_gdpr_privacy_notice_present():
|
||||
"""GDPR 三入口结构锁(Task 9 质量审查): 邀请卡/聊天面板/独立页的
|
||||
privacy 提示是纯模板字符串,无此断言则重构时会无声丢失。"""
|
||||
wjs = _read("widget.js")
|
||||
assert "invite-privacy" in wjs and "chat-footer" in wjs
|
||||
assert 'href="https://hesupipe.com/privacy-policy/"' in wjs
|
||||
assert 'target="_blank" rel="noopener"' in wjs
|
||||
chat = _read("chat.html")
|
||||
assert "privacy policy" in chat and "privacy-policy/" in chat
|
||||
|
||||
Reference in New Issue
Block a user