fix(qaops): 修复长部门路径挤出区域与依据列
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { renderToStaticMarkup } from 'react-dom/server'
|
||||
// @ts-expect-error The test runner provides Node; the browser bundle intentionally omits @types/node.
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { describe, expect, it, vi } from 'vitest'
|
||||
import { RegionMappingView } from './QARegions'
|
||||
import { parseOrganization } from './qaOrg'
|
||||
@@ -49,6 +51,14 @@ const props = {
|
||||
onRemoveMissing: vi.fn(),
|
||||
}
|
||||
describe('region mapping workbench', () => {
|
||||
it('lets long directory paths wrap instead of inheriting the global nowrap table rule', () => {
|
||||
const css = readFileSync(new URL('./qaRegions.css', import.meta.url), 'utf8')
|
||||
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] ?? ''
|
||||
expect(statusRule).toMatch(/white-space:\s*nowrap/)
|
||||
})
|
||||
it('shows a dated historical roster, conflicts and no invented performance verdict', () => {
|
||||
const html = renderToStaticMarkup(<RegionMappingView {...props} />)
|
||||
expect(html).toContain('历史快照')
|
||||
|
||||
@@ -64,6 +64,8 @@
|
||||
.qa-region-table td {
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid var(--line, #d8e1eb);
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.qa-region-table th {
|
||||
position: sticky;
|
||||
@@ -75,6 +77,10 @@
|
||||
min-width: 240px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.qa-region-table td:nth-child(3),
|
||||
.qa-region-table td:nth-child(4) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.qa-region-table input[type='checkbox'] {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
|
||||
Reference in New Issue
Block a user