fix: 完整显示打包历史信息
This commit is contained in:
@@ -7,7 +7,7 @@ global.fetch = vi.fn()
|
||||
window.open = vi.fn()
|
||||
|
||||
const mockTasks = [
|
||||
{ id: '1', app_name: 'App1', build_type: 'Ad_Hoc', scheme_name: 'sch1', status: 'completed', created_at: '2024-01-01T10:00:00', dsym_path: '/path/dsym', oss_url: 'https://oss.com/app1.ipa', qr_code_path: '/path/qr.png' },
|
||||
{ id: '1', app_name: 'App1', build_type: 'Ad_Hoc', scheme_name: 'readoor31OtherPayLongSchemeName', status: 'completed', created_at: '2024-01-01T10:00:00', dsym_path: '/path/dsym', oss_url: 'https://oss.com/app1.ipa', qr_code_path: '/path/qr.png' },
|
||||
{ id: '2', app_name: 'App2', build_type: 'App_Store', scheme_name: 'sch2', status: 'failed', created_at: '2024-01-02T10:00:00', error_message: '构建失败', error_category: 'compilation' },
|
||||
{ id: '3', app_name: 'App3', build_type: 'Ad_Hoc', scheme_name: 'sch1', status: 'pending', created_at: '2024-01-03T10:00:00' },
|
||||
]
|
||||
@@ -148,6 +148,18 @@ describe('HistoryView.vue', () => {
|
||||
expect(wrapper.vm.statusText('failed')).toBe('失败')
|
||||
})
|
||||
|
||||
it('时间仅显示月和日,Scheme 与状态单元格允许完整换行', async () => {
|
||||
const router = createMockRouter()
|
||||
const wrapper = mount(HistoryView, {
|
||||
global: { plugins: [router] },
|
||||
})
|
||||
await flushPromises()
|
||||
|
||||
expect(wrapper.vm.formatTime('2024-07-20T10:00:00')).toBe('7/20')
|
||||
expect(wrapper.find('.scheme-cell').text()).toBe('readoor31OtherPayLongSchemeName')
|
||||
expect(wrapper.find('.status-cell').text()).toContain('已完成')
|
||||
})
|
||||
|
||||
it('点击查看日志跳转', async () => {
|
||||
const router = createMockRouter()
|
||||
router.push = vi.fn()
|
||||
|
||||
Reference in New Issue
Block a user