优化
This commit is contained in:
@@ -288,6 +288,27 @@ describe('approved Admin density ownership', () => {
|
||||
expect(view.styles.map(style => style.content).join('\n')).not.toContain('--el-input-border-color')
|
||||
})
|
||||
|
||||
it('outlines opted-in customer forms without overriding native focus, validation or disabled styles', () => {
|
||||
const rules = new Map<string, Record<string, string>>()
|
||||
cssRoot(shared).walkRules(rule => {
|
||||
const values: Record<string, string> = {}
|
||||
rule.walkDecls(decl => { values[decl.prop] = decl.value })
|
||||
rules.set(rule.selector, values)
|
||||
})
|
||||
expect(rules.get(':is(.admin-density, .admin-density-dialog) .density-form--outlined :is(.el-input, .el-textarea)')).toEqual({
|
||||
'--el-input-border-color': 'var(--el-border-color)',
|
||||
'--el-input-hover-border-color': 'var(--el-border-color-hover)',
|
||||
'--el-input-bg-color': 'var(--admin-surface)',
|
||||
})
|
||||
const customerRules = new Map<string, Record<string, string>>()
|
||||
cssRoot(read('modules/customers/customerDensity.css')).walkRules(rule => {
|
||||
const values: Record<string, string> = {}
|
||||
rule.walkDecls(decl => { values[decl.prop] = decl.value })
|
||||
customerRules.set(rule.selector, values)
|
||||
})
|
||||
expect(customerRules.get('.customer-editor-dialog .density-form--outlined .el-input-number .el-input__inner')).toEqual({ 'text-align': 'left' })
|
||||
})
|
||||
|
||||
it('outlines only the three opted-in customer billing editors without overriding native focus or disabled styles', () => {
|
||||
const rules = new Map<string, Record<string, string>>()
|
||||
cssRoot(shared).walkRules(rule => {
|
||||
|
||||
Reference in New Issue
Block a user