diff --git a/frontend/src/components/RouteState.tsx b/frontend/src/components/RouteState.tsx index f470593..b7d55a0 100644 --- a/frontend/src/components/RouteState.tsx +++ b/frontend/src/components/RouteState.tsx @@ -39,6 +39,8 @@ interface RouteStateProps { onRetry?: () => void retrying?: boolean testId?: string + /** Optional override for the Retry button's data-testid (defaults to none). */ + retryTestId?: string className?: string /** Optional availability strip (stale/limited/partial) above the state body. */ availability?: DataAvailability @@ -72,6 +74,7 @@ export function RouteState({ onRetry, retrying = false, testId, + retryTestId, className = '', availability, children, @@ -113,6 +116,7 @@ export function RouteState({ onClick={onRetry} disabled={retrying} aria-busy={retrying || undefined} + data-testid={retryTestId} > {retrying ? 'Retrying…' : 'Retry'} diff --git a/frontend/src/pages/RaceHubPage.tsx b/frontend/src/pages/RaceHubPage.tsx index 2e3ae7f..1733017 100644 --- a/frontend/src/pages/RaceHubPage.tsx +++ b/frontend/src/pages/RaceHubPage.tsx @@ -122,6 +122,7 @@ export function RaceHubPage({ sessionKey }: Props) { if (!contextQuery.isFetching) void contextQuery.refetch() }} retrying={contextQuery.isFetching} + retryTestId="rh-retry" >