From 2460278cd98e5567f9af3730d37e416eedadadfb Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Thu, 10 Sep 2026 14:14:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/OceanBookingLinkDialog.test.ts | 60 +++++++++ .../components/OceanBookingLinkDialog.vue | 114 ++++++++++++++++++ ...nerDetailView.emptyReturn.behavior.test.ts | 35 +++++- .../pages/ContainerDetailView.test.ts | 4 +- .../pages/ContainerDetailView.vue | 5 +- .../pages/ContainersView.test.ts | 77 ++---------- .../pages/ContainersView.vue | 101 ++-------------- 7 files changed, 228 insertions(+), 168 deletions(-) create mode 100644 src/modules/container-loading/components/OceanBookingLinkDialog.test.ts create mode 100644 src/modules/container-loading/components/OceanBookingLinkDialog.vue diff --git a/src/modules/container-loading/components/OceanBookingLinkDialog.test.ts b/src/modules/container-loading/components/OceanBookingLinkDialog.test.ts new file mode 100644 index 00000000..2583303f --- /dev/null +++ b/src/modules/container-loading/components/OceanBookingLinkDialog.test.ts @@ -0,0 +1,60 @@ +import ElementPlus from 'element-plus' +import { flushPromises, mount } from '@vue/test-utils' +import { beforeEach, describe, expect, it, vi } from 'vitest' +import { listOceanBookingLinkCandidates } from '@/modules/ocean-bookings' +import { linkContainerOceanBooking } from '../api/platformContainerLoading' +import type { ContainerBookingResource } from '../types' +import OceanBookingLinkDialog from './OceanBookingLinkDialog.vue' + +vi.mock('@/modules/ocean-bookings', () => ({ listOceanBookingLinkCandidates: vi.fn() })) +vi.mock('../api/platformContainerLoading', () => ({ linkContainerOceanBooking: vi.fn() })) + +const container = { + id: '9001', cabinetNo: 'CAB-1', bookingNo: 'CB-1', containerNo: null, planId: '7001', planStatus: 'EDITING', + sourceType: 'SIMULATION', warehouseId: '8', warehouseName: '义乌仓', channelCode: 'ZBYHK', channelName: '美森正班', + oceanBookingId: null, billOfLadingNo: null, vesselName: null, voyageNo: null, containerType: '40HC', + shippingCompanyId: null, shippingCompanyName: null, departurePortCode: null, departurePortName: null, + destinationPortCode: null, destinationPortName: null, destinationWarehouseCode: null, destinationWarehouseName: null, + capacityCbm: 76, maxWeightKg: 28000, terminalTruckingCompanyId: null, terminalTruckingCompany: null, + loadingAt: null, estimatedSailingAt: null, actualSailingAt: null, estimatedPortArrivalAt: null, + actualPortArrivalAt: null, estimatedWarehouseArrivalAt: null, actualWarehouseArrivalAt: null, version: 7, +} satisfies ContainerBookingResource + +const candidate = { + oceanBookingId: '101', bookingNo: 'OB-101', requirementId: '202', containerType: '40HC', capacityCbm: 76, + maxWeightKg: 28000, requiredQuantity: 2, allocatedQuantity: 1, remainingQuantity: 1, + customerName: '测试客户', warehouseName: '义乌仓', channelName: '美森正班', +} + +describe('OceanBookingLinkDialog', () => { + beforeEach(() => { + vi.mocked(listOceanBookingLinkCandidates).mockReset().mockResolvedValue({ records: [candidate], page: 1, size: 200, total: 1, pages: 1 }) + vi.mocked(linkContainerOceanBooking).mockReset().mockResolvedValue({ ...container, oceanBookingId: '101', oceanBookingRequirementId: '202', version: 8 } as never) + }) + + it('loads matching released-booking requirements when opened', async () => { + const wrapper = mount(OceanBookingLinkDialog, { props: { modelValue: true, container }, global: { plugins: [ElementPlus] } }) + await flushPromises() + expect(listOceanBookingLinkCandidates).toHaveBeenCalledExactlyOnceWith({ warehouseId: '8', channelCode: 'ZBYHK', containerType: '40HC', page: 1, size: 200 }) + expect((wrapper.vm as unknown as { candidates: Array<{ label: string }> }).candidates[0]?.label).toContain('OB-101 · 40HC × 1') + wrapper.unmount() + }) + + it.each([ + [' mscu1234567 ', 'MSCU1234567'], + ['', null], + ])('normalizes and submits the optional real container number %#', async (input, expected) => { + const wrapper = mount(OceanBookingLinkDialog, { props: { modelValue: true, container }, global: { plugins: [ElementPlus] } }) + await flushPromises() + const vm = wrapper.vm as unknown as { candidateKey: string; containerNo: string; save: () => Promise } + vm.candidateKey = '101:202' + vm.containerNo = input + await vm.save() + expect(linkContainerOceanBooking).toHaveBeenCalledExactlyOnceWith('9001', { + oceanBookingId: '101', requirementId: '202', containerNo: expected, expectedVersion: 7, + }) + expect(wrapper.emitted('update:modelValue')?.at(-1)).toEqual([false]) + expect(wrapper.emitted('linked')).toHaveLength(1) + wrapper.unmount() + }) +}) diff --git a/src/modules/container-loading/components/OceanBookingLinkDialog.vue b/src/modules/container-loading/components/OceanBookingLinkDialog.vue new file mode 100644 index 00000000..f47a921e --- /dev/null +++ b/src/modules/container-loading/components/OceanBookingLinkDialog.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/src/modules/container-loading/pages/ContainerDetailView.emptyReturn.behavior.test.ts b/src/modules/container-loading/pages/ContainerDetailView.emptyReturn.behavior.test.ts index e24d513c..c6293ed9 100644 --- a/src/modules/container-loading/pages/ContainerDetailView.emptyReturn.behavior.test.ts +++ b/src/modules/container-loading/pages/ContainerDetailView.emptyReturn.behavior.test.ts @@ -3,7 +3,8 @@ import { createPinia } from 'pinia' import { enableAutoUnmount, flushPromises, mount } from '@vue/test-utils' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import ContainerDetailView from './ContainerDetailView.vue' -import { getContainer, getContainerOverview } from '../api/platformContainerLoading' +import { getContainer, getContainerOverview, linkContainerOceanBooking } from '../api/platformContainerLoading' +import { listOceanBookingLinkCandidates } from '@/modules/ocean-bookings' import { recordTerminalDrayageEmptyReturn } from '../api/terminalDrayages' import { getConfirmedLoadingList, getPreloadPlan } from '@/modules/loading-lists' import DomesticContainerDetailView from './DomesticContainerDetailView.vue' @@ -13,10 +14,11 @@ const routeState = vi.hoisted(() => ({ params: { containerId: '9001' }, query: { const routerPush = vi.hoisted(() => vi.fn()) vi.mock('@/core/access/accessPreview', () => ({ useAccessPreviewStore: () => ({ can: canAccess }) })) vi.mock('vue-router', () => ({ useRoute: () => routeState, useRouter: () => ({ push: routerPush }) })) -vi.mock('@/modules/loading-lists', () => ({ ContainerFeesPanel: { template: '
' }, LoadingListDetailDrawer: { name: 'LoadingListDetailDrawer', props: ['detail', 'error', 'loading'], template: '
{{ detail?.planNo }}
' }, getConfirmedLoadingList: vi.fn(), getPreloadPlan: vi.fn() })) +vi.mock('@/modules/loading-lists', () => ({ ContainerFeesPanel: { template: '
' }, LoadingListDetailDrawer: { name: 'LoadingListDetailDrawer', props: ['detail', 'error', 'loading'], template: '
{{ detail?.planNo }}
' }, PalletLabelPrintDialog: { template: '
' }, getConfirmedLoadingList: vi.fn(), getPreloadPlan: vi.fn() })) +vi.mock('@/modules/ocean-bookings', () => ({ listOceanBookingLinkCandidates: vi.fn() })) vi.mock('@/modules/outbound-dispatch', () => ({ confirmContainerOutboundDispatch: vi.fn(), getContainerOutboundDispatch: vi.fn() })) vi.mock('@/modules/port-schedules', () => ({ CarrierScheduleQueryPanel: { template: '
' } })) -vi.mock('../api/platformContainerLoading', () => ({ getContainer: vi.fn(), getContainerOverview: vi.fn(), cancelContainerException: vi.fn(), completeContainerClearance: vi.fn(), downloadContainerClearance: vi.fn(), downloadContainerDocument: vi.fn(), getContainerClearance: vi.fn(), markContainerException: vi.fn(), uploadContainerClearance: vi.fn(), uploadContainerDocument: vi.fn(), updateContainerPickupCode: vi.fn() })) +vi.mock('../api/platformContainerLoading', () => ({ getContainer: vi.fn(), getContainerOverview: vi.fn(), linkContainerOceanBooking: vi.fn(), cancelContainerException: vi.fn(), completeContainerClearance: vi.fn(), downloadContainerClearance: vi.fn(), downloadContainerDocument: vi.fn(), getContainerClearance: vi.fn(), markContainerException: vi.fn(), uploadContainerClearance: vi.fn(), uploadContainerDocument: vi.fn(), updateContainerPickupCode: vi.fn() })) vi.mock('../api/terminalDrayages', () => ({ recordTerminalDrayageEmptyReturn: vi.fn() })) const base = { id: '9001', cabinetNo: 'CB-1', containerNo: 'MSCU-1', planNo: 'LP-1', planStatus: 'COMPLETED', warehouseName: '义乌仓', destinationWarehouseCode: 'LAX01', destinationWarehouseName: '洛杉矶接柜仓', workbenchStage: 'UNLOADED', statusSummary: { terminalDrayageStatus: 'UNLOADED' }, allowedActions: ['RECORD_EMPTY_RETURN'], terminalDrayage: { containerBookingId: '9001', status: 'UNLOADED', version: 3, fleetSupplierId: '501', fleetSupplierName: '港运车队', pickupAppointmentAt: '2026-09-07T08:00:00', actualPickupAt: '2026-09-07T09:00:00', estimatedEmptyReturnAt: '2026-09-10T10:00:00', actualEmptyReturnAt: null, unloadingCompletedAt: '2026-09-07T10:00:00', emptyReturnWarning: { status: 'PENDING', deadlineAt: '2026-09-10T10:00:00', overdueHours: 0, overdueDays: 0 }, allowedActions: ['RECORD_EMPTY_RETURN'], updatedAt: '2026-09-09T10:00:00' }, actualFacts: { unloadingCompletedAt: '2026-09-07T10:00:00' } } @@ -86,7 +88,7 @@ describe('ContainerDetailView empty return', () => { }) describe('domestic container loading list and booking link', () => { - const domestic = { ...base, containerNo: null, warehouseId: '8', sourceType: 'SIMULATION', oceanBookingId: null, planId: '7001', planStatus: 'EDITING', version: 1, allowedActions: ['EDIT_CONTAINER'], terminalDrayage: null } + const domestic = { ...base, containerNo: null, warehouseId: '8', channelCode: 'ZBYHK', sourceType: 'SIMULATION', oceanBookingId: null, planId: '7001', planStatus: 'EDITING', version: 1, allowedActions: ['EDIT_CONTAINER'], terminalDrayage: null } const loadingDetail = { planNo: 'LP-1', items: [] } beforeEach(() => { @@ -97,6 +99,8 @@ describe('domestic container loading list and booking link', () => { vi.mocked(getContainerOverview).mockReset().mockResolvedValue({ ...overview, loadingPlanId: '7001' } as never) vi.mocked(getPreloadPlan).mockReset().mockResolvedValue(loadingDetail as never) vi.mocked(getConfirmedLoadingList).mockReset().mockResolvedValue(loadingDetail as never) + vi.mocked(listOceanBookingLinkCandidates).mockReset().mockResolvedValue({ records: [], page: 1, size: 200, total: 0, pages: 0 }) + vi.mocked(linkContainerOceanBooking).mockReset() }) async function mountDomestic() { @@ -168,7 +172,24 @@ describe('domestic container loading list and booking link', () => { const link = wrapper.findAll('button').find((button) => button.text() === '关联已放舱订舱')! expect(link).toBeDefined() await link.trigger('click') - expect(routerPush).toHaveBeenCalledExactlyOnceWith({ name: 'domestic-container-workbench', query: { linkContainerId: '9001' } }) + await flushPromises() + expect(routerPush).not.toHaveBeenCalled() + expect(wrapper.findComponent({ name: 'OceanBookingLinkDialog' }).props('modelValue')).toBe(true) + }) + + it('refreshes the routed detail after the shared link dialog succeeds', async () => { + const linked = { ...domestic, oceanBookingId: '101', billOfLadingNo: 'BL-101', version: 2 } + vi.mocked(getContainer).mockResolvedValueOnce(domestic as never).mockResolvedValueOnce(linked as never) + const wrapper = await mountDomestic() + await wrapper.findAll('button').find((button) => button.text() === '关联已放舱订舱')!.trigger('click') + await flushPromises() + const dialog = wrapper.findComponent({ name: 'OceanBookingLinkDialog' }) + expect(dialog.props('modelValue')).toBe(true) + dialog.vm.$emit('linked', linked) + await flushPromises() + expect(getContainer).toHaveBeenCalledTimes(2) + expect(wrapper.text()).toContain('BL-101') + expect(wrapper.findAll('button').some((button) => button.text() === '关联已放舱订舱')).toBe(false) }) it('keeps the same cabinet link before and after an inbound assignment snapshot refresh', async () => { @@ -185,7 +206,9 @@ describe('domestic container loading list and booking link', () => { expect(link.isVisible()).toBe(true) routerPush.mockClear() await link.trigger('click') - expect(routerPush).toHaveBeenCalledExactlyOnceWith({ name: 'domestic-container-workbench', query: { linkContainerId: '9001' } }) + await flushPromises() + expect(routerPush).not.toHaveBeenCalled() + expect(wrapper.findComponent({ name: 'OceanBookingLinkDialog' }).props('modelValue')).toBe(true) wrapper.unmount() } }) diff --git a/src/modules/container-loading/pages/ContainerDetailView.test.ts b/src/modules/container-loading/pages/ContainerDetailView.test.ts index 846ee964..66b00fb3 100644 --- a/src/modules/container-loading/pages/ContainerDetailView.test.ts +++ b/src/modules/container-loading/pages/ContainerDetailView.test.ts @@ -129,6 +129,8 @@ describe('ContainerDetailView customs integration', () => { expect(source).toContain("!detail.value.oceanBookingId") expect(source).toContain("['WAIT_LOADING', 'EDITING'].includes(detail.value.planStatus)") expect(source).toContain('关联已放舱订舱') - expect(source).toContain("query: { linkContainerId: detail.value.id }") + expect(source).toContain('oceanBookingLinkOpen.value = true') + expect(source).toContain('') + expect(source).not.toContain('linkContainerId') }) }) diff --git a/src/modules/container-loading/pages/ContainerDetailView.vue b/src/modules/container-loading/pages/ContainerDetailView.vue index dc3aee27..49a52fd0 100644 --- a/src/modules/container-loading/pages/ContainerDetailView.vue +++ b/src/modules/container-loading/pages/ContainerDetailView.vue @@ -21,6 +21,7 @@ import { import ContainerCustomsPanel from '../components/ContainerCustomsPanel.vue' import ContainerLastLegFeesPanel from '../components/ContainerLastLegFeesPanel.vue' import ContainerOverviewPanel from '../components/ContainerOverviewPanel.vue' +import OceanBookingLinkDialog from '../components/OceanBookingLinkDialog.vue' import { cancelContainerException, completeContainerClearance, @@ -140,6 +141,7 @@ const emptyReturnAt = ref('') const emptyReturnReason = ref('') const emptyReturnSaving = ref(false) const emptyReturnError = ref(null) +const oceanBookingLinkOpen = ref(false) const selectedDocument = computed(() => overview.value?.documents.find((item) => item.documentType === documentType.value) || null) const documentTitle = computed(() => 'DO 资料') @@ -195,7 +197,7 @@ const customsDepartureState = computed<'DEPARTED' | 'WAITING_OTHER_GATES'>(() => outboundDetail.value?.aggregate.dispatchStatus === 'WAITING_FOR_LOADING' ? 'DEPARTED' : 'WAITING_OTHER_GATES') function openOceanBookingLink() { if (!detail.value || !canLinkOceanBooking.value) return - void router.push({ name: 'domestic-container-workbench', query: { linkContainerId: detail.value.id } }) + oceanBookingLinkOpen.value = true } function toOverviewDocument(document: BusinessDocument, documentType: string, fallback?: ContainerOverviewDocument | null): ContainerOverviewDocument { @@ -558,6 +560,7 @@ onMounted(async () => { await load(); if (isOverseas.value && route.query.action + 选择文件 diff --git a/src/modules/container-loading/pages/ContainersView.test.ts b/src/modules/container-loading/pages/ContainersView.test.ts index 2f2a1610..e25b0208 100644 --- a/src/modules/container-loading/pages/ContainersView.test.ts +++ b/src/modules/container-loading/pages/ContainersView.test.ts @@ -10,7 +10,8 @@ import { listAllPlatformWarehouses } from '@/modules/warehouses' import { listPlatformPartners } from '@/modules/master-data' import { listSuppliers } from '@/modules/suppliers' import { getOceanBooking, listOceanBookingLinkCandidates, listOceanBookings } from '@/modules/ocean-bookings' -import { getContainer, getContainerOverview, linkContainerOceanBooking, listContainers, updateContainer } from '../api/platformContainerLoading' +import { getContainer, getContainerOverview, listContainers, updateContainer } from '../api/platformContainerLoading' +import OceanBookingLinkDialog from '../components/OceanBookingLinkDialog.vue' import { getTerminalDrayage, getTerminalDrayageHistory, recordTerminalDrayageEmptyReturn, selectTerminalDrayageFleet, sendTerminalDrayageEmail, getTerminalDrayageEmails } from '../api/terminalDrayages' import AppDialog from '@/shared/components/AppDialog.vue' import { containerLoadingRoutes } from '../routes' @@ -533,12 +534,10 @@ describe('ContainersView', () => { wrapper.unmount() }) - it('opens the existing released-booking workflow when entered from container detail', () => { + it('owns the released-booking entry through the shared dialog without a detail redirect query', () => { const source = readFileSync(resolve(process.cwd(), 'src/modules/container-loading/pages/ContainersView.vue'), 'utf8') - expect(source).toContain('route.query.linkContainerId') - expect(source).toContain("const target = await getContainer(linkContainerId, 'DOMESTIC')") - expect(source).toContain('await openLink(target)') - expect(source).toContain("void router.replace({ name: 'domestic-container-workbench' })") + expect(source).toContain('') + expect(source).not.toContain('linkContainerId') }) it.each(['EDITING', 'LOADING', 'COMPLETED'] as const)('keeps released-booking linking reachable alongside the %s process action', async (planStatus) => { @@ -567,63 +566,6 @@ describe('ContainersView', () => { } }) - it('normalizes an optional booking-link container number', async () => { - vi.mocked(linkContainerOceanBooking).mockResolvedValue({} as never) - const router = createTestRouter() - await router.push('/'); await router.isReady() - const wrapper = mount(ContainersView, { global: { plugins: [ElementPlus, router] } }) - await flushPromises() - const vm = wrapper.vm as unknown as { - linkTarget: { id: string; version: number } - linkCandidates: Array<{ key: string; oceanBookingId: string; requirementId: string; disabled: boolean }> - linkCandidateKey: string - linkContainerNo: string - saveLink: () => Promise - } - vm.linkTarget = { id: '9001', version: 7 } - vm.linkCandidates = [{ key: '101:202', oceanBookingId: '101', requirementId: '202', disabled: false }] - vm.linkCandidateKey = '101:202' - vm.linkContainerNo = ' mscu1234567 ' - - await vm.saveLink() - - expect(linkContainerOceanBooking).toHaveBeenCalledWith('9001', { - oceanBookingId: '101', requirementId: '202', containerNo: 'MSCU1234567', expectedVersion: 7, - }) - expect(vm.linkContainerNo).toBe('MSCU1234567') - wrapper.unmount() - }) - - it('links a released booking while leaving the real container number pending until pickup', async () => { - vi.mocked(linkContainerOceanBooking).mockResolvedValue({} as never) - const router = createTestRouter() - await router.push('/'); await router.isReady() - const wrapper = mount(ContainersView, { global: { plugins: [ElementPlus, router] } }) - await flushPromises() - const vm = wrapper.vm as unknown as { - linkTarget: { id: string; version: number } - linkCandidates: Array<{ key: string; oceanBookingId: string; requirementId: string; disabled: boolean }> - linkCandidateKey: string - linkContainerNo: string - saveLink: () => Promise - } - vm.linkTarget = { id: '9001', version: 7 } - vm.linkCandidates = [{ key: '101:202', oceanBookingId: '101', requirementId: '202', disabled: false }] - vm.linkCandidateKey = '101:202' - vm.linkContainerNo = '' - - await vm.saveLink() - - expect(linkContainerOceanBooking).toHaveBeenCalledWith('9001', { - oceanBookingId: '101', requirementId: '202', containerNo: null, expectedVersion: 7, - }) - const source = readFileSync(resolve(process.cwd(), 'src/modules/container-loading/pages/ContainersView.vue'), 'utf8') - expect(source).toContain('真实集装箱号可待司机提柜时录入') - expect(source).toContain(':confirm-disabled="!linkCandidateKey"') - expect(source).toContain("row.containerNo || '待补录'") - wrapper.unmount() - }) - it('keeps document uploads on the routed detail page without duplicate list implementations', () => { const source = readFileSync(resolve(process.cwd(), 'src/modules/container-loading/pages/ContainersView.vue'), 'utf8') const detailSource = readFileSync(resolve(process.cwd(), 'src/modules/container-loading/pages/ContainerDetailView.vue'), 'utf8') @@ -675,8 +617,8 @@ describe('ContainersView', () => { await flushPromises() expect(listOceanBookingLinkCandidates).toHaveBeenCalledWith({ warehouseId: '193000000000200002', channelCode: 'EXX_RAIL_NY', containerType: '45HC', page: 1, size: 200 }) - expect((wrapper.vm as unknown as { linkCandidates: unknown[] }).linkCandidates).toEqual([]) - expect(readFileSync(resolve(process.cwd(), 'src/modules/container-loading/pages/ContainersView.vue'), 'utf8')) + expect((wrapper.findComponent(OceanBookingLinkDialog).vm as unknown as { candidates: unknown[] }).candidates).toEqual([]) + expect(readFileSync(resolve(process.cwd(), 'src/modules/container-loading/components/OceanBookingLinkDialog.vue'), 'utf8')) .toContain('暂无符合当前装柜仓库、物流渠道和柜型的已放舱需求') expect(getOceanBooking).not.toHaveBeenCalled() wrapper.unmount() @@ -701,6 +643,7 @@ describe('ContainersView', () => { .filter((item) => item.textContent?.includes('关联已放舱订舱')).at(-1)! linkAction.click() + await flushPromises() linkAction.click() expect(listOceanBookingLinkCandidates).toHaveBeenCalledTimes(1) @@ -709,7 +652,7 @@ describe('ContainersView', () => { resolveCandidates({ records: [{ oceanBookingId: '315', bookingNo: 'OB-CAPACITY-SNAPSHOT', requirementId: '45315', containerType: '45HC', capacityCbm: 85, maxWeightKg: 28500, requiredQuantity: 1, allocatedQuantity: 0, remainingQuantity: 1, customerName: '客户', warehouseName: '东莞仓', channelName: '纽约铁路' }], page: 1, size: 200, total: 1, pages: 1 }) await flushPromises() expect(document.body.textContent).toContain('OB-CAPACITY-SNAPSHOT · 45HC × 1') - expect((wrapper.vm as unknown as { linkCandidates: Array<{ disabled: boolean }> }).linkCandidates[0]?.disabled).toBe(false) + expect((wrapper.findComponent(OceanBookingLinkDialog).vm as unknown as { candidates: Array<{ key: string }> }).candidates[0]?.key).toBe('315:45315') wrapper.unmount() }) @@ -743,7 +686,7 @@ describe('ContainersView', () => { await flushPromises() expect(listOceanBookingLinkCandidates).toHaveBeenCalledTimes(2) - const candidateLabels = (wrapper.vm as unknown as { linkCandidates: Array<{ label: string }> }).linkCandidates.map((candidate) => candidate.label) + const candidateLabels = (wrapper.findComponent(OceanBookingLinkDialog).vm as unknown as { candidates: Array<{ label: string }> }).candidates.map((candidate) => candidate.label) expect(candidateLabels.some((label) => label.includes('OB-LATEST'))).toBe(true) expect(candidateLabels.some((label) => label.includes('OB-STALE'))).toBe(false) wrapper.unmount() diff --git a/src/modules/container-loading/pages/ContainersView.vue b/src/modules/container-loading/pages/ContainersView.vue index 25710af1..2f965ef2 100644 --- a/src/modules/container-loading/pages/ContainersView.vue +++ b/src/modules/container-loading/pages/ContainersView.vue @@ -1,7 +1,7 @@