优化
This commit is contained in:
@@ -7,7 +7,7 @@ describe('OceanBookingsView prototype field matrix', () => {
|
||||
const source = readFileSync(resolve(process.cwd(), 'src/modules/ocean-bookings/pages/OceanBookingsView.vue'), 'utf8')
|
||||
|
||||
it('keeps the frozen business field sequence after the first action column', () => {
|
||||
const fields = ['bookingNo', 'customerName', 'carrierName', 'bookingAgent', 'vesselName', 'pol', 'pod', 'etd', 'eta', 'status', 'updatedAt']
|
||||
const fields = ['bookingNo', 'customerName', 'billOfLadingNo', 'carrierName', 'bookingAgent', 'vesselName', 'pol', 'pod', 'etd', 'eta', 'status', 'updatedAt']
|
||||
let previous = source.indexOf("key: 'actions'")
|
||||
for (const field of fields) {
|
||||
const current = source.indexOf(`prop: '${field}'`, previous + 1)
|
||||
@@ -17,6 +17,7 @@ describe('OceanBookingsView prototype field matrix', () => {
|
||||
})
|
||||
|
||||
it('formats schedule and update timestamps without adding print actions', () => {
|
||||
expect(source).toContain("prop: 'billOfLadingNo', label: '提单号'")
|
||||
expect(source).toContain('<template #updatedAt="{ row }">{{ formatDateTime(row.updatedAt) }}</template>')
|
||||
expect(source).toContain('<template #etd="{ row }">{{ formatDateTime(row.etd) }}</template>')
|
||||
expect(source).not.toContain('打印')
|
||||
|
||||
Reference in New Issue
Block a user