merge: integrate TEST changes with fleet photo updates

This commit is contained in:
2026-10-26 17:21:14 +08:00
79 changed files with 3489 additions and 129 deletions
+20 -8
View File
@@ -47,6 +47,7 @@ const overseasConsumers = [
'overseas-warehouse/components/DeliveryDocumentsDialog.vue',
]
const overseasBusinessConsumers = [
'overseas-business/pages/OverseasFeesView.vue',
'overseas-business/components/TransportDemandForm.vue',
'overseas-business/pages/PurchaseOrdersView.vue', 'overseas-business/pages/PurchaseOrderDetailView.vue',
'overseas-business/pages/PurchaseOrderEditView.vue', 'overseas-business/pages/TransportOrdersView.vue',
@@ -102,6 +103,7 @@ const systemConsumers = ['iam/pages/InternalUsersView.vue', 'iam/pages/RolesView
const selfOperatedPages = ['self-operated/components/AnalyticsView.vue', 'self-operated/components/InventoryTurnoverView.vue']
const selfOperatedConsumers = [...selfOperatedPages, 'self-operated/components/SkuTrend.vue', 'self-operated/pages/OverviewView.vue']
const consumers = [
'overseas-business/components/OverseasFeeEditor.vue', 'overseas-business/components/StorageRentPanel.vue',
...selfOperatedConsumers,
'overseas-business/components/FleetArrangementSummary.vue',
...notificationConsumers,
@@ -219,12 +221,16 @@ const cssRoot = (css: string) => {
}
describe('approved Admin density ownership', () => {
it('keeps domestic pallet metric appearance owned by shared workbench styles', () => {
const page = parse(read('modules/warehouse-resources/pallets/pages/PalletsView.vue')).descriptor
const css = page.styles.map(style => style.content).join('\n')
expect(page.template!.content).toContain('workbench-metric workbench-tone is-compact')
expect(css).not.toMatch(/\.summary-grid\s+(?:article|span|strong|\.idle|\.occupied)\b/)
expect(css).not.toMatch(/\.workbench-metric[\s.{]/)
it('keeps pallet overview spacing and metric appearance owned by shared primitives', () => {
for (const file of ['warehouse-resources/pallets/pages/PalletsView.vue', 'overseas-warehouse/pages/PalletsView.vue']) {
const page = parse(read(`modules/${file}`)).descriptor
const css = page.styles.map(style => style.content).join('\n')
expect(page.template!.content, file).toMatch(/<AdminPage\b[^>]*spacing="compact"/)
expect(css, file).toContain('.pallet-page.admin-page.is-spacing-compact { gap: var(--admin-space-3); }')
expect(page.template!.content, file).toContain('workbench-metric workbench-tone is-compact')
expect(css, file).not.toMatch(/\.summary-grid\s+(?:article|span|strong|\.idle|\.occupied)\b/)
expect(css, file).not.toMatch(/\.workbench-metric[\s.{]/)
}
})
it('lets local transport editors fill the workspace and keeps form density in shared primitives', () => {
@@ -308,6 +314,9 @@ describe('approved Admin density ownership', () => {
'--el-input-hover-border-color': 'var(--el-border-color-hover)',
'--el-input-bg-color': 'var(--admin-surface)',
})
expect(rules.get(':is(.admin-density, .admin-density-dialog) .density-form--outlined')).toEqual({
'--el-border-radius-base': 'var(--cc-radius-lg)',
})
const customerRules = new Map<string, Record<string, string>>()
cssRoot(read('modules/customers/customerDensity.css')).walkRules(rule => {
const values: Record<string, string> = {}
@@ -356,10 +365,10 @@ describe('approved Admin density ownership', () => {
})
}
})
it('keeps declaration order fields on the continuous cell-editor baseline', () => {
it('keeps declaration order fields outlined within the continuous cell-editor layout', () => {
const source = read('modules/unified-orders/components/OrderDeclarationEditorDialog.vue')
const orderFields = source.slice(source.indexOf('<el-form label-position="left"'), source.indexOf('</el-form>') + '</el-form>'.length)
expect(orderFields).toContain('class="order-fields density-form"')
expect(orderFields).toContain('class="order-fields density-form density-form--outlined"')
expect(orderFields).toContain('density-table density-table--editable')
expect(orderFields).not.toMatch(/<el-(?:row|col)\b/)
expect(orderFields).toContain('<span aria-label="渠道编码">')
@@ -1247,6 +1256,8 @@ describe('approved Admin density ownership', () => {
it('keeps desktop table toolbar dimensions owned by DataTable without cascade overrides', () => {
const tableCss = parse(read('shared/components/DataTable.vue')).descriptor.styles.map(style => style.content).join('\n')
expect(tableCss).toContain('.data-table > .data-table__toolbar.has-inline-filters')
expect(tableCss).toContain('.data-table__toolbar.has-inline-filters > .data-table__filters { flex: 1 1 0; min-width: 0; }')
const dimensions: Record<string, string[]> = { padding: [], 'min-height': [] }
cssRoot(tableCss).walkRules(rule => {
if (!rule.selectors.includes('.data-table__toolbar') && !rule.selectors.includes('.data-table__toolbar.is-compact')) return
@@ -1353,6 +1364,7 @@ describe('approved Admin density ownership', () => {
expect(source).not.toContain('class="container-preview__metric')
const detail = read('modules/overseas-warehouse/pages/LastMileOrderDetailView.vue')
expect(detail).toContain('density-table density-table--editable fee-editor-table')
expect(detail).toContain('<section class="density-dialog-section" aria-label="尾程费用登记">')
expect(detail).toContain('label-position="left" label-width="110px" :disabled="saving"')
expect(detail).not.toContain('.fee-form-grid')
expect(read('modules/overseas-warehouse/components/WarehouseTransferReviewDialog.vue')).toContain('data-tone="source"')