优化
This commit is contained in:
@@ -3,6 +3,7 @@ import { readFileSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
|
||||
const source = readFileSync(resolve(process.cwd(), 'src/modules/loading-lists/pages/PreloadPlanDetailView.vue'), 'utf8')
|
||||
const detailSource = readFileSync(resolve(process.cwd(), 'src/modules/loading-lists/components/LoadingListDetailDrawer.vue'), 'utf8')
|
||||
|
||||
describe('PreloadPlanDetailView prototype contract', () => {
|
||||
it('is a formal desktop detail page wired to the shared header return action', () => {
|
||||
@@ -51,8 +52,18 @@ describe('PreloadPlanDetailView prototype contract', () => {
|
||||
it('is the formal container-number entry and does not imply that preload directly opens PDA', () => {
|
||||
expect(source).toContain("{ required: true, message: '请输入集装箱号'")
|
||||
expect(source).toContain("detail.value?.summary.containerNo ? '修改集装箱号 / 航次' : '录入集装箱号'")
|
||||
expect(source).toContain('预装清单不会直接开放 PDA')
|
||||
expect(source).toContain('订舱关联与放舱、预装确认后')
|
||||
expect(source).toContain('成功后由服务端按真实条件创建唯一 PDA 任务')
|
||||
expect(source).toContain('当前页面不会伪造 PDA 成功')
|
||||
})
|
||||
|
||||
it('uses a flat blocking note instead of repeated colored page alerts', () => {
|
||||
expect(source).not.toContain('<el-alert\n v-if="detail"')
|
||||
expect(detailSource).toContain('class="readiness-note"')
|
||||
expect(detailSource).toContain('role="status"')
|
||||
expect(detailSource).toContain("confirmationStatus !== 'CONFIRMED' && !preloadSummary.readiness.canConfirm")
|
||||
expect(detailSource).not.toContain('type="success" :closable="false" show-icon title="整份预装计划已确认"')
|
||||
expect(detailSource).toContain('<el-button type="primary" :loading="confirmSaving"')
|
||||
expect(detailSource).not.toContain('<el-button type="success" :loading="confirmSaving"')
|
||||
})
|
||||
|
||||
it('confirms the whole plan through readiness with stable idempotency and refreshes the detail', () => {
|
||||
|
||||
Reference in New Issue
Block a user