fix(前端): 代理IP共用弹窗改为精简口语文案
This commit is contained in:
@@ -81,6 +81,17 @@ test('密钥共用提示只走通知,不再常驻界面', () => {
|
||||
assert.ok(component.includes("warning.type !== 'proxy'"), 'LLM 密钥共用可接受,弹窗只放行代理 IP 类型')
|
||||
})
|
||||
|
||||
test('代理 IP 共用弹窗是精简口语文案,不搬运后端长口径', async () => {
|
||||
const { proxySharedToastText } = await import('../src/shared/utils/cost-guard-alert.ts')
|
||||
const text = proxySharedToastText({ type: 'proxy', moduleLabel: '代理设置', accounts: 3, threshold: 3, message: 'x' })
|
||||
|
||||
assert.match(text, /被 3 个账号共用/)
|
||||
assert.match(text, /密钥设置/)
|
||||
assert.ok(!text.includes('阈值'), '不应出现「阈值」这类技术词')
|
||||
assert.ok(!text.includes('归因'), '不应出现后端长口径的书面语')
|
||||
assert.ok(component.includes('proxySharedToastText'), '弹窗必须用前端精简文案,而不是后端 message 原文')
|
||||
})
|
||||
|
||||
test('全局挂载并在暂停时提供「继续任务」', () => {
|
||||
assert.ok(app.includes("import CostGuardAlert from '@/shared/components/CostGuardAlert.vue'"))
|
||||
assert.ok(app.includes('<CostGuardAlert />'), '组件没挂到 App.vue,异常时界面不会弹')
|
||||
|
||||
Reference in New Issue
Block a user