Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
test(sidebar): 修 findByRole 的 timeout 传参类型
Zhang Yunjin2098f8e0d1b0
diff --git a/apps/desktop/src/renderer/__tests__/onlineDeviceHeaders.test.tsx b/apps/desktop/src/renderer/__tests__/onlineDeviceHeaders.test.tsxindex 4d70f3d052..08e87862c1 100644--- a/apps/desktop/src/renderer/__tests__/onlineDeviceHeaders.test.tsx+++ b/apps/desktop/src/renderer/__tests__/onlineDeviceHeaders.test.tsx@@ -402,10 +402,11 @@ describe('Cindy Make sidebar entry', () => {// 弹窗是 React.lazy 动态载入的(见 ProjectsSection 的 CindyMakeCreateDialog),// 首次打开要等 import 落地;并行跑时这一步可能超过 findByRole 默认的 1s 上限,// 表现为该用例偶发失败(上游既有 flaky,与业务断言无关)。给足等待窗口。- const dialog = await screen.findByRole('dialog', {- name: 'settings.cindyMake.create.title',- timeout: 5000,- });+ const dialog = await screen.findByRole(+ 'dialog',+ { name: 'settings.cindyMake.create.title' },+ { timeout: 5000 },+ );expect(header.getAttribute('aria-expanded')).toBe('false');fireEvent.change(within(dialog).getByRole('textbox'), {target: { value: 'Change the sidebar' },@@ -415,7 +416,7 @@ describe('Cindy Make sidebar entry', () => {);expect(screen.queryByRole('dialog')).toBeNull();fireEvent.click(create);- const reopened = await screen.findByRole('dialog', undefined, { timeout: 5000 });+ const reopened = await screen.findByRole('dialog', {}, { timeout: 5000 });expect((within(reopened).getByRole('textbox') as HTMLTextAreaElement).value).toBe('');});