显示 Debug EML 菜单入口

This commit is contained in:
andy
2026-07-09 17:07:33 +08:00
parent 7100612442
commit b785e0e429
7 changed files with 24 additions and 1 deletions

View File

@@ -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('ดูเธรดอีเมล')
})

View File

@@ -40,6 +40,11 @@ async function mountShell() {
component: { template: '<div />' },
meta: { titleKey: 'nav.taskQueue' },
},
{
path: '/debug/eml-superagent',
component: { template: '<div />' },
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')
})
})

View File

@@ -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')
})
})