Skip to content

Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.

test(web): align Creator diagnostics and image status assertions

Leggettf8144ff46442
diff --git a/apps/web/src/features/dashboard/DashboardPage.test.tsx b/apps/web/src/features/dashboard/DashboardPage.test.tsx
index 98b45403..9d154127 100644
--- a/apps/web/src/features/dashboard/DashboardPage.test.tsx
+++ b/apps/web/src/features/dashboard/DashboardPage.test.tsx
@@ -1824,8 +1824,11 @@ describe('DashboardPage', () => {
await waitFor(() => {
expect(composer).toHaveValue('检查当前翻译设置');
});
- const issue = await screen.findByText(/Agent 未能完成诊断,请查看问题详情后重试。/);
+ const issue = await screen.findByText(/Agent 未能完成诊断,请查看问题详情后重试。/, {
+ selector: '[data-source="diagnostic"] .creator-collaboration-bubble > p'
+ });
expect(issue.closest('[data-source="diagnostic"]')).toBeInTheDocument();
+ expect(issue).toBeVisible();
expect(screen.queryByText(/诊断编号:OC-/)).not.toBeInTheDocument();
expect(issue).not.toHaveTextContent('Creator Agent unavailable');
});
diff --git a/apps/web/src/features/settings/CreatorServicesSettingsView.test.tsx b/apps/web/src/features/settings/CreatorServicesSettingsView.test.tsx
index ab2ad868..a72dfdbd 100644
--- a/apps/web/src/features/settings/CreatorServicesSettingsView.test.tsx
+++ b/apps/web/src/features/settings/CreatorServicesSettingsView.test.tsx
@@ -21,7 +21,10 @@ describe('CreatorServicesSettingsView', () => {
render(<CreatorServicesSettingsView connected service={service} modelService={createModelService()} onOpenAgentSetup={onOpenAgentSetup} />);
expect(service.getCodexImageStatus).not.toHaveBeenCalled();
await userEvent.click(await screen.findByRole('tab', { name: '图像生成' }));
- expect(await screen.findByText('本地登录凭据已就绪')).toBeInTheDocument();
+ expect(await screen.findByText('ChatGPT 登录态 · 原生生图')).toBeInTheDocument();
+ expect(screen.getByText(/已检测到本地 ChatGPT 登录凭据和原生生图工具/)).toBeInTheDocument();
+ expect(screen.queryByText('本地登录凭据已就绪')).not.toBeInTheDocument();
+ expect(service.getCodexImageStatus).toHaveBeenCalledOnce();
await userEvent.click(screen.getByRole('button', { name: '配置 Agent' }));
expect(onOpenAgentSetup).toHaveBeenCalledOnce();
});