fix: harden domestic container forms
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
|
||||
const source = readFileSync(resolve(process.cwd(), 'src/modules/domestic-containers/pages/DomesticContainerInventoryDetailView.vue'), 'utf8')
|
||||
|
||||
describe('DomesticContainerInventoryDetailView', () => {
|
||||
it('does not invent an action column for immutable transaction history', () => {
|
||||
expect(source).not.toContain("label: '操作'")
|
||||
expect(source).toContain('进销存交易记录')
|
||||
})
|
||||
it('surfaces loading and API diagnostic errors and supports retry', () => {
|
||||
expect(source).toContain('整柜库存详情加载失败')
|
||||
expect(source).toContain('@retry="load"')
|
||||
expect(source).toContain('<ApiErrorMeta :details="error" />')
|
||||
expect(source).toContain('v-loading="loading"')
|
||||
})
|
||||
it('uses a four-column desktop field grid and preserves long business text', () => {
|
||||
expect(source).toContain('grid-template-columns: repeat(4, minmax(0, 1fr))')
|
||||
expect(source).toContain('overflow-wrap: anywhere')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user