style(admin): unify dialog layouts and dense readonly presentation
This commit is contained in:
@@ -60,6 +60,7 @@ describe('OrderDeclarationEditorDialog', () => {
|
||||
createWrapper(true)
|
||||
await flushPromises()
|
||||
const parent = document.querySelector<HTMLElement>('.el-dialog.admin-density-dialog')!
|
||||
expect([...parent.querySelectorAll('.density-dialog-section__title')].map(title => title.textContent)).toEqual(['原订单资料', '订单申报资料', '货品申报明细 不允许新增、删除或调整明细序号'])
|
||||
expect(parent.style.getPropertyValue('--el-dialog-width')).toBe('min(1180px, calc(100vw - 36px))')
|
||||
expect(parent.querySelector('.density-descriptions')).not.toBeNull()
|
||||
parent.querySelector<HTMLButtonElement>('.cargo-table .density-action')!.click()
|
||||
@@ -74,6 +75,14 @@ describe('OrderDeclarationEditorDialog', () => {
|
||||
name.value = '编辑后的台灯'
|
||||
name.dispatchEvent(new Event('input', { bubbles: true }))
|
||||
await flushPromises()
|
||||
cargo.querySelector<HTMLButtonElement>('button[aria-label="展开全屏"]')!.click()
|
||||
await flushPromises()
|
||||
expect(cargo.classList.contains('is-fullscreen')).toBe(true)
|
||||
expect(name.value).toBe('编辑后的台灯')
|
||||
cargo.querySelector<HTMLButtonElement>('button[aria-label="退出全屏"]')!.click()
|
||||
await flushPromises()
|
||||
expect(cargo.classList.contains('is-fullscreen')).toBe(false)
|
||||
expect(name.value).toBe('编辑后的台灯')
|
||||
const apply = [...cargo.querySelectorAll<HTMLButtonElement>('button')].find(button => button.textContent?.trim() === '应用本项')!
|
||||
apply.click()
|
||||
await flushPromises()
|
||||
|
||||
Reference in New Issue
Block a user