按人和按区域均直接显示部门名称与完整路径悬停,统一列宽;移除不再使用的折叠摘要、模式开关和样式。统计、兼属与分页不变。 验证:按人部门直显与统一列宽回归先红后绿,14项相关测试与类型检查通过。完整门禁、候选及上线验收待执行。
This commit is contained in:
@@ -24,7 +24,7 @@ it('renders at most fifty ranked people with actual question counts and no depar
|
||||
expect(html).not.toContain('checkbox')
|
||||
expect(html).not.toContain('绑定选中部门')
|
||||
})
|
||||
it('shows region department names immediately with full-path titles while leaving all-person details unchanged', () => {
|
||||
it('shows both regional and all-person department names inline with complete path titles', () => {
|
||||
const data = fixture()
|
||||
data.rows.find((d) => d.id === 'root')!.name = '研发/视觉'
|
||||
const html = renderToStaticMarkup(<PeopleAnalysisView data={data} mode="regions" />)
|
||||
@@ -35,17 +35,21 @@ it('shows region department names immediately with full-path titles while leavin
|
||||
expect(html).not.toContain('<summary')
|
||||
expect(html).not.toContain('个直属部门')
|
||||
const all = renderToStaticMarkup(<PeopleAnalysisView data={data} mode="people" />)
|
||||
expect(all).toContain('<summary')
|
||||
expect(all).toContain('个直属部门')
|
||||
expect(all).not.toContain('<summary')
|
||||
expect(all).not.toContain('个直属部门')
|
||||
expect(all).toContain('qa-people-departments-inline')
|
||||
expect(all).toContain('title="研发/视觉/Fixture Child"')
|
||||
expect(all).toContain('>研发/视觉</li>')
|
||||
expect(all).toContain('>Fixture Child</li>')
|
||||
})
|
||||
it('widens region names and departments without changing all-person column widths', () => {
|
||||
it('uses the same widened personnel and department columns in both ranking views', () => {
|
||||
const data = fixture()
|
||||
const widths = (mode: 'regions' | 'people') =>
|
||||
[
|
||||
...renderToStaticMarkup(<PeopleAnalysisView data={data} mode={mode} />).matchAll(/<col style="width:(\d+)%"/g),
|
||||
].map((m) => Number(m[1]))
|
||||
expect(widths('regions')).toEqual([6, 20, 9, 36, 9, 20])
|
||||
expect(widths('people')).toEqual([6, 19, 16, 29, 10, 20])
|
||||
expect(widths('people')).toEqual([6, 20, 9, 36, 9, 20])
|
||||
})
|
||||
it('region analysis lists the saved region members once and all-person analysis retains unassigned and zero-use people', () => {
|
||||
const data = fixture()
|
||||
|
||||
Reference in New Issue
Block a user