优化
This commit is contained in:
@@ -71,6 +71,7 @@ const generalCatalogConsumers = [
|
||||
'overseas-master-data/components/CapacityInquiryTable.vue',
|
||||
'overseas-master-data/components/CapacityOfferSettingsDialog.vue',
|
||||
'overseas-master-data/pages/TripOperationsView.vue',
|
||||
'overseas-master-data/components/TripOperationsCharts.vue',
|
||||
'overseas-master-data/pages/TripDetailView.vue',
|
||||
'overseas-master-data/components/TripPlanDialog.vue',
|
||||
'overseas-master-data/pages/DriverDetailView.vue',
|
||||
@@ -585,6 +586,18 @@ describe('approved Admin density ownership', () => {
|
||||
|
||||
it('keeps measurement sections within the clipped panel and gives long references room', () => {
|
||||
const dialog = parse(read('modules/inbounds/measurement/InboundMeasurementDialog.vue')).descriptor
|
||||
const panelCss = parse(read('modules/inbounds/measurement/InboundMeasurementPanel.vue')).descriptor.styles.map(style => style.content).join('\n')
|
||||
const differenceStyles = new Map<string, Record<string, string>>()
|
||||
cssRoot(panelCss).walkRules(rule => {
|
||||
const declarations: Record<string, string> = {}
|
||||
rule.walkDecls(decl => { declarations[decl.prop] = decl.value })
|
||||
differenceStyles.set(rule.selector, declarations)
|
||||
})
|
||||
expect(differenceStyles.get('.measurement-comparison__difference')?.color).toBe('var(--el-color-danger-dark-2)')
|
||||
expect(differenceStyles.get('.measurement-deviation-alert')).toMatchObject({
|
||||
'--el-color-warning': 'var(--el-color-danger-dark-2)',
|
||||
'--el-color-warning-dark-2': 'var(--el-color-danger-dark-2)',
|
||||
})
|
||||
const layout = read('modules/inbounds/measurement/measurementDensity.css')
|
||||
const summaryMargins: string[] = []
|
||||
for (const css of [layout, ...dialog.styles.map(style => style.content)]) {
|
||||
@@ -679,6 +692,33 @@ describe('approved Admin density ownership', () => {
|
||||
expect(read(`modules/${file}`), file).toContain('density-action')
|
||||
}
|
||||
})
|
||||
it('halves text action spacing through shared rules while retaining outlined action spacing', () => {
|
||||
const declarations = new Map<string, Record<string, string>>()
|
||||
cssRoot(read('styles/adminTextActions.css')).walkRules(rule => {
|
||||
const values: Record<string, string> = {}
|
||||
rule.walkDecls(decl => { values[decl.prop] = decl.value })
|
||||
declarations.set(rule.selector, values)
|
||||
})
|
||||
expect(declarations.get('.row-actions.admin-text-actions')).toMatchObject({
|
||||
'--cc-row-action-gap': 'calc(var(--admin-space-2, 6px) / 2)',
|
||||
'--cc-list-action-sibling-margin': '0px',
|
||||
gap: 'var(--cc-row-action-gap)',
|
||||
})
|
||||
const button = declarations.get('.row-actions.admin-text-actions .el-button.el-button')!
|
||||
expect(button['padding-inline']).toBe('calc(var(--admin-space-4, 10px) / 2)')
|
||||
expect(button).not.toHaveProperty('height')
|
||||
expect(button).not.toHaveProperty('font-size')
|
||||
const groups = new Map<string, string>()
|
||||
cssRoot(shared).walkRules(rule => {
|
||||
if (rule.selector.endsWith(' .density-actions')) {
|
||||
rule.walkDecls('gap', decl => { groups.set(rule.selector, decl.value) })
|
||||
}
|
||||
})
|
||||
expect([...groups.values()]).toEqual([
|
||||
'var(--cc-row-action-gap, var(--admin-space-2))',
|
||||
'var(--cc-row-action-gap, var(--admin-space-2))',
|
||||
])
|
||||
})
|
||||
it('keeps container evidence and customs summaries compact without duplicating field styles', () => {
|
||||
const overview = read('modules/container-loading/components/ContainerOverviewPanel.vue')
|
||||
const customs = read('modules/container-loading/components/ContainerCustomsPanel.vue')
|
||||
|
||||
Reference in New Issue
Block a user