20260920173439
This commit is contained in:
1 parent
f4bfc1ddfc
commit
6f03d92425
174 files changed
+23490
-157
No files matched your search
@@ -275,7 +275,20 @@ describe('用户管理:行操作', () => {
|
||||
const wrapper = await mountUser()
|
||||
|
||||
const keys = wrapper.vm.rowActions.map((action) => action.key)
|
||||
expect(keys).toEqual(['edit', 'delete'])
|
||||
expect(keys).toEqual(['edit', 'power', 'delete'])
|
||||
})
|
||||
|
||||
it('提供分配权限操作,点开时把该行交给权限抽屉', async () => {
|
||||
const wrapper = await mountUser()
|
||||
|
||||
const powerAction = wrapper.vm.rowActions.find((action) => action.key === 'power')
|
||||
expect(powerAction).toBeTruthy()
|
||||
|
||||
const row = { b_id: 'u1', b_name: '张三' }
|
||||
powerAction.onClick(row)
|
||||
|
||||
expect(wrapper.vm.powerUser).toStrictEqual(row)
|
||||
expect(wrapper.vm.powerOpen).toBe(true)
|
||||
})
|
||||
|
||||
it('新增时把编辑对象清空,避免带入上一次编辑的行', async () => {
|
||||
|
||||
Reference in new issue
Block a user