优化
This commit is contained in:
@@ -4,6 +4,7 @@ import { resolve } from 'node:path'
|
||||
|
||||
const source = readFileSync(resolve(process.cwd(), 'src/modules/loading-lists/components/LoadingListsView.vue'), 'utf8')
|
||||
const detailSource = readFileSync(resolve(process.cwd(), 'src/modules/loading-lists/components/LoadingListDetailDrawer.vue'), 'utf8')
|
||||
const preloadDetailSource = readFileSync(resolve(process.cwd(), 'src/modules/loading-lists/pages/PreloadPlanDetailView.vue'), 'utf8')
|
||||
|
||||
describe('LoadingListsView', () => {
|
||||
it('keeps the operation column first and fixed left in both lists', () => {
|
||||
@@ -24,13 +25,31 @@ describe('LoadingListsView', () => {
|
||||
expect(source).toContain('MISSING_WAREHOUSE_CONTEXT')
|
||||
})
|
||||
|
||||
it('uses the shared query, table, drawer, dialog and error components', () => {
|
||||
it('uses the shared query, table, dialog and error components without a detail drawer', () => {
|
||||
expect(source).toContain('QueryToolbar')
|
||||
expect(source).toContain('DataTable')
|
||||
expect(source).toContain('AppDialog')
|
||||
expect(source).toContain('LoadErrorState')
|
||||
expect(source).toContain('ApiErrorMeta')
|
||||
expect(detailSource).toContain('AppDrawer')
|
||||
expect(detailSource).not.toContain('AppDrawer')
|
||||
expect(detailSource).toContain('ContainerFeesPanel')
|
||||
})
|
||||
|
||||
it('opens preload detail as a route and confirmed detail inline on the list page', () => {
|
||||
expect(source).toContain("name: 'preload-plan-detail'")
|
||||
expect(source).toContain('v-if="!isPreload && (detailLoading || detailError || detail)"')
|
||||
expect(source).toContain('class="confirmed-inline-detail surface-panel"')
|
||||
expect(preloadDetailSource).toContain('返回列表')
|
||||
expect(preloadDetailSource).toContain('router.back()')
|
||||
})
|
||||
|
||||
it('keeps the real transport edit contract in a 620px centered modal', () => {
|
||||
expect(source).toContain('class="loading-transport-dialog"')
|
||||
expect(source).toContain('width="min(620px, calc(100vw - 28px))"')
|
||||
expect(preloadDetailSource).toContain('width="min(620px, calc(100vw - 28px))"')
|
||||
expect(source).not.toContain('备注信息(仅自己可见)')
|
||||
expect(source).not.toContain('备注信息(客户可见)')
|
||||
expect(source).not.toContain('备注信息(仓库可见)')
|
||||
})
|
||||
|
||||
it('only exposes transport editing for LOADING preload details', () => {
|
||||
|
||||
Reference in New Issue
Block a user