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:
@@ -91,7 +91,7 @@ export function AvatarStep({ avatarInfo, setAvatarInfo, errors, setErrors, onGen
|
||||
};
|
||||
|
||||
return (
|
||||
<Stack gap={8}>
|
||||
<Stack gap={8} data-testid="avatar-creation-form">
|
||||
{/* Photo Upload */}
|
||||
<Stack>
|
||||
<Text as="label" size="sm" weight="medium" color="text-gray-300" block mb={3}>
|
||||
@@ -100,6 +100,7 @@ export function AvatarStep({ avatarInfo, setAvatarInfo, errors, setErrors, onGen
|
||||
<Stack direction="row" gap={6}>
|
||||
{/* Upload Area */}
|
||||
<Stack
|
||||
data-testid="photo-upload-area"
|
||||
onClick={() => fileInputRef.current?.click()}
|
||||
flex={1}
|
||||
display="flex"
|
||||
@@ -126,6 +127,7 @@ export function AvatarStep({ avatarInfo, setAvatarInfo, errors, setErrors, onGen
|
||||
accept="image/*"
|
||||
onChange={handleFileSelect}
|
||||
display="none"
|
||||
data-testid="photo-upload-input"
|
||||
/>
|
||||
|
||||
{avatarInfo.isValidating ? (
|
||||
@@ -144,6 +146,7 @@ export function AvatarStep({ avatarInfo, setAvatarInfo, errors, setErrors, onGen
|
||||
objectFit="cover"
|
||||
fullWidth
|
||||
fullHeight
|
||||
data-testid="photo-preview"
|
||||
/>
|
||||
</Stack>
|
||||
<Text size="sm" color="text-performance-green" block>
|
||||
@@ -199,11 +202,12 @@ export function AvatarStep({ avatarInfo, setAvatarInfo, errors, setErrors, onGen
|
||||
Racing Suit Color
|
||||
</Stack>
|
||||
</Text>
|
||||
<Stack flexDirection="row" flexWrap="wrap" gap={2}>
|
||||
<Stack flexDirection="row" flexWrap="wrap" gap={2} data-testid="suit-color-options">
|
||||
{SUIT_COLORS.map((color) => (
|
||||
<Button
|
||||
key={color.value}
|
||||
type="button"
|
||||
data-testid={`suit-color-${color.value}`}
|
||||
onClick={() => setAvatarInfo({ ...avatarInfo, suitColor: color.value })}
|
||||
rounded="lg"
|
||||
transition
|
||||
@@ -235,6 +239,7 @@ export function AvatarStep({ avatarInfo, setAvatarInfo, errors, setErrors, onGen
|
||||
<Stack>
|
||||
<Button
|
||||
type="button"
|
||||
data-testid="generate-avatars-btn"
|
||||
variant="primary"
|
||||
onClick={onGenerateAvatars}
|
||||
disabled={avatarInfo.isGenerating || avatarInfo.isValidating}
|
||||
|
||||
Reference in New Issue
Block a user