feat(qa-ops): 支持自定义区域与分级部门批量归属
build / build (push) Successful in 1m8s

This commit is contained in:
姚章浩
2026-10-18 21:50:29 +08:00
parent 8835a473dd
commit 76671e0784
33 changed files with 865 additions and 100 deletions
+25 -1
View File
@@ -51,6 +51,30 @@ const props = {
onRemoveMissing: vi.fn(),
}
describe('region mapping workbench', () => {
it('separates multiselect from bulk application and renders hierarchy and editable region names', () => {
const custom = {
...state,
regions: [{ id: 'APAC', name: '国外工业Amercia' }],
view: { ...state.view, regions: { APAC: 1 } },
}
const html = renderToStaticMarkup(<RegionMappingView {...props} state={custom} />)
for (const label of [
'区域设置',
'添加区域',
'一级部门',
'二级部门',
'三级部门',
'四级及更深',
'批量归属',
'全选当前列表',
'取消本次勾选',
'国外工业Amercia',
])
expect(html).toContain(label)
expect(html).toMatch(/disabled=""[^>]*>批量归属/)
expect(html).not.toContain('将 示例公司/')
})
it('shows real synchronization stages without inventing progress and protects dirty drafts', () => {
const syncStatus = {
configured: true,
@@ -80,7 +104,7 @@ describe('region mapping workbench', () => {
const bodyRule = css.match(/\.qa-region-table td\s*\{([^}]+)\}/)?.[1] ?? ''
expect(bodyRule).toMatch(/white-space:\s*normal/)
expect(bodyRule).toMatch(/overflow-wrap:\s*anywhere/)
const statusRule = css.match(/\.qa-region-table td:nth-child\(4\)\s*\{([^}]+)\}/)?.[1] ?? ''
const statusRule = css.match(/\.qa-region-table td\.qa-region-basis\s*\{([^}]+)\}/)?.[1] ?? ''
expect(statusRule).toMatch(/white-space:\s*nowrap/)
})
it('shows a dated historical roster, conflicts and no invented performance verdict', () => {