优化
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import ElementPlus, { ElMessageBox } from 'element-plus'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
import { createPinia, setActivePinia } from 'pinia'
|
||||
import { flushPromises, mount } from '@vue/test-utils'
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
@@ -59,6 +61,17 @@ describe('UnifiedOrderWorkflowPanel preload editor', () => {
|
||||
vi.mocked(voidEvidence).mockReset()
|
||||
})
|
||||
|
||||
it('keeps workflow business actions as outlined semantic buttons with icons', () => {
|
||||
const source = readFileSync(resolve(process.cwd(), 'src/modules/unified-orders/workflows/components/UnifiedOrderWorkflowPanel.vue'), 'utf8')
|
||||
expect(source).toContain('size="small" plain type="primary"')
|
||||
expect(source).toContain('size="small" plain type="danger"')
|
||||
expect(source).toContain('<Pencil :size="14" />编辑')
|
||||
expect(source).toContain('<Eye :size="14" />查看')
|
||||
expect(source).toContain('<Trash2 :size="14" />作废')
|
||||
expect(source).not.toContain('<el-button link type="primary" :disabled="!canSplit')
|
||||
expect(source).not.toContain('<el-button link type="danger" :disabled="!canSplit')
|
||||
})
|
||||
|
||||
it('renders the formal preload table and keeps the operation column first', async () => {
|
||||
const wrapper = mountPanel(['firstleg:inbound:preload-view', 'firstleg:inbound:split'])
|
||||
await flushPromises()
|
||||
|
||||
Reference in New Issue
Block a user