feat(tuning): release V0.8.2 Agent 界面重构
web-platform-ci / TypeScript, lint, unit, build (push) Has been cancelled
web-platform-ci / Playwright E2E (push) Has been cancelled

This commit is contained in:
2026-09-03 16:25:53 +08:00
parent a9b07e0abf
commit 63d67a645b
35 changed files with 4847 additions and 811 deletions
+6 -1
View File
@@ -35,13 +35,18 @@ describe('TuningApp', () => {
);
});
vi.stubGlobal('fetch', fetchMock);
render(<TuningApp />);
const { container } = render(<TuningApp />);
expect(container.firstElementChild).toHaveClass('h-full', 'overflow-y-auto');
fireEvent.change(screen.getByLabelText('访问令牌(仅当前标签页)'), {
target: { value: 'training-secret' },
});
fireEvent.click(screen.getByRole('button', { name: '连接/刷新' }));
expect(await screen.findByText(/deepseek-v4-flash/)).toBeInTheDocument();
expect(screen.getByText('新建 Unitree-Go2-Flat 调参 Session')).toBeInTheDocument();
const trialCount = screen.getByLabelText('调参次数(候选配置数)');
expect(trialCount).toHaveValue(12);
fireEvent.change(trialCount, { target: { value: '36' } });
expect(trialCount).toHaveValue(36);
await waitFor(() => expect(fetchMock).toHaveBeenCalledTimes(2));
for (const call of fetchMock.mock.calls) {
expect(String(call[0])).not.toContain('training-secret');