优化
This commit is contained in:
@@ -48,6 +48,16 @@ describe('supplier formal pages', () => {
|
||||
expect(detailSource).toContain('<ApiErrorMeta')
|
||||
})
|
||||
|
||||
it('uses a fixed carrier-code selector for booking suppliers and shows the code in list and detail', () => {
|
||||
expect(formSource).toContain('v-if="form.category === \'BOOKING\'"')
|
||||
expect(formSource).toContain('v-for="option in carrierCodeOptions"')
|
||||
expect(formSource).not.toContain('v-model="form.carrierCode" maxlength')
|
||||
expect(formSource).toContain("if (category !== 'BOOKING') form.carrierCode = null")
|
||||
expect(formSource).toContain("return form.category === 'BOOKING' ? { ...normalized, carrierCode } : normalized")
|
||||
expect(source).toContain("label: '船司标准编码'")
|
||||
expect(detailSource).toContain("['船司标准编码', formatCarrierCode(supplier.value.carrierCode)]")
|
||||
})
|
||||
|
||||
it('reloads detail data when the reused route id changes and protects the newer request', () => {
|
||||
expect(detailSource).toContain("watch(supplierId, () => { void load() }, { immediate: true })")
|
||||
expect(detailSource).toContain('const requestedId = supplierId.value')
|
||||
|
||||
Reference in New Issue
Block a user