fix(需求池): 修复列表换行和版本解绑状态

This commit is contained in:
Script Generator
2026-07-02 19:50:47 +08:00
parent 121114af6a
commit 554ab520d1
7 changed files with 194 additions and 17 deletions

View File

@@ -0,0 +1,22 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import {
REQUIREMENT_TABLE_BADGE_CLASS,
getRequirementTableTextClass,
} from './requirement-table-layout';
test('keeps requirement table badges on one line', () => {
assert.match(REQUIREMENT_TABLE_BADGE_CLASS, /\bwhitespace-nowrap\b/);
assert.match(REQUIREMENT_TABLE_BADGE_CLASS, /\bshrink-0\b/);
});
test('clips long requirement source project type and creator cells', () => {
for (const column of ['source', 'project', 'type', 'creator'] as const) {
const className = getRequirementTableTextClass(column);
assert.match(className, /\btruncate\b/);
assert.match(className, /\bblock\b/);
assert.match(className, /\bmax-w-\[/);
}
});