fix(admin): 完善弹窗滚动与表单交互布局

This commit is contained in:
2026-10-21 07:40:08 +08:00
parent 2f9a3330e5
commit 0a1968a134
41 changed files with 614 additions and 131 deletions
@@ -127,6 +127,18 @@ describe('notification native dialogs and drawers', () => {
await click(wrapper, '确认定时发送')
expect(api.createNotification).toHaveBeenCalledWith(expect.objectContaining({ tenantId: '9223372036854775100', recipientType: 'TENANT_ALL', variables: { order_no: 'NYEXX2610200001' }, scheduledAt: expect.stringMatching(/^\d{4}-\d{2}-\d{2}T/) }))
})
it('keeps long template variable labels above their editable values', async () => {
const variable = 'customer_delivery_appointment_reference_number'
const wrapper = await composer([variable])
const field = wrapper.get('.message-variable-field')
expect(field.classes()).toContain('el-form-item--label-top')
expect(field.get('label').text()).toContain(variable)
expect((field.get('label').element as HTMLElement).style.width).not.toBe('100px')
await field.get('input[placeholder="请输入变量值"]').setValue('REFERENCE-20261021')
await wrapper.get('input[placeholder="请输入服务端角色编码"]').setValue('TEST_OPERATOR')
await click(wrapper, '立即发送')
expect(api.createNotification).toHaveBeenCalledWith(expect.objectContaining({ variables: { [variable]: 'REFERENCE-20261021' } }))
})
it('locks composer close paths and retains the draft after a rejected send', async () => {
const pending = deferred<NotificationTask>()
vi.mocked(api.createNotification).mockReturnValue(pending.promise)