@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user