继续收口平台分段与泥点确认

新增泥点确认状态机共享 hook 并接入拼图与抓大鹅工作台

将首页发现页与个人中心剩余切换条收口到 PlatformSegmentedTabs

统一平台弹窗 header 关闭入口并补齐相关测试

更新前端组件收口文档与团队决策记录
This commit is contained in:
2026-06-11 01:30:13 +08:00
parent 94122583ac
commit 0a4ccdf45c
19 changed files with 511 additions and 242 deletions

View File

@@ -950,6 +950,37 @@ test('世界页基本设定编辑按钮打开基本设定编辑目标', async ()
expect(handleEditTarget).toHaveBeenCalledWith({ kind: 'foundation' });
});
test('实体目录 sticky rail 改用共享 segmented tabs 并保留计数标签', async () => {
const user = userEvent.setup();
const handleActiveTabChange = vi.fn();
render(
<CustomWorldEntityCatalog
profile={createProfile()}
previewCharacters={[]}
activeTab="world"
onActiveTabChange={handleActiveTabChange}
onEditTarget={() => {}}
onProfileChange={() => {}}
/>,
);
const tablist = screen.getByRole('tablist', { name: '世界实体目录' });
const worldTab = screen.getByRole('tab', { name: '世界 1' });
const storyTab = screen.getByRole('tab', { name: '场景角色 1' });
expect(tablist.className).toContain('flex');
expect(tablist.className).toContain('overflow-x-auto');
expect(worldTab.getAttribute('aria-selected')).toBe('true');
expect(storyTab.getAttribute('aria-selected')).toBe('false');
expect(within(storyTab).getByText('场景角色')).toBeTruthy();
expect(within(storyTab).getByText('1')).toBeTruthy();
await user.click(storyTab);
expect(handleActiveTabChange).toHaveBeenCalledWith('story');
});
test('基本设定用分号拆分成标签展示', () => {
const profile = {
...createProfile(),