diff --git a/src/views/RetrievewFileView.vue b/src/views/RetrievewFileView.vue index 3b4e840..19b65ca 100644 --- a/src/views/RetrievewFileView.vue +++ b/src/views/RetrievewFileView.vue @@ -56,7 +56,7 @@ diff --git a/tests/transferUi.integration.test.mjs b/tests/transferUi.integration.test.mjs index 3958436..df19646 100644 --- a/tests/transferUi.integration.test.mjs +++ b/tests/transferUi.integration.test.mjs @@ -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(!/]* disabled(?:=|>| )/.test(html)) + } + const html=await render(Form,{modelValue:'ABC',inputStatus:{readonly:false,loading:false}});assert.ok(/]* disabled(?:=|>| )/.test(html)) +})