This commit is contained in:
2026-08-19 16:45:51 +08:00
parent d1de19dc82
commit 65cd9ecefa
79 changed files with 3397 additions and 38 deletions
@@ -0,0 +1,31 @@
import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { describe, expect, it } from 'vitest'
const source = readFileSync(resolve(process.cwd(), 'src/modules/port-schedules/components/CarrierScheduleQueryPanel.vue'), 'utf8')
describe('CarrierScheduleQueryPanel', () => {
it('uses the existing relation filters and never creates or executes polling tasks', () => {
expect(source).toContain('listCarrierScheduleQueries({ page: 1, size: 200')
expect(source).toContain('oceanBookingId: props.oceanBookingId')
expect(source).toContain('containerBookingId: props.containerBookingId')
expect(source).not.toContain('createCarrierSchedule')
expect(source).not.toContain('attemptCarrierSchedule')
})
it('shows source, observation/update times, history, failures and expiry truthfully', () => {
expect(source).toContain('最新来源')
expect(source).toContain('观测时间')
expect(source).toContain('来源更新时间')
expect(source).toContain('任务更新时间')
expect(source).toContain('查询尝试')
expect(source).toContain('变更历史')
expect(source).toContain('query.lastErrorMessage')
expect(source).toContain("return '结果已过期'")
})
it('keeps the missing node-event contract explicit instead of fabricating data', () => {
expect(source).toContain('待接口提供独立节点事实')
expect(source).toContain('不会模拟节点或自动创建任务')
})
})