修正前端全量回归夹具
支持多行模块导入的安全设置测试夹具,并同步客户端协议 HTML 分行文案断言。
This commit is contained in:
parent
2f83a22dd2
commit
d2cb04a85b
@ -6,7 +6,7 @@ import { computed, reactive, ref } from './vue.mjs'
|
|||||||
|
|
||||||
const source = readFileSync(new URL('../../frontend/src/views/components/SecuritySettings/SecuritySettings.js', import.meta.url), 'utf8')
|
const source = readFileSync(new URL('../../frontend/src/views/components/SecuritySettings/SecuritySettings.js', import.meta.url), 'utf8')
|
||||||
const createPage = compileFunction(
|
const createPage = compileFunction(
|
||||||
source.replace(/^import .*$/gm, '').replace('export function usePage', 'function usePage') + '\nreturn usePage()',
|
source.replace(/^import[\s\S]*?from .*$/gm, '').replace('export function usePage', 'function usePage') + '\nreturn usePage()',
|
||||||
['computed', 'reactive', 'ref', 'watch', 'onMounted', 'onUnmounted', 'http', 'useGlobalStatusStore', 'webAuthnSupported', 'lang', 'ElNotification', 'TextEncoder', 'location', 'setInterval', 'clearInterval']
|
['computed', 'reactive', 'ref', 'watch', 'onMounted', 'onUnmounted', 'http', 'useGlobalStatusStore', 'webAuthnSupported', 'lang', 'ElNotification', 'TextEncoder', 'location', 'setInterval', 'clearInterval']
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,8 @@ test('邮件客户端文案明确区分专属授权码与完整邮箱登录', ()
|
|||||||
const template = read('vue')
|
const template = read('vue')
|
||||||
assert.match(template, /客户端专属授权码/)
|
assert.match(template, /客户端专属授权码/)
|
||||||
assert.match(template, /请使用完整邮箱地址登录,密码统一使用上方专属授权码/)
|
assert.match(template, /请使用完整邮箱地址登录,密码统一使用上方专属授权码/)
|
||||||
assert.match(template, /IMAP 收信服务/)
|
assert.match(template, /IMAP[\s\S]*?\u6536\u4fe1\u670d\u52a1/)
|
||||||
assert.match(template, /POP3 收信服务/)
|
assert.match(template, /POP3[\s\S]*?\u6536\u4fe1\u670d\u52a1/)
|
||||||
assert.match(template, /SMTP 发信服务/)
|
assert.match(template, /SMTP[\s\S]*?\u53d1\u4fe1\u670d\u52a1/)
|
||||||
assert.doesNotMatch(template, /第三方邮件|&#x[0-9a-f]+;/i)
|
assert.doesNotMatch(template, /第三方邮件|&#x[0-9a-f]+;/i)
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user