refactor(self-operated): simplify collection account monitor
This commit is contained in:
@@ -12,6 +12,15 @@ function overview(account: Task | null = source): Overview {
|
||||
}
|
||||
const options = { global: { stubs: { 'el-button': true } } }
|
||||
describe('single account collection monitor', () => {
|
||||
it('does not claim idle or an empty queue when the first status read fails', () => {
|
||||
const w = mount(CollectionAccountMonitor, { ...options, props: { overview: null, stale: true } })
|
||||
expect(w.text()).toContain('暂未取得账号状态')
|
||||
expect(w.text()).toContain('暂未取得安排')
|
||||
expect(w.text()).not.toContain('待机')
|
||||
expect(w.text()).not.toContain('保留最后一次')
|
||||
expect(w.text()).not.toContain('暂无其他待处理项')
|
||||
w.unmount()
|
||||
})
|
||||
it('shows account work once despite two waiting warehouses and keeps the phase counts', () => {
|
||||
const w = mount(CollectionAccountMonitor, { ...options, props: { overview: overview() } })
|
||||
expect(w.findAllComponents(CollectionTaskProgress)).toHaveLength(1)
|
||||
|
||||
Reference in New Issue
Block a user