🐛 fix(frontend): 输入取件码时不再五位自动提交

This commit is contained in:
orion committed 2026-09-18 16:16:09 +08:00
1 parent 7c6119b0c9
commit f2461378ef
2 files changed
+11 -7

No files matched your search

+8
View File
@@ -16,3 +16,11 @@ test('retrieval detail uses accessible shared dialog and exposes entire long fil
const filename='FlClash-'+'long-'.repeat(25)+'android-arm64-v8a.apk';const html=await render(Detail,{visible:true,record:{filename,size:'51.58 MB',date:'2026/09/18 15:08:09',code:'ABCD2345',downloadUrl:'/share/download?code=ABCD2345'}})
assert.ok(html.includes('role="dialog"'));assert.ok(html.includes(filename));assert.ok(html.includes('aria-modal="true"'));assert.ok(html.includes('点击下载'))
})
test('retrieve form enables both complete legacy and current codes without truncating eight digits',async()=>{
const Form=(await server.ssrLoadModule('/src/components/common/RetrieveForm.vue')).default
for(const code of ['ABCDE','ABCD2345']){
const html=await render(Form,{modelValue:code,inputStatus:{readonly:false,loading:false}})
assert.ok(html.includes('maxlength="8"'));assert.ok(html.includes(`value="${code}"`));assert.ok(!/<button[^>]* disabled(?:=|>| )/.test(html))
}
const html=await render(Form,{modelValue:'ABC',inputStatus:{readonly:false,loading:false}});assert.ok(/<button[^>]* disabled(?:=|>| )/.test(html))
})