Fix QA re-review: add missing types, aria-label, and temperament text
- Add MedicalAlert, AlertSeverity, CoatType, preferredCuts, medicalAlerts, temperamentScore, temperamentFlags to @groombook/types Pet interface - Add aria-label="Add" to the preferred cuts + button - Fix temperament text expectation from "(/4/5)" to "(4/5)" Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,12 @@ export interface Pet {
|
|||||||
cutStyle: string | null;
|
cutStyle: string | null;
|
||||||
shampooPreference: string | null;
|
shampooPreference: string | null;
|
||||||
specialCareNotes: string | null;
|
specialCareNotes: string | null;
|
||||||
|
coatType: string | null;
|
||||||
|
petSizeCategory: string | null;
|
||||||
|
preferredCuts: string[];
|
||||||
|
medicalAlerts: MedicalAlert[];
|
||||||
|
temperamentScore?: number;
|
||||||
|
temperamentFlags?: string[];
|
||||||
customFields: Record<string, string>;
|
customFields: Record<string, string>;
|
||||||
photoKey?: string;
|
photoKey?: string;
|
||||||
photoUploadedAt?: string;
|
photoUploadedAt?: string;
|
||||||
@@ -208,3 +214,14 @@ export interface PaginatedList<T> {
|
|||||||
page: number;
|
page: number;
|
||||||
pageSize: number;
|
pageSize: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type AlertSeverity = "low" | "medium" | "high";
|
||||||
|
|
||||||
|
export interface MedicalAlert {
|
||||||
|
id: string;
|
||||||
|
type: string;
|
||||||
|
description: string;
|
||||||
|
severity: AlertSeverity;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type CoatType = "smooth" | "double" | "curly" | "wire" | "long" | "hairless";
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ describe("PetForm", () => {
|
|||||||
temperamentFlags: ["Anxious", "Good with kids"],
|
temperamentFlags: ["Anxious", "Good with kids"],
|
||||||
};
|
};
|
||||||
render(<PetForm pet={petWithTemperament} onSave={onSave} onCancel={onCancel} />);
|
render(<PetForm pet={petWithTemperament} onSave={onSave} onCancel={onCancel} />);
|
||||||
expect(screen.getByText("(/4/5)")).toBeTruthy();
|
expect(screen.getByText("(4/5)")).toBeTruthy();
|
||||||
expect(screen.getByText("Anxious")).toBeTruthy();
|
expect(screen.getByText("Anxious")).toBeTruthy();
|
||||||
expect(screen.getByText("Good with kids")).toBeTruthy();
|
expect(screen.getByText("Good with kids")).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -262,7 +262,8 @@ export function PetForm({ pet, onSave, onCancel }: Props) {
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={addCut}
|
onClick={addCut}
|
||||||
className="px-3 py-2 border border-stone-200 rounded-lg text-sm text-stone-600 hover:bg-stone-50"
|
aria-label="Add"
|
||||||
|
className="px-3 py-2 border border border-stone-200 rounded-lg text-sm text-stone-600 hover:bg-stone-50"
|
||||||
>
|
>
|
||||||
<Plus size={14} />
|
<Plus size={14} />
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user