feat: govern knowledge assets and source citations

This commit is contained in:
key
2026-08-02 01:43:43 +08:00
parent cafb836cda
commit 699cc08050
144 changed files with 17205 additions and 453 deletions
+6 -2
View File
@@ -142,12 +142,16 @@ test('员工端 tabBar 继续保留四个固定入口', async () => {
assert.match(source, /pages\/user\/profile\/index/);
});
test('登录页按高保真原型保留品牌结构和紧凑验证码行', async () => {
test('登录页保留品牌结构并按开发开关控制验证码行', async () => {
const source = await pageSource('../src/pages/auth/login/index.vue');
assert.match(source, /手机号登录,立刻上手/);
assert.match(source, /<uni-icons[^>]+type="phone"/);
assert.match(source, /<uni-icons[^>]+type="locked"/);
assert.match(source, /v-if="smsVerificationEnabled" label="验证码"/);
assert.match(source, /const smsVerificationEnabled = !import\.meta\.env\.DEV/);
assert.match(source, /VITE_SMS_VERIFICATION_ENABLED === 'true'/);
assert.match(source, /rules: smsVerificationEnabled \? \[/);
assert.doesNotMatch(source, /class="logo-badge"/);
assert.doesNotMatch(source, /grid-template-columns:\s*1fr;[\s\S]*?\.code-button/);
});
@@ -176,7 +180,7 @@ test('登录前协议默认不勾选且协议未配置时禁止发送验证码
test('测试验证码提示必须由开发环境显式开关启用', async () => {
const source = await pageSource('../src/pages/auth/login/index.vue');
assert.match(source, /v-if="showDevSmsHint"/);
assert.match(source, /v-if="smsVerificationEnabled && showDevSmsHint"/);
assert.match(source, /import\.meta\.env\.VITE_DEV_SMS_HINT_VALUE/);
assert.match(source, /import\.meta\.env\.VITE_DEV_SMS_HINT_ENABLED === 'true'/);
assert.match(source, /\/\^\\d\{4,6\}\$\/\.test\(devSmsHintValue\)/);