优化
This commit is contained in:
@@ -990,6 +990,13 @@ describe('approved Admin density ownership', () => {
|
||||
it('keeps customer dialogs on shared sections, editors and preview geometry', () => {
|
||||
const customers = read('modules/customers/pages/CustomersView.vue')
|
||||
const detail = read('modules/customers/pages/CustomerDetailView.vue')
|
||||
const editor = customers.split('<AppDialog v-model="editorOpen"')[1]!.split('</AppDialog>')[0]!
|
||||
const sections = [...editor.matchAll(/<section\b[^>]*>/g)].map(match => match[0])
|
||||
expect(sections).toHaveLength(3)
|
||||
for (const section of sections) {
|
||||
expect(section).toContain('density-dialog-section')
|
||||
expect(section).not.toContain('data-tone=')
|
||||
}
|
||||
expect(customers).toContain('density-table density-table--editable customer-editor-table')
|
||||
expect(customers).toContain('density-actions density-actions--footer')
|
||||
expect(customers).not.toContain('<FormSection')
|
||||
@@ -1185,14 +1192,15 @@ describe('approved Admin density ownership', () => {
|
||||
sectionStyles.set(rule.selector, declarations)
|
||||
})
|
||||
for (const [section, background] of [
|
||||
['summary-section', 'var(--admin-dialog-summary-bg)'], ['declaration', 'var(--admin-dialog-source-bg)'], ['items-section', 'var(--admin-dialog-work-bg)'],
|
||||
['summary-section', 'var(--admin-dialog-summary-bg)'], ['declaration', 'var(--admin-dialog-source-bg)'], ['items-section', 'var(--admin-surface, #fff)'],
|
||||
]) {
|
||||
expect(sectionStyles.get(`.inbound-measurement-workspace-dialog.inbound-density .measurement-${section}`)).toMatchObject({
|
||||
padding: 'var(--admin-space-4, 10px) var(--admin-space-5, 12px)',
|
||||
background,
|
||||
})
|
||||
}
|
||||
// Shared density must not reset the coloured sections' horizontal gutters.
|
||||
expect(sectionStyles.get('.inbound-measurement-workspace-dialog.inbound-density .measurement-deviation-alert')?.background).toBe('var(--admin-surface, #fff)')
|
||||
// Shared density must not reset the sections' horizontal gutters.
|
||||
expect(sectionStyles.get('.inbound-density.admin-density-dialog .measurement-section')).toEqual({
|
||||
'padding-block': 'var(--admin-space-4, 10px)',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user