feat: 自动隐藏被覆盖的打包历史
This commit is contained in:
@@ -159,6 +159,18 @@ describe('HistoryView.vue', () => {
|
||||
expect(wrapper.text()).not.toContain('日志')
|
||||
})
|
||||
|
||||
it('管理员可显示已覆盖记录', async () => {
|
||||
const wrapper = mountHistory(true)
|
||||
await flushPromises()
|
||||
|
||||
const toggle = wrapper.find('.superseded-toggle input')
|
||||
expect(toggle.exists()).toBe(true)
|
||||
await toggle.setValue(true)
|
||||
await flushPromises()
|
||||
|
||||
expect(fetch).toHaveBeenLastCalledWith('/api/tasks?limit=100&include_superseded=true', expect.any(Object))
|
||||
})
|
||||
|
||||
it('空列表显示提示', async () => {
|
||||
fetch.mockResolvedValue({ json: () => Promise.resolve([]) })
|
||||
const router = createMockRouter()
|
||||
|
||||
Reference in New Issue
Block a user