From 6d185b6f40e3f86c2f9506874253472886a04983 Mon Sep 17 00:00:00 2001 From: yyh <92089059+lyzno1@users.noreply.github.com> Date: Wed, 12 Aug 2026 15:55:46 +0800 Subject: [PATCH] test(web): remove brittle publisher lock test (#40592) --- .../app-publisher/__tests__/index.spec.tsx | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/web/app/components/app/app-publisher/__tests__/index.spec.tsx b/web/app/components/app/app-publisher/__tests__/index.spec.tsx index abd281a3bbf..116000075fa 100644 --- a/web/app/components/app/app-publisher/__tests__/index.spec.tsx +++ b/web/app/components/app/app-publisher/__tests__/index.spec.tsx @@ -846,31 +846,6 @@ describe('AppPublisher', () => { expect(mockOnToggle).not.toHaveBeenCalled() }) - it('should apply the per-open publish lock to the keyboard shortcut', async () => { - const preventDefault = vi.fn() - mockOnPublish.mockResolvedValue(undefined) - - render() - - expect(hotkeyMocks.hotkeys).toContain('Mod+Shift+P') - hotkeyMocks.handlers[0]!({ preventDefault }) - - await waitFor(() => { - expect(preventDefault).toHaveBeenCalled() - expect(mockOnPublish).toHaveBeenCalledTimes(1) - }) - - hotkeyMocks.handlers.at(-1)!({ preventDefault }) - expect(mockOnPublish).toHaveBeenCalledTimes(1) - - fireEvent.click(screen.getByText(/(?:^|\.)common\.publish(?=$|:)/)) - expect(sectionProps.summary?.published).toBe(false) - hotkeyMocks.handlers.at(-1)!({ preventDefault }) - await waitFor(() => { - expect(mockOnPublish).toHaveBeenCalledTimes(2) - }) - }) - it('should keep keyboard publishing available in multiple model mode', async () => { const preventDefault = vi.fn() mockOnPublish.mockResolvedValue(undefined)