From b785e0e429fc5ec5ac17e3f926fafe44d9d079f3 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 9 Jul 2026 17:07:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=20Debug=20EML=20=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/i18n/locales/en-US.ts | 1 + client/src/i18n/locales/th-TH.ts | 1 + client/src/i18n/locales/zh-CN.ts | 1 + client/src/layouts/ReservationAppShell.vue | 5 +++++ client/src/tests/i18nLocales.spec.ts | 1 + client/src/tests/reservationAppShell.spec.ts | 14 ++++++++++++++ client/src/tests/reservationRouter.spec.ts | 2 +- 7 files changed, 24 insertions(+), 1 deletion(-) diff --git a/client/src/i18n/locales/en-US.ts b/client/src/i18n/locales/en-US.ts index 60a6104..96287d2 100644 --- a/client/src/i18n/locales/en-US.ts +++ b/client/src/i18n/locales/en-US.ts @@ -16,6 +16,7 @@ export default { orderDetail: 'Order detail', taskDetail: 'Task detail', sourceMessageConversation: 'Email conversation', + debugEml: 'Debug EML', }, common: { loading: 'Loading', diff --git a/client/src/i18n/locales/th-TH.ts b/client/src/i18n/locales/th-TH.ts index c887052..593d8c7 100644 --- a/client/src/i18n/locales/th-TH.ts +++ b/client/src/i18n/locales/th-TH.ts @@ -16,6 +16,7 @@ export default { orderDetail: 'รายละเอียดออเดอร์', taskDetail: 'รายละเอียดงาน', sourceMessageConversation: 'เธรดอีเมล', + debugEml: 'Debug EML', }, common: { loading: 'กำลังโหลด', diff --git a/client/src/i18n/locales/zh-CN.ts b/client/src/i18n/locales/zh-CN.ts index 12e5963..f64fe58 100644 --- a/client/src/i18n/locales/zh-CN.ts +++ b/client/src/i18n/locales/zh-CN.ts @@ -16,6 +16,7 @@ export default { orderDetail: '订单详情', taskDetail: '任务详情', sourceMessageConversation: '邮件会话', + debugEml: 'Debug EML', }, common: { loading: '加载中', diff --git a/client/src/layouts/ReservationAppShell.vue b/client/src/layouts/ReservationAppShell.vue index c22b192..47fe110 100644 --- a/client/src/layouts/ReservationAppShell.vue +++ b/client/src/layouts/ReservationAppShell.vue @@ -117,6 +117,11 @@ const navItems = [ icon: 'pi pi-check-square', labelKey: 'nav.taskQueue', }, + { + to: '/debug/eml-superagent', + icon: 'pi pi-upload', + labelKey: 'nav.debugEml', + }, ] const pageTitle = computed(() => { diff --git a/client/src/tests/i18nLocales.spec.ts b/client/src/tests/i18nLocales.spec.ts index ce080c5..cc5aa69 100644 --- a/client/src/tests/i18nLocales.spec.ts +++ b/client/src/tests/i18nLocales.spec.ts @@ -15,6 +15,7 @@ describe('reservation i18n locales', () => { it('includes Thai labels for the P0 reservation navigation', () => { expect(thTH.nav.orders).toBe('รายการออเดอร์') expect(thTH.nav.taskQueue).toBe('คิวงาน') + expect(thTH.nav.debugEml).toBe('Debug EML') expect(thTH.taskList.viewConversation).toBe('ดูเธรดอีเมล') }) diff --git a/client/src/tests/reservationAppShell.spec.ts b/client/src/tests/reservationAppShell.spec.ts index 2aaec6c..8025442 100644 --- a/client/src/tests/reservationAppShell.spec.ts +++ b/client/src/tests/reservationAppShell.spec.ts @@ -40,6 +40,11 @@ async function mountShell() { component: { template: '
' }, meta: { titleKey: 'nav.taskQueue' }, }, + { + path: '/debug/eml-superagent', + component: { template: '
' }, + meta: { titleKey: 'debugEml.title' }, + }, ], }) await router.push('/reservation/orders') @@ -67,4 +72,13 @@ describe('ReservationAppShell', () => { await wrapper.findAll('button').find((button) => button.text() === 'EN')?.trigger('click') expect(wrapper.text()).toContain('Order list') }) + + it('shows the Debug EML navigation entry before menu management takes over permissions', async () => { + const wrapper = await mountShell() + + const debugLink = wrapper.find('a[href="/debug/eml-superagent"]') + + expect(debugLink.exists()).toBe(true) + expect(debugLink.text()).toContain('Debug EML') + }) }) diff --git a/client/src/tests/reservationRouter.spec.ts b/client/src/tests/reservationRouter.spec.ts index 8a34e17..14945c9 100644 --- a/client/src/tests/reservationRouter.spec.ts +++ b/client/src/tests/reservationRouter.spec.ts @@ -13,7 +13,7 @@ describe('reservation router', () => { ) }) - it('exposes the hidden Debug EML route without adding it to the business menu', () => { + it('exposes the Debug EML route', () => { expect(router.resolve('/debug/eml-superagent').name).toBe('debug-eml-superagent') }) })