From ed5417a341f577f7d3fc8a68b6d964bb9ecd1bfb Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Sat, 4 Jul 2026 13:57:20 -0700 Subject: [PATCH] FN-7529: fix desktop header search test Update the App test to assert the open desktop search panel state after rerender.\n\n- Avoid re-clicking the desktop search toggle after the non-mobile panel stays open across rerender.\n- Assert the branch-filter selects directly while the search panel remains rendered.\n\nFiles changed:\n packages/dashboard/app/components/__tests__/App.test.tsx | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-) Fusion-Task-Id: FN-7529 Fusion-Task-Lineage: 1495f872-d262-4ea4-83f2-5a53ecf7a202 Co-authored-by: Fusion (runfusion.ai) --- packages/dashboard/app/components/__tests__/App.test.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/dashboard/app/components/__tests__/App.test.tsx b/packages/dashboard/app/components/__tests__/App.test.tsx index af042f0bef..169ebe4c7c 100644 --- a/packages/dashboard/app/components/__tests__/App.test.tsx +++ b/packages/dashboard/app/components/__tests__/App.test.tsx @@ -4352,8 +4352,13 @@ describe("App board branch filters", () => { rerender(); await waitForAppShell(); - fireEvent.click(screen.getByTestId("desktop-header-search-btn")); - + /* + * FNXC:BoardSearch 2026-07-04-13:30: The non-mobile search panel intentionally stays open + * across a same-instance rerender (Header's isNonMobileSearchOpen state is not project-scoped), + * so the toggle button correctly unmounts once the panel is open (see canShowNonMobileSearchToggle + * in Header.tsx) and there is no button left to re-click here. The branch-filter selects remain + * rendered while the panel is open, so read them directly instead of re-clicking the toggle. + */ expect((screen.getByTestId("working-branch-filter") as HTMLSelectElement).value).toBe(""); expect((screen.getByTestId("target-branch-filter") as HTMLSelectElement).value).toBe(""); expect(localStorage.getItem(scopedProjectKey(WORKING_BRANCH_FILTER_STORAGE_KEY, projectTwoId))).toBeNull();