feat: 同步管理端、用户端与后端业务,并接通线上 Web 接口
补齐平台订阅、外部登录、CRM 同步与用户端页面;Nginx 转发用户端接口,登录页使用 Google 与 Apple 标志。 Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
@@ -85,7 +85,54 @@ test('3. nfc/devices locale 必须包含 menu.nfc.devices 与中英文案', () =
|
||||
assert.ok(content.includes('nfcDevices.request.fail'), '必须包含失败提示文案');
|
||||
assert.ok(content.includes('nfcDevices.status.active'), '必须包含状态文案');
|
||||
assert.ok(content.includes('nfcDevices.material.wood'), '必须包含材质文案');
|
||||
assert.ok(content.includes('nfcDevices.material.empty'), '必须包含材质空态文案');
|
||||
assert.ok(content.includes('nfcDevices.action.freeze'), '必须包含挂失文案');
|
||||
assert.ok(content.includes('nfcDevices.action.reset'), '必须包含重置文案');
|
||||
assert.ok(!/\bany\b/.test(content), 'locale 禁止使用 any');
|
||||
});
|
||||
|
||||
test('4. 材质列未知/空值显示空态,禁止默认 pvc;筛选与表单不预选 PVC', () => {
|
||||
const content = fs.readFileSync(devicesPagePath, 'utf-8');
|
||||
const localeContent = fs.readFileSync(devicesLocalePath, 'utf-8');
|
||||
|
||||
assert.ok(
|
||||
content.includes("t['nfcDevices.material.empty']") ||
|
||||
content.includes('t[`nfcDevices.material.empty`]'),
|
||||
'未知/缺失材质必须走 nfcDevices.material.empty'
|
||||
);
|
||||
assert.ok(
|
||||
!content.includes("isNFCMaterial(value) ? value : 'pvc'"),
|
||||
'材质列禁止把无法识别的值默认成 pvc'
|
||||
);
|
||||
assert.ok(
|
||||
!content.includes("? value : 'pvc'"),
|
||||
'禁止三元回退未知材质为 pvc'
|
||||
);
|
||||
assert.ok(
|
||||
!/field=["']material["'][\s\S]{0,400}initialValue=["']pvc["']/.test(content),
|
||||
'筛选 Form.Item material 禁止 initialValue=pvc'
|
||||
);
|
||||
assert.ok(
|
||||
!/field=["']material["'][\s\S]{0,400}defaultValue=["']pvc["']/.test(content),
|
||||
'筛选 Form.Item material 禁止 defaultValue=pvc'
|
||||
);
|
||||
assert.ok(
|
||||
!/material:\s*['"]pvc['"]/.test(content),
|
||||
'禁止在 filters/表单状态里预填 material: pvc'
|
||||
);
|
||||
assert.ok(
|
||||
!/defaultValue=["']pvc["']/.test(content) &&
|
||||
!/initialValue=["']pvc["']/.test(content),
|
||||
'页面禁止任何 pvc 预选初始值'
|
||||
);
|
||||
assert.ok(
|
||||
localeContent.includes("'nfcDevices.material.empty'"),
|
||||
'locale 必须定义材质空态 key'
|
||||
);
|
||||
for (const lang of ['en-US', 'zh-CN', 'ar-SA']) {
|
||||
assert.ok(
|
||||
localeContent.includes(`'${lang}'`),
|
||||
`locale 必须包含语言包: ${lang}`
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
在新工单中引用
屏蔽一个用户