This commit is contained in:
2026-09-15 09:58:15 +08:00
parent 3f998bdb88
commit 4bf66d9571
90 changed files with 1599 additions and 1388 deletions
@@ -195,6 +195,8 @@ describe('PartnersView real API integration', () => {
const sections = detailContent?.querySelectorAll('section')
const otherInfo = sections?.item(sections.length - 1)
expect(detailContent).not.toBeNull()
expect(detailContent?.closest('.el-drawer')?.classList.contains('admin-density-drawer')).toBe(true)
expect(detailContent?.querySelectorAll('.density-fields')).toHaveLength(3)
expect(otherInfo?.querySelectorAll('.detail-grid > .detail-span')).toHaveLength(2)
expect(otherInfo?.textContent).toContain('更新时间')
expect(otherInfo?.textContent).toContain('长期合作单位')
@@ -278,13 +280,10 @@ describe('PartnersView real API integration', () => {
})
it('keeps all three row actions visible without a premature more menu', () => {
expect(source).toContain('<el-button size="small" plain type="primary" @click="openDetail')
expect(source).toContain("access.can('platform:counterparty:edit')\" size=\"small\" plain type=\"primary\"")
expect(source).toContain("access.can('platform:counterparty:status')\" size=\"small\" plain")
expect(source).toContain('<Eye :size="15" />详情')
expect(source).toContain('<Pencil :size="15" />编辑')
expect(source).toContain('<Power :size="15" />')
expect(source).not.toContain('MoreHorizontal')
expect(source).not.toContain('<el-button link type="primary" @click="openDetail')
})
})
const actions = source.slice(source.indexOf('<template #actions='), source.indexOf('</template>', source.indexOf('<template #actions=')))
expect(actions.match(/class="density-action"/g)).toHaveLength(3)
expect(actions).toContain('>详情</el-button>')
expect(actions).toContain('>编辑</el-button>')
expect(actions).toContain(':data-tone=')
expect(actions).not.toMatch(/<(?:el-dropdown|Pencil|Power|Eye|Trash2|Download|CircleX)\b/)
})})