完善客户端模块与工作区能力
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
inman
2026-08-13 19:45:30 +08:00
parent 0148b91a15
commit 22add3f01f
97 changed files with 4756 additions and 3226 deletions

View File

@@ -83,10 +83,10 @@ describe('Makelore character scene partner profiles', () => {
useOpencodeStore.setState({ activeProject: project, projects: [project] });
hostApiFetchMock.mockResolvedValue({
skills: [{
name: 'pm-project-plan',
description: 'E2E project planning skill.',
location: 'D:/managed/skills/pm-project-plan/SKILL.md',
content: '# Project planning',
name: 'agent-browser',
description: 'E2E browser debugging skill.',
location: 'D:/managed/skills/agent-browser/SKILL.md',
content: '# Browser debugging',
entries: [
{ path: 'references', type: 'directory' },
{ path: 'references/guide.md', type: 'file' },
@@ -99,13 +99,13 @@ describe('Makelore character scene partner profiles', () => {
fireEvent.click(screen.getByTestId('resource-card-skills'));
await screen.findByText('opencode 已安装');
fireEvent.click(screen.getByTestId('skill-library-card-pm-project-plan'));
fireEvent.click(screen.getByTestId('skill-library-card-agent-browser'));
expect(await screen.findByTestId('skill-detail-view')).toBeInTheDocument();
expect(screen.getByTestId('skill-structure')).toHaveTextContent('references/guide.md');
expect(screen.getByTestId('skill-main-file')).toHaveTextContent('# Project planning');
expect(screen.getByTestId('skill-main-file')).toHaveTextContent('# Browser debugging');
fireEvent.click(screen.getByRole('button', { name: '返回技能列表' }));
expect(await screen.findByTestId('skill-library-card-pm-project-plan')).toBeInTheDocument();
expect(await screen.findByTestId('skill-library-card-agent-browser')).toBeInTheDocument();
});
});