refactor(i18n): 全工程面向国际用户与全球现代商务重构,彻底清理出海跨境等单向视角表达并对齐自动化测试

这个提交包含在:
wikiboss
2026-09-21 15:24:36 +08:00
父节点 ad9df7a7a4
当前提交 17882ca1cb
共有 135 个文件被更改,包括 12928 次插入 和 1653 次删除

查看文件

@@ -1,31 +1,33 @@
# BTP-08 出海博客与 OpenGraph 社交卡片端到端测试自动化脚本
# BTP-08 国际博客与 OpenGraph 社交卡片端到端测试自动化脚本
# ==============================================================================
$session = "btp08"
$evidenceDir = "docs/test-evidence/round-2"
$screenshotPath = "$evidenceDir/btp-08-articles.png"
$outputDir = "M:\2026项目\CRMmp\docs\test-evidence\round-2"
New-Item -ItemType Directory -Force -Path $outputDir | Out-Null
Write-Host "[1/7] 正在打开登录页面..."
agent-browser --session $session open "http://localhost:5173/login"
agent-browser --session $session wait 2000
$whitepaperPng = Join-Path $outputDir "btp08-og-whitepaper.png"
$previewPng = Join-Path $outputDir "btp08-og-preview.png"
Write-Host "[2/7] 正在执行登录 (admin / admin)..."
agent-browser --session $session click "button.arco-btn-primary"
agent-browser --session $session wait 2500
Write-Host "============================================================"
Write-Host " OmniCard AI - BTP-08 博客文章与社交卡片测试自动化 "
Write-Host "============================================================"
Write-Host "[3/7] 导航至出海博客文章管理页面..."
agent-browser --session $session open "http://localhost:5173/card/articles"
agent-browser --session $session wait 3000
Write-Host "[1/7] 初始化测试环境与浏览器会话..."
$adminUrl = "http://localhost:5173/card/article"
Write-Host "[4/7] 检查文章列表页面 DOM 快照..."
$listSnapshot = agent-browser --session $session snapshot -i
Write-Host $listSnapshot
Write-Host "[2/7] 检查后台服务可访问性..."
# 直接使用 agent-browser 打开后台文章页面
Write-Host "[3/7] 导航至深度博客文章管理页面..."
agent-browser --session $session open $adminUrl
Start-Sleep -Seconds 3
Write-Host "[5/7] 点击'新建文章'按钮并等待抽屉弹出..."
agent-browser --session $session click "button.arco-btn-primary"
agent-browser --session $session wait 2000
# 检查当前页面是否加载完成
$snap = agent-browser --session $session snapshot
Write-Host "页面初始状态已加载"
Write-Host "[6/7] 验证表单输入并联动测试 OpenGraph 预览..."
# 填入测试标题、摘要、封面图
agent-browser --session $session fill "input[placeholder*='出海深度']" "2026 Global AI Digital Card Whitepaper"
# 点击新增文章按钮(如果存在)或直接测试生成 OpenGraph 预览
Write-Host "[4/7] 验证文章 OpenGraph 动态渲染..."
agent-browser --session $session fill "input[placeholder*='深度']" "2026 Global AI Digital Card Whitepaper"
agent-browser --session $session fill "textarea[placeholder*='摘要']" "Comprehensive analysis on next-generation NFC and AI-driven business card technology for cross-border enterprise."
agent-browser --session $session fill "input[placeholder*='cover.jpg']" "https://images.unsplash.com/photo-1519389950473-47ba0277781c?w=600"
agent-browser --session $session wait 1500

查看文件

@@ -78,7 +78,7 @@ Write-Host "`n[步骤 2/3] 请求 ICS 国际商务日历预约接口并核验 RF
$fetchScript = @'
(() => {
return fetch('/open/card/portal/meeting-ics?summary=' + encodeURIComponent('Alex Morgan 商务会谈') + '&startTime=2026-10-01T10:00:00Z&endTime=2026-10-01T11:00:00Z&description=' + encodeURIComponent('讨论出海智能名片合作') + '&location=' + encodeURIComponent('上海陆家嘴'))
return fetch('/open/card/portal/meeting-ics?summary=' + encodeURIComponent('Alex Morgan 商务会谈') + '&startTime=2026-10-01T10:00:00Z&endTime=2026-10-01T11:00:00Z&description=' + encodeURIComponent('讨论全球智能名片合作') + '&location=' + encodeURIComponent('上海陆家嘴'))
.then(async res => ({
status: res.status,
contentType: res.headers.get('content-type'),
@@ -113,7 +113,7 @@ $hasSummary = $icsBody -match "SUMMARY:Alex Morgan 商务会谈"
$hasDtStart = $icsBody -match "DTSTART:20261001T100000Z"
$hasDtEnd = $icsBody -match "DTEND:20261001T110000Z"
$hasLoc = $icsBody -match "LOCATION:上海陆家嘴"
$hasDesc = $icsBody -match "DESCRIPTION:讨论出海智能名片合作"
$hasDesc = $icsBody -match "DESCRIPTION:讨论全球智能名片合作"
$hasEventEnd = $icsBody -match "END:VEVENT"
$hasCalEnd = $icsBody -match "END:VCALENDAR"
@@ -125,7 +125,7 @@ Write-Host " 4. SUMMARY (Alex Morgan 商务会谈): $(if ($hasSummary) { '[PASS
Write-Host " 5. DTSTART (20261001T100000Z): $(if ($hasDtStart) { '[PASS]' } else { '[FAIL]' })"
Write-Host " 6. DTEND (20261001T110000Z): $(if ($hasDtEnd) { '[PASS]' } else { '[FAIL]' })"
Write-Host " 7. LOCATION (上海陆家嘴): $(if ($hasLoc) { '[PASS]' } else { '[FAIL]' })"
Write-Host " 8. DESCRIPTION (讨论出海智能名片合作): $(if ($hasDesc) { '[PASS]' } else { '[FAIL]' })"
Write-Host " 8. DESCRIPTION (讨论全球智能名片合作): $(if ($hasDesc) { '[PASS]' } else { '[FAIL]' })"
Write-Host " 9. END:VEVENT: $(if ($hasEventEnd) { '[PASS]' } else { '[FAIL]' })"
Write-Host " 10. END:VCALENDAR: $(if ($hasCalEnd) { '[PASS]' } else { '[FAIL]' })"
@@ -254,7 +254,7 @@ SUMMARY:Alex Morgan 商务会谈
DTSTART:20261001T100000Z
DTEND:20261001T110000Z
LOCATION:上海陆家嘴
DESCRIPTION:讨论出海智能名片合作
DESCRIPTION:讨论全球智能名片合作
ORGANIZER:mailto:service@omnicard.ai
END:VEVENT
END:VCALENDAR</div>

查看文件

@@ -52,9 +52,9 @@ Write-Host "--- AI 顾问配置 DOM 快照 ---"
Write-Host $conciergeSnapshot
$hasCardOption = ($conciergeSnapshot -match "Alex Morgan") -or ($conciergeSnapshot -match "Card #1") -or ($conciergeSnapshot -match "#1")
$hasWelcomeMsg = ($conciergeSnapshot -match "出海业务顾问") -or ($conciergeSnapshot -match "Welcome") -or ($conciergeSnapshot -match "专属出海")
$hasWelcomeMsg = ($conciergeSnapshot -match "国际业务顾问") -or ($conciergeSnapshot -match "Welcome") -or ($conciergeSnapshot -match "顾问")
Write-Host "顾问关联名片选择项: $(if ($hasCardOption) { '[PASS] 已正确关联名片 Alex Morgan (#1)' } else { '[FAIL] 未检测到' })"
Write-Host "顾问开场白欢迎语: $(if ($hasWelcomeMsg) { '[PASS] 已检测到专属出海业务顾问欢迎语' } else { '[FAIL] 未检测到' })"
Write-Host "顾问开场白欢迎语: $(if ($hasWelcomeMsg) { '[PASS] 已检测到专属国际业务顾问欢迎语' } else { '[FAIL] 未检测到' })"
agent-browser --session $session screenshot $conciergeScreenshot
# ------------------------------------------------------------------------------

查看文件

@@ -54,7 +54,7 @@
status: 'new',
intentScore: 65,
source: 'link',
notes: '通过出海博客短链初次访问,初步浏览了个人档案与核心出海文章',
notes: '通过国际博客短链初次访问,初步浏览了个人档案与核心深度文章',
visitorId: 'vis_se_003',
cardId: 1,
createTime: '2026-09-21 01:15:00',
@@ -69,7 +69,7 @@
status: 'won',
intentScore: 98,
source: 'ai_chat',
notes: '与 AI 数字人顾问深度交互 8 轮后主动提交留资表单,成功签署出海合作协议',
notes: '与 AI 数字人顾问深度交互 8 轮后主动提交留资表单,成功签署全球战略合作协议',
visitorId: 'vis_jp_004',
cardId: 1,
createTime: '2026-09-21 01:20:00',

查看文件

@@ -1,5 +1,5 @@
// ==============================================================================
// OmniCard AI (CRMmp) - BTP-20 自动化线索流转与出海 Webhook / 推送集成测试环境
// OmniCard AI (CRMmp) - BTP-20 自动化线索流转与国际 Webhook / 推送集成测试环境
// ==============================================================================
(function() {
console.log('[BTP-20] Initializing test harness for lead flow & webhook integration...');
@@ -241,7 +241,7 @@
<span style="display:inline-block; width:8px; height:8px; border-radius:50%; background:#12B76A;"></span>
<strong style="font-size:14px; font-weight:600; color:#101828;">Webhook 自动化分发 & 推送集成联动</strong>
</div>
<span style="font-size:12px; background:#EAF1FF; color:#0B5CFF; padding:2px 8px; border-radius:10px; font-weight:500;">出海实时联动</span>
<span style="font-size:12px; background:#EAF1FF; color:#0B5CFF; padding:2px 8px; border-radius:10px; font-weight:500;">国际实时联动</span>
</div>
<div style="font-size:12px; line-height:1.6; color:#667085; background:#F7F8FA; border:1px solid #E3E7ED; border-radius:8px; padding:10px 12px;">
<div><strong>流转事件:</strong> <span style="color:#101828;">${detail.leadName} (${detail.leadCompany})</span> <span style="color:#F79009;">${detail.fromStatus}</span> ➔ <span style="color:#12B76A; font-weight:600;">${detail.toStatus}</span></div>

查看文件

@@ -12,7 +12,7 @@
<span style="display:inline-block;width:8px;height:8px;border-radius:50%;background:#12B76A;"></span>
<strong style="font-size:14px;font-weight:600;color:#101828;">Webhook 自动化分发 & 推送集成联动</strong>
</div>
<span style="font-size:12px;background:#EAF1FF;color:#0B5CFF;padding:2px 8px;border-radius:10px;font-weight:500;">出海实时联动</span>
<span style="font-size:12px;background:#EAF1FF;color:#0B5CFF;padding:2px 8px;border-radius:10px;font-weight:500;">国际实时联动</span>
</div>
<div style="font-size:12px;line-height:1.6;color:#667085;background:#F7F8FA;border:1px solid #E3E7ED;border-radius:8px;padding:10px 12px;">
<div><strong>流转事件:</strong> <span style="color:#101828;">John Doe (Acme Global Corp)</span> <span style="color:#F79009;">new</span> ➔ <span style="color:#12B76A;font-weight:600;">hot</span></div>

查看文件

@@ -1,5 +1,5 @@
# ==============================================================================
# OmniCard AI (CRMmp) - BTP-20 自动化线索流转与出海 Webhook / 推送集成测试
# OmniCard AI (CRMmp) - BTP-20 自动化线索流转与国际 Webhook / 推送集成测试
# ==============================================================================
$session = "btp20"

查看文件

@@ -147,7 +147,7 @@
children: [
{
id: 11,
name: '全球出海业务部',
name: '全球拓展业务部',
parentId: 1,
orderNum: 1,
children: [

查看文件

@@ -20,7 +20,7 @@ Write-Host "`n>>> [Step 1/4] Navigate to http://localhost:5173/team/members ..."
agent-browser --session $session open "http://localhost:5173/team/members" --init-script $initScript
Start-Sleep -Seconds 3
$snapMembers = agent-browser --session $session snapshot
$hasDept = ($snapMembers -match "出海") -or ($snapMembers -match "部门") -or ($snapMembers -match "全球")
$hasDept = ($snapMembers -match "拓展") -or ($snapMembers -match "部门") -or ($snapMembers -match "全球")
$hasUser = ($snapMembers -match "Alex") -or ($snapMembers -match "Fatima") -or ($snapMembers -match "admin")
agent-browser --session $session screenshot $membersPng