From 8eb25c88f33c7a628ca36f2237e04754dae6b928 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Mar 2026 17:56:17 +0000 Subject: [PATCH] Fix movement indicator arrow count assertion to exclude sort header arrows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit queryAllByText(/↑|↓/) was matching the active sort column's ↑ indicator. Narrow to /[↑↓]\d/ so only movement indicators (↑1, ↓1) are counted. https://claude.ai/code/session_01CuCKFVYbpsKSQoFDcTYfY7 --- app/components/standings/__tests__/StandingsTable.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/standings/__tests__/StandingsTable.test.tsx b/app/components/standings/__tests__/StandingsTable.test.tsx index 38bcb79..7518f55 100644 --- a/app/components/standings/__tests__/StandingsTable.test.tsx +++ b/app/components/standings/__tests__/StandingsTable.test.tsx @@ -151,8 +151,8 @@ describe("StandingsTable", () => { it("should not show indicator for no rank change", () => { renderWithRouter(); - // Only first two teams have rank changes - const arrows = screen.queryAllByText(/↑|↓/); + // Only first two teams have rank changes; use \d to avoid matching sort-header arrows + const arrows = screen.queryAllByText(/[↑↓]\d/); expect(arrows).toHaveLength(2); }); });