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:
parent
26b51cc28b
commit
8eb25c88f3
1 changed files with 2 additions and 2 deletions
|
|
@ -151,8 +151,8 @@ describe("StandingsTable", () => {
|
||||||
it("should not show indicator for no rank change", () => {
|
it("should not show indicator for no rank change", () => {
|
||||||
renderWithRouter(<StandingsTable standings={mockStandings} leagueId={mockLeagueId} seasonId={mockSeasonId} />);
|
renderWithRouter(<StandingsTable standings={mockStandings} leagueId={mockLeagueId} seasonId={mockSeasonId} />);
|
||||||
|
|
||||||
// Only first two teams have rank changes
|
// Only first two teams have rank changes; use \d to avoid matching sort-header arrows
|
||||||
const arrows = screen.queryAllByText(/↑|↓/);
|
const arrows = screen.queryAllByText(/[↑↓]\d/);
|
||||||
expect(arrows).toHaveLength(2);
|
expect(arrows).toHaveLength(2);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue