Fix QA re-review: add missing types, aria-label, and temperament text
CI / Test (pull_request) Failing after 16s
CI / Lint & Typecheck (pull_request) Failing after 18s
CI / Build & Push Docker Image (pull_request) Has been skipped

- 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:
2026-05-20 04:53:52 +00:00
committed by Flea Flicker [agent]
parent 6132148cb5
commit 2ec1b6a14d
3 changed files with 20 additions and 2 deletions
+17
View File
@@ -39,6 +39,12 @@ export interface Pet {
cutStyle: string | null;
shampooPreference: string | null;
specialCareNotes: string | null;
coatType: string | null;
petSizeCategory: string | null;
preferredCuts: string[];
medicalAlerts: MedicalAlert[];
temperamentScore?: number;
temperamentFlags?: string[];
customFields: Record<string, string>;
photoKey?: string;
photoUploadedAt?: string;
@@ -208,3 +214,14 @@ export interface PaginatedList<T> {
page: 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";
+1 -1
View File
@@ -148,7 +148,7 @@ describe("PetForm", () => {
temperamentFlags: ["Anxious", "Good with kids"],
};
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("Good with kids")).toBeTruthy();
});
+2 -1
View File
@@ -262,7 +262,8 @@ export function PetForm({ pet, onSave, onCancel }: Props) {
<button
type="button"
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} />
</button>