code quality
Some checks failed
CI / lint-typecheck (pull_request) Failing after 13s
CI / tests (pull_request) Has been skipped
CI / contract-tests (pull_request) Has been skipped
CI / e2e-tests (pull_request) Has been skipped
CI / comment-pr (pull_request) Has been skipped
CI / commit-types (pull_request) Has been skipped
Some checks failed
CI / lint-typecheck (pull_request) Failing after 13s
CI / tests (pull_request) Has been skipped
CI / contract-tests (pull_request) Has been skipped
CI / e2e-tests (pull_request) Has been skipped
CI / comment-pr (pull_request) Has been skipped
CI / commit-types (pull_request) Has been skipped
This commit is contained in:
@@ -23,6 +23,7 @@ interface RankingRowProps {
|
||||
}
|
||||
|
||||
export function RankingRow({
|
||||
id,
|
||||
rank,
|
||||
rankDelta,
|
||||
name,
|
||||
@@ -39,7 +40,7 @@ export function RankingRow({
|
||||
<LeaderboardRow
|
||||
onClick={onClick}
|
||||
rank={
|
||||
<Group gap={4} data-testid="standing-position">
|
||||
<Group gap={4} data-testid={`standing-position-${rank}`}>
|
||||
<RankBadge rank={rank} />
|
||||
{rankDelta !== undefined && (
|
||||
<DeltaChip value={rankDelta} type="rank" />
|
||||
@@ -47,7 +48,7 @@ export function RankingRow({
|
||||
</Group>
|
||||
}
|
||||
identity={
|
||||
<Group gap={4} data-testid="standing-driver">
|
||||
<Group gap={4} data-testid={`standing-driver-${id}`}>
|
||||
<Avatar
|
||||
src={avatarUrl}
|
||||
alt={name}
|
||||
@@ -59,6 +60,7 @@ export function RankingRow({
|
||||
variant="high"
|
||||
block
|
||||
truncate
|
||||
data-testid="driver-name"
|
||||
>
|
||||
{name}
|
||||
</Text>
|
||||
@@ -72,8 +74,8 @@ export function RankingRow({
|
||||
</Group>
|
||||
}
|
||||
stats={
|
||||
<Group gap={8} data-testid="standing-points">
|
||||
<Group direction="column" align="end" gap={0}>
|
||||
<Group gap={8} data-testid="standing-stats">
|
||||
<Group direction="column" align="end" gap={0} data-testid="stat-races">
|
||||
<Text variant="low" font="mono" weight="bold" block size="md">
|
||||
{racesCompleted}
|
||||
</Text>
|
||||
@@ -81,7 +83,7 @@ export function RankingRow({
|
||||
Races
|
||||
</Text>
|
||||
</Group>
|
||||
<Group direction="column" align="end" gap={0}>
|
||||
<Group direction="column" align="end" gap={0} data-testid="stat-rating">
|
||||
<Text variant="primary" font="mono" weight="bold" block size="md">
|
||||
{RatingFormatter.format(rating)}
|
||||
</Text>
|
||||
@@ -89,7 +91,7 @@ export function RankingRow({
|
||||
Rating
|
||||
</Text>
|
||||
</Group>
|
||||
<Group direction="column" align="end" gap={0}>
|
||||
<Group direction="column" align="end" gap={0} data-testid="stat-wins">
|
||||
<Text variant="success" font="mono" weight="bold" block size="md">
|
||||
{wins}
|
||||
</Text>
|
||||
|
||||
Reference in New Issue
Block a user