mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-08-20 03:03:43 +08:00
Fix tag management view entering search flow
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
|
||||
const projectRoot = process.cwd();
|
||||
|
||||
test('popular tag management mode stays out of quick search and discovery grids', () => {
|
||||
const source = readFileSync(
|
||||
join(projectRoot, 'components/home/PopularFeatures.tsx'),
|
||||
'utf8',
|
||||
);
|
||||
|
||||
assert.match(source, /const isTagManagementMode = showTagManager;/);
|
||||
assert.match(source, /!\s*isTagManagementMode && <CategoryQuickSearch/);
|
||||
assert.match(source, /!\s*isTagManagementMode && !effectiveRecommendSelected/);
|
||||
assert.match(source, /!\s*isTagManagementMode && \(/);
|
||||
});
|
||||
|
||||
test('tag management list uses wrapping chip layout instead of a horizontal search filter row', () => {
|
||||
const source = readFileSync(
|
||||
join(projectRoot, 'components/home/TagList.tsx'),
|
||||
'utf8',
|
||||
);
|
||||
|
||||
assert.match(source, /rectSortingStrategy/);
|
||||
assert.match(source, /showTagManager\s*\?\s*'flex-wrap overflow-visible'/);
|
||||
assert.match(source, /showTagManager \? rectSortingStrategy : horizontalListSortingStrategy/);
|
||||
});
|
||||
Reference in New Issue
Block a user