fix(需求池): 修复列表换行和版本解绑状态
This commit is contained in:
22
apps/web/lib/requirement-table-layout.test.ts
Normal file
22
apps/web/lib/requirement-table-layout.test.ts
Normal 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-\[/);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user