新增 Debug EML 上传调试页面

This commit is contained in:
andy
2026-07-09 16:47:39 +08:00
parent 0727dfb8d0
commit 7100612442
14 changed files with 1269 additions and 0 deletions

View File

@@ -17,6 +17,26 @@ describe('reservation i18n locales', () => {
expect(thTH.nav.taskQueue).toBe('คิวงาน')
expect(thTH.taskList.viewConversation).toBe('ดูเธรดอีเมล')
})
it('covers Debug EML backend error codes in all locales', () => {
const expectedErrorCodes = [
'REQUEST_FIELD_REQUIRED',
'EML_FILE_REQUIRED',
'EML_FILE_TOO_LARGE',
'INVALID_FILE_TYPE',
'DEBUG_UPLOAD_KEY_INVALID',
'EML_PARSE_FAILED',
'OSS_UPLOAD_FAILED',
'SUPERAGENT_OPEN_API_FAILED',
'DEBUG_EML_RUN_FAILED',
] satisfies Array<keyof typeof zhCN.debugEml.errors>
for (const locale of [zhCN, enUS, thTH]) {
for (const errorCode of expectedErrorCodes) {
expect(locale.debugEml.errors[errorCode]).toBeTruthy()
}
}
})
})
function collectKeyPaths(value: unknown, prefix = ''): string[] {