显示 Debug EML 菜单入口
This commit is contained in:
@@ -16,6 +16,7 @@ export default {
|
|||||||
orderDetail: 'Order detail',
|
orderDetail: 'Order detail',
|
||||||
taskDetail: 'Task detail',
|
taskDetail: 'Task detail',
|
||||||
sourceMessageConversation: 'Email conversation',
|
sourceMessageConversation: 'Email conversation',
|
||||||
|
debugEml: 'Debug EML',
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
loading: 'Loading',
|
loading: 'Loading',
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export default {
|
|||||||
orderDetail: 'รายละเอียดออเดอร์',
|
orderDetail: 'รายละเอียดออเดอร์',
|
||||||
taskDetail: 'รายละเอียดงาน',
|
taskDetail: 'รายละเอียดงาน',
|
||||||
sourceMessageConversation: 'เธรดอีเมล',
|
sourceMessageConversation: 'เธรดอีเมล',
|
||||||
|
debugEml: 'Debug EML',
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
loading: 'กำลังโหลด',
|
loading: 'กำลังโหลด',
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export default {
|
|||||||
orderDetail: '订单详情',
|
orderDetail: '订单详情',
|
||||||
taskDetail: '任务详情',
|
taskDetail: '任务详情',
|
||||||
sourceMessageConversation: '邮件会话',
|
sourceMessageConversation: '邮件会话',
|
||||||
|
debugEml: 'Debug EML',
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
loading: '加载中',
|
loading: '加载中',
|
||||||
|
|||||||
@@ -117,6 +117,11 @@ const navItems = [
|
|||||||
icon: 'pi pi-check-square',
|
icon: 'pi pi-check-square',
|
||||||
labelKey: 'nav.taskQueue',
|
labelKey: 'nav.taskQueue',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
to: '/debug/eml-superagent',
|
||||||
|
icon: 'pi pi-upload',
|
||||||
|
labelKey: 'nav.debugEml',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const pageTitle = computed(() => {
|
const pageTitle = computed(() => {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('reservation i18n locales', () => {
|
|||||||
it('includes Thai labels for the P0 reservation navigation', () => {
|
it('includes Thai labels for the P0 reservation navigation', () => {
|
||||||
expect(thTH.nav.orders).toBe('รายการออเดอร์')
|
expect(thTH.nav.orders).toBe('รายการออเดอร์')
|
||||||
expect(thTH.nav.taskQueue).toBe('คิวงาน')
|
expect(thTH.nav.taskQueue).toBe('คิวงาน')
|
||||||
|
expect(thTH.nav.debugEml).toBe('Debug EML')
|
||||||
expect(thTH.taskList.viewConversation).toBe('ดูเธรดอีเมล')
|
expect(thTH.taskList.viewConversation).toBe('ดูเธรดอีเมล')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ async function mountShell() {
|
|||||||
component: { template: '<div />' },
|
component: { template: '<div />' },
|
||||||
meta: { titleKey: 'nav.taskQueue' },
|
meta: { titleKey: 'nav.taskQueue' },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/debug/eml-superagent',
|
||||||
|
component: { template: '<div />' },
|
||||||
|
meta: { titleKey: 'debugEml.title' },
|
||||||
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
await router.push('/reservation/orders')
|
await router.push('/reservation/orders')
|
||||||
@@ -67,4 +72,13 @@ describe('ReservationAppShell', () => {
|
|||||||
await wrapper.findAll('button').find((button) => button.text() === 'EN')?.trigger('click')
|
await wrapper.findAll('button').find((button) => button.text() === 'EN')?.trigger('click')
|
||||||
expect(wrapper.text()).toContain('Order list')
|
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')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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')
|
expect(router.resolve('/debug/eml-superagent').name).toBe('debug-eml-superagent')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user