实现 Booking Excel 预处理接入 SuperAgent

This commit is contained in:
andy committed 2026-07-20 00:32:01 +07:00
1 parent b7b04cf1ac
commit d1955f5097
45 files changed
+2955 -10

No files matched your search

+16
View File
@@ -84,6 +84,14 @@ describe('debugEmlService', () => {
html_sanitize_required: true,
html_render_mode: 'SANITIZED_HTML',
agentbus_like_payload: { schema_version: 'debug-eml-upload-v1' },
attachment_extractions: [
{
file_type: 'BOOKING_UPDATE',
month_filter: {
selected_months: ['2026-05'],
},
},
],
superagent_session_id: 'session-1',
superagent_run_id: 'run-1',
superagent_raw_answer: '{"ok":true}',
@@ -102,6 +110,14 @@ describe('debugEmlService', () => {
})
expect(fetchMock).toHaveBeenCalledTimes(1)
expect(result.attachment_extractions).toEqual([
{
file_type: 'BOOKING_UPDATE',
month_filter: {
selected_months: ['2026-05'],
},
},
])
const [url, init] = fetchMock.mock.calls[0]!
expect(url).toBe('/api/system/debug/eml-superagent-runs')
expect(init).toMatchObject({
+11
View File
@@ -63,6 +63,14 @@ function createResult() {
original_message_id: '<original@example.test>',
},
},
attachment_extractions: [
{
file_type: 'BOOKING_UPDATE',
month_filter: {
selected_months: ['2026-05'],
},
},
],
superagent_session_id: 'session-1',
superagent_run_id: 'run-1',
superagent_raw_answer: '{"ok":true}',
@@ -176,6 +184,9 @@ describe('DebugEmlSuperAgentRunView', () => {
expect(wrapper.find('.debug-eml-html-preview').html()).not.toContain('<script>')
expect(wrapper.find('.debug-eml-html-preview').html()).not.toContain('onclick')
expect(wrapper.text()).toContain('booking.eml')
expect(wrapper.text()).toContain('Booking Excel 附件预处理')
expect(wrapper.text()).toContain('"file_type": "BOOKING_UPDATE"')
expect(wrapper.text()).toContain('"selected_months"')
expect(wrapper.text()).toContain('"schema_version": "debug-eml-upload-v1"')
expect(wrapper.text()).toContain('"ok": true')
})