Fix movement indicator arrow count assertion to exclude sort header arrows

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
This commit is contained in:
Claude 2026-03-22 17:56:17 +00:00
parent 26b51cc28b
commit 8eb25c88f3
No known key found for this signature in database

View file

@ -151,8 +151,8 @@ describe("StandingsTable", () => {
it("should not show indicator for no rank change", () => {
renderWithRouter(<StandingsTable standings={mockStandings} leagueId={mockLeagueId} seasonId={mockSeasonId} />);
// 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);
});
});