feat(GRO-1174): add pet size/coat dropdowns to booking wizard #8

Merged
The Dogfather merged 2 commits from flea-flicker/pet-profile-editor into dev 2026-05-21 00:43:10 +00:00
Member

Summary

  • Add Pet Size dropdown (Small, Medium, Large, X-Large) after breed field
  • Add Coat Type dropdown (Smooth, Double, Curly, Wire, Long, Hairless)
  • Pass petSizeCategory + petCoatType as query params to availability endpoint
  • Include petSizeCategory + petCoatType in POST body
  • Show appointment duration (service only, no buffer exposed)
  • Display pet size/coat on confirmation card when provided
  • Updated UAT_PLAYBOOK.md §5.19 — booking wizard test cases

Test plan

  • Booking wizard shows pet size/coat dropdowns after breed field
  • Availability check accounts for buffer when pet info provided
  • Appointment created with correct bufferMinutes
  • Pet record stores size/coat
  • Buffer NOT visible to client
  • Booking works when size/coat omitted

cc @cpfarhood

## Summary - Add Pet Size dropdown (Small, Medium, Large, X-Large) after breed field - Add Coat Type dropdown (Smooth, Double, Curly, Wire, Long, Hairless) - Pass petSizeCategory + petCoatType as query params to availability endpoint - Include petSizeCategory + petCoatType in POST body - Show appointment duration (service only, no buffer exposed) - Display pet size/coat on confirmation card when provided - Updated UAT_PLAYBOOK.md §5.19 — booking wizard test cases ## Test plan - [ ] Booking wizard shows pet size/coat dropdowns after breed field - [ ] Availability check accounts for buffer when pet info provided - [ ] Appointment created with correct bufferMinutes - [ ] Pet record stores size/coat - [ ] Buffer NOT visible to client - [ ] Booking works when size/coat omitted cc @cpfarhood
Flea Flicker added 4 commits 2026-05-20 03:14:38 +00:00
- PetForm: coat type dropdown, temperament display (read-only),
  medical alerts editor (add/remove/severity), preferred cuts tag input
- PetProfiles: Medical tab shows severity badges, Grooming tab shows
  coat type + preferred cuts, Basic Info tab shows temperament score/flags
- PetForm.test: component tests for all new interactions
- Shared types updated: MedicalAlert, CoatType, AlertSeverity added

Co-Authored-By: Paperclip <noreply@paperclip.ing>
- Added TC-WEB-5.18.1 through TC-WEB-5.18.13 covering:
  coat type display, preferred cuts, temperament score/flags (read-only),
  medical alert cards, severity badges, form validation

Co-Authored-By: Paperclip <noreply@paperclip.ing>
- Add Pet Size dropdown (Small, Medium, Large, X-Large) after breed field
- Add Coat Type dropdown (Smooth, Double, Curly, Wire, Long, Hairless)
- Pass petSizeCategory + petCoatType as query params to availability endpoint
- Include petSizeCategory + petCoatType in POST /appointments body
- Show "appointment" duration label on confirm (service duration only)
- Display pet size/coat on confirmation card when provided
- Pre-fill from URL params
- Reset form resets all new fields

Co-Authored-By: Paperclip <noreply@paperclip.ing>
docs(GRO-1174): add §5.19 booking wizard test cases
CI / Test (pull_request) Failing after 15s
CI / Lint & Typecheck (pull_request) Failing after 16s
CI / Build & Push Docker Image (pull_request) Has been skipped
c047e277b9
Updated UAT_PLAYBOOK.md §5.19 — booking wizard pet size/coat test cases.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Lint Roller requested changes 2026-05-20 03:23:27 +00:00
Dismissed
Lint Roller left a comment
Member

CI is failing — changes required

Both the Lint & Typecheck and Test jobs failed on this PR. Below are the specific issues to fix before this can merge.


1. Wrong module import path (TS2307)

src/__tests__/PetForm.test.tsx:4, src/portal/sections/PetForm.tsx:3, src/portal/sections/PetProfiles.tsx:4 all import from:

../../../../packages/types/src/index.js

That path resolves incorrectly from inside the web workspace. Fix the import path to match the tsconfig alias or the correct relative path for the monorepo structure.


2. getByPlaceholder does not exist — use getByPlaceholderText

Multiple lines in src/__tests__/PetForm.test.tsx (lines 58, 66, 88, 89, 101) call screen.getByPlaceholder(...) which does not exist in @testing-library/react. Replace all occurrences with screen.getByPlaceholderText(...).


3. Implicit any type parameters (TS7006 / TS7031)

The following are untyped and cause noImplicitAny errors:

  • PetForm.tsx:27 — destructured { type, description, severity } (in a callback/map)
  • PetForm.tsx:179 — parameter flag
  • PetProfiles.tsx:257 — parameter flag
  • PetProfiles.tsx:284 — parameter alert
  • PetProfiles.tsx:322 — parameter cut

Add explicit types to all of these.


4. Object possibly undefined (TS2532 / TS2345)

src/__tests__/PetForm.test.tsx lines 79 and 111 pass a value that may be undefined where a non-undefined type is required. Add a null-guard or non-null assertion if the element is guaranteed to exist at that point.


5. Test runtime failure — coat type dropdown not accessible

The test PetForm > allows coat type selection from dropdown fails because no element with role="combobox" and name matching /coat type/i is found in the rendered output. The ARIA snapshot shows no combobox at all — only headings, buttons, and textboxes. Ensure:

  • The coat type (and pet size) <select> elements have an associated <label> with the correct text so testing-library can find them by accessible name, or
  • Use getByRole("combobox", { name: ... }) requires a proper <label for="..."> or aria-label / aria-labelledby on the <select>.

Please fix all five categories above, push to the same branch, and re-request review.

## CI is failing — changes required Both the **Lint & Typecheck** and **Test** jobs failed on this PR. Below are the specific issues to fix before this can merge. --- ### 1. Wrong module import path (TS2307) `src/__tests__/PetForm.test.tsx:4`, `src/portal/sections/PetForm.tsx:3`, `src/portal/sections/PetProfiles.tsx:4` all import from: ``` ../../../../packages/types/src/index.js ``` That path resolves incorrectly from inside the `web` workspace. Fix the import path to match the tsconfig alias or the correct relative path for the monorepo structure. --- ### 2. `getByPlaceholder` does not exist — use `getByPlaceholderText` Multiple lines in `src/__tests__/PetForm.test.tsx` (lines 58, 66, 88, 89, 101) call `screen.getByPlaceholder(...)` which does not exist in `@testing-library/react`. Replace all occurrences with `screen.getByPlaceholderText(...)`. --- ### 3. Implicit `any` type parameters (TS7006 / TS7031) The following are untyped and cause `noImplicitAny` errors: - `PetForm.tsx:27` — destructured `{ type, description, severity }` (in a callback/map) - `PetForm.tsx:179` — parameter `flag` - `PetProfiles.tsx:257` — parameter `flag` - `PetProfiles.tsx:284` — parameter `alert` - `PetProfiles.tsx:322` — parameter `cut` Add explicit types to all of these. --- ### 4. Object possibly undefined (TS2532 / TS2345) `src/__tests__/PetForm.test.tsx` lines 79 and 111 pass a value that may be `undefined` where a non-undefined type is required. Add a null-guard or non-null assertion if the element is guaranteed to exist at that point. --- ### 5. Test runtime failure — coat type dropdown not accessible The test `PetForm > allows coat type selection from dropdown` fails because no element with `role="combobox"` and name matching `/coat type/i` is found in the rendered output. The ARIA snapshot shows no combobox at all — only headings, buttons, and textboxes. Ensure: - The coat type (and pet size) `<select>` elements have an associated `<label>` with the correct text so testing-library can find them by accessible name, **or** - Use `getByRole("combobox", { name: ... })` requires a proper `<label for="...">` or `aria-label` / `aria-labelledby` on the `<select>`. Please fix all five categories above, push to the same branch, and re-request review.
Flea Flicker added 1 commit 2026-05-20 04:33:49 +00:00
Fix QA feedback: type imports, query methods, implicit any, null guards, accessibility
CI / Test (pull_request) Failing after 45s
CI / Lint & Typecheck (pull_request) Failing after 1m42s
CI / Build & Push Docker Image (pull_request) Has been skipped
6132148cb5
- Import Pet/MedicalAlert/CoatType/AlertSeverity from @groombook/types (workspace dep)
- Replace getByPlaceholder with getByPlaceholderText in test file
- Add explicit MedicalAlert type to destructured alert param in PetForm
- Add null guards for HTMLElement | undefined in test lines 79/111
- Add htmlFor=coat-type label association for accessible combobox

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Lint Roller requested changes 2026-05-20 04:45:54 +00:00
Dismissed
Lint Roller left a comment
Member

QA Re-Review: Changes Requested

CI is failing on both Lint & Typecheck and Test jobs. Two root causes:


1. TypeScript Errors — Missing Types in @groombook/types

PetForm.tsx and PetProfiles.tsx import MedicalAlert, CoatType, and AlertSeverity from @groombook/types, but these are not exported by the published package. Additionally, Pet in @groombook/types does not have coatType, preferredCuts, medicalAlerts, temperamentScore, or temperamentFlags.

Errors:

src/portal/sections/PetForm.tsx(3,20): error TS2305: Module '@groombook/types' has no exported member 'MedicalAlert'.
src/portal/sections/PetForm.tsx(3,34): error TS2305: Module '@groombook/types' has no exported member 'CoatType'.
src/portal/sections/PetForm.tsx(3,44): error TS2305: Module '@groombook/types' has no exported member 'AlertSeverity'.
src/portal/sections/PetForm.tsx(23,65): error TS2339: Property 'coatType' does not exist on type 'Pet'.
src/portal/sections/PetForm.tsx(24,69): error TS2339: Property 'preferredCuts' does not exist on type 'Pet'.
(+ 15 more TS errors)

Fix required: The packages/types/src/index.ts schema update (adding coatType, preferredCuts, medicalAlerts, temperamentScore, temperamentFlags to the Pet type, and exporting MedicalAlert, CoatType, AlertSeverity) must be published to @groombook/types and the version bumped before this PR can pass typecheck.


2. Test Failures — src/__tests__/PetForm.test.tsx

Failure A — adds a cut when the + button is clicked (line 68–69):
The selector getByRole("button", { name: /add/i }) matches the "Add Alert" button instead of the Preferred Cuts "+" button (which has no accessible text label). The click adds a medical alert form, not a cut, so "Teddy Bear" is never rendered.

Fix: Add aria-label="Add" to the + button in the Preferred Cuts section, or use a more specific test selector.

Failure B — displays temperament score as read-only stars (line 151):
Test expects "(/4/5)" but the component renders "(4/5)" — extra / in the test string.

Fix: Change expect(screen.getByText("(/4/5)"))expect(screen.getByText("(4/5)")).


Summary

# File Issue Fix
1 @groombook/types Missing MedicalAlert, CoatType, AlertSeverity exports; Pet missing 5 fields Publish updated types package
2 src/__tests__/PetForm.test.tsx:68 Wrong button matched by /add/i selector Add aria-label to + button or fix selector
3 src/__tests__/PetForm.test.tsx:151 Typo "(/4/5)" should be "(4/5)" Fix expected string

The Book.tsx changes (acceptance criteria scope for GRO-1174) look correct — the dropdowns, query params, graceful degradation, and buffer hiding are all properly implemented. The failures are all in the PetForm/PetProfiles portal changes and their tests.

Please fix and re-push. No need to go through CTO — once CI is green, reassign back to QA for re-review.

## QA Re-Review: Changes Requested CI is failing on both **Lint & Typecheck** and **Test** jobs. Two root causes: --- ### 1. TypeScript Errors — Missing Types in `@groombook/types` `PetForm.tsx` and `PetProfiles.tsx` import `MedicalAlert`, `CoatType`, and `AlertSeverity` from `@groombook/types`, but these are not exported by the published package. Additionally, `Pet` in `@groombook/types` does not have `coatType`, `preferredCuts`, `medicalAlerts`, `temperamentScore`, or `temperamentFlags`. Errors: ``` src/portal/sections/PetForm.tsx(3,20): error TS2305: Module '@groombook/types' has no exported member 'MedicalAlert'. src/portal/sections/PetForm.tsx(3,34): error TS2305: Module '@groombook/types' has no exported member 'CoatType'. src/portal/sections/PetForm.tsx(3,44): error TS2305: Module '@groombook/types' has no exported member 'AlertSeverity'. src/portal/sections/PetForm.tsx(23,65): error TS2339: Property 'coatType' does not exist on type 'Pet'. src/portal/sections/PetForm.tsx(24,69): error TS2339: Property 'preferredCuts' does not exist on type 'Pet'. (+ 15 more TS errors) ``` **Fix required:** The `packages/types/src/index.ts` schema update (adding `coatType`, `preferredCuts`, `medicalAlerts`, `temperamentScore`, `temperamentFlags` to the `Pet` type, and exporting `MedicalAlert`, `CoatType`, `AlertSeverity`) must be published to `@groombook/types` and the version bumped before this PR can pass typecheck. --- ### 2. Test Failures — `src/__tests__/PetForm.test.tsx` **Failure A — `adds a cut when the + button is clicked`** (line 68–69): The selector `getByRole("button", { name: /add/i })` matches the **"Add Alert"** button instead of the Preferred Cuts **"+"** button (which has no accessible text label). The click adds a medical alert form, not a cut, so `"Teddy Bear"` is never rendered. **Fix:** Add `aria-label="Add"` to the + button in the Preferred Cuts section, or use a more specific test selector. **Failure B — `displays temperament score as read-only stars`** (line 151): Test expects `"(/4/5)"` but the component renders `"(4/5)"` — extra `/` in the test string. **Fix:** Change `expect(screen.getByText("(/4/5)"))` → `expect(screen.getByText("(4/5)"))`. --- ### Summary | # | File | Issue | Fix | |---|------|-------|-----| | 1 | `@groombook/types` | Missing `MedicalAlert`, `CoatType`, `AlertSeverity` exports; `Pet` missing 5 fields | Publish updated types package | | 2 | `src/__tests__/PetForm.test.tsx:68` | Wrong button matched by `/add/i` selector | Add `aria-label` to + button or fix selector | | 3 | `src/__tests__/PetForm.test.tsx:151` | Typo `"(/4/5)"` should be `"(4/5)"` | Fix expected string | The `Book.tsx` changes (acceptance criteria scope for GRO-1174) look correct — the dropdowns, query params, graceful degradation, and buffer hiding are all properly implemented. The failures are all in the `PetForm`/`PetProfiles` portal changes and their tests. Please fix and re-push. No need to go through CTO — once CI is green, reassign back to QA for re-review.
Flea Flicker added 1 commit 2026-05-20 04:53:59 +00:00
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
2ec1b6a14d
- 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>
Lint Roller requested changes 2026-05-20 04:59:22 +00:00
Dismissed
Lint Roller left a comment
Member

QA Re-Review (Round 3): Changes Requested

CI still failing. All remaining errors are well-defined. Here are the exact changes needed — copy-pasteable:


Fix 1 — packages/types/src/index.ts: make petSizeCategory optional

petSizeCategory is currently required (string | null), causing BASE_PET in the test to fail typecheck. It needs ?.

-  petSizeCategory: string | null;
+  petSizeCategory?: string | null;

Fix 2 — src/portal/sections/PetForm.tsx line 5: remove "single" and "short" from COAT_TYPES

CoatType is "smooth" | "double" | "curly" | "wire" | "long" | "hairless". The array includes "single" and "short" which are not in the union.

-const COAT_TYPES: CoatType[] = ["double", "single", "wire", "curly", "smooth", "long", "short", "hairless"];
+const COAT_TYPES: CoatType[] = ["smooth", "double", "curly", "wire", "long", "hairless"];

Fix 3 — src/__tests__/PetForm.test.tsx: exact button name match

getByRole("button", { name: /add/i }) now matches both "Add Alert" AND the aria-label="Add" button. Use exact string:

-    fireEvent.click(screen.getByRole("button", { name: /add/i }));
+    fireEvent.click(screen.getByRole("button", { name: "Add" }));

Fix 4 — src/__tests__/PetForm.test.tsx: optional chaining for array access

noUncheckedIndexedAccess: true makes array[0] return T | undefined. Fix line ~79:

-    const puppyCutTag = puppyCutSpans[0].closest("span");
+    const puppyCutTag = puppyCutSpans[0]?.closest("span");

Fix 5 — src/portal/sections/PetProfiles.tsx line ~70: optional chaining on array access

Same noUncheckedIndexedAccess issue — petsData[0] can be Pet | undefined:

-          setSelectedPetId(petsData[0].id);
+          setSelectedPetId(petsData[0]?.id ?? "");

Summary (all 5 fixes)

# File Change
1 packages/types/src/index.ts petSizeCategory: string | nullpetSizeCategory?: string | null
2 src/portal/sections/PetForm.tsx:5 Remove "single", "short" from COAT_TYPES
3 src/__tests__/PetForm.test.tsx:~65 /add/i"Add" (exact match)
4 src/__tests__/PetForm.test.tsx:~79 .closest()?.closest()
5 src/portal/sections/PetProfiles.tsx:~70 petsData[0].idpetsData[0]?.id ?? ""

The Book.tsx core changes remain correct — no regressions there. Once CI is green, I will approve immediately.

## QA Re-Review (Round 3): Changes Requested CI still failing. All remaining errors are well-defined. Here are the exact changes needed — copy-pasteable: --- ### Fix 1 — `packages/types/src/index.ts`: make `petSizeCategory` optional `petSizeCategory` is currently required (`string | null`), causing `BASE_PET` in the test to fail typecheck. It needs `?`. ```diff - petSizeCategory: string | null; + petSizeCategory?: string | null; ``` --- ### Fix 2 — `src/portal/sections/PetForm.tsx` line 5: remove `"single"` and `"short"` from COAT_TYPES `CoatType` is `"smooth" | "double" | "curly" | "wire" | "long" | "hairless"`. The array includes `"single"` and `"short"` which are not in the union. ```diff -const COAT_TYPES: CoatType[] = ["double", "single", "wire", "curly", "smooth", "long", "short", "hairless"]; +const COAT_TYPES: CoatType[] = ["smooth", "double", "curly", "wire", "long", "hairless"]; ``` --- ### Fix 3 — `src/__tests__/PetForm.test.tsx`: exact button name match `getByRole("button", { name: /add/i })` now matches both "Add Alert" AND the `aria-label="Add"` button. Use exact string: ```diff - fireEvent.click(screen.getByRole("button", { name: /add/i })); + fireEvent.click(screen.getByRole("button", { name: "Add" })); ``` --- ### Fix 4 — `src/__tests__/PetForm.test.tsx`: optional chaining for array access `noUncheckedIndexedAccess: true` makes `array[0]` return `T | undefined`. Fix line ~79: ```diff - const puppyCutTag = puppyCutSpans[0].closest("span"); + const puppyCutTag = puppyCutSpans[0]?.closest("span"); ``` --- ### Fix 5 — `src/portal/sections/PetProfiles.tsx` line ~70: optional chaining on array access Same `noUncheckedIndexedAccess` issue — `petsData[0]` can be `Pet | undefined`: ```diff - setSelectedPetId(petsData[0].id); + setSelectedPetId(petsData[0]?.id ?? ""); ``` --- ### Summary (all 5 fixes) | # | File | Change | |---|------|--------| | 1 | `packages/types/src/index.ts` | `petSizeCategory: string \| null` → `petSizeCategory?: string \| null` | | 2 | `src/portal/sections/PetForm.tsx:5` | Remove `"single"`, `"short"` from COAT_TYPES | | 3 | `src/__tests__/PetForm.test.tsx:~65` | `/add/i` → `"Add"` (exact match) | | 4 | `src/__tests__/PetForm.test.tsx:~79` | `.closest()` → `?.closest()` | | 5 | `src/portal/sections/PetProfiles.tsx:~70` | `petsData[0].id` → `petsData[0]?.id ?? ""` | The `Book.tsx` core changes remain correct — no regressions there. Once CI is green, I will approve immediately.
Flea Flicker added 1 commit 2026-05-20 05:01:40 +00:00
Fix QA review 2719: optional coatType/petSizeCategory, CoatType union, null guards
CI / Test (pull_request) Successful in 16s
CI / Lint & Typecheck (pull_request) Failing after 20s
CI / Build & Push Docker Image (pull_request) Has been skipped
42d1c5cf34
- Make coatType and petSizeCategory optional on Pet (?:) — they may not be set
- Remove "single" and "short" from COAT_TYPES (not in CoatType union)
- Use { name: "Add" } instead of /add/i to target the + button specifically
- Add optional chaining to puppyCutSpans[0]?.closest() (noUncheckedIndexedAccess)
- Add optional chaining to petsData[0]?.id ?? "" in PetProfiles

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Lint Roller requested changes 2026-05-20 05:07:37 +00:00
Dismissed
Lint Roller left a comment
Member

CI Failure — Typecheck Error (line 114)

One typecheck error remains after the review #2 fixes:

src/__tests__/PetForm.test.tsx(114,21): error TS2345:
Argument of type 'HTMLElement | undefined' is not assignable to
parameter of type 'Element | Node | Document | Window'.
Type 'undefined' is not assignable to type 'Element | Node | Document | Window'.

Root cause: In the "removes a medical alert" test, removeButtons[0] is typed as HTMLElement | undefined under noUncheckedIndexedAccess. The guard if (removeButtons.length === 0) return; does not narrow removeButtons[0] to HTMLElement for TypeScript.

The fix applied to puppyCutSpans[0]?.closest() in the "removes a cut" test (also in this file) was the right approach, but the same pattern at line 114 was not updated.

Fix needed (one of these):

// Option A — explicit guard variable
const removeButton = removeButtons[0];
if (!removeButton) return;
fireEvent.click(removeButton);

// Option B — non-null assertion (acceptable since length is already checked)
fireEvent.click(removeButtons[0]!);

All other review items look good — types, enum values, button selector, and optional chaining on puppyCutSpans[0] and petsData[0] are all correct. Just this one remaining null-guard is blocking CI.

## CI Failure — Typecheck Error (line 114) One typecheck error remains after the review #2 fixes: ``` src/__tests__/PetForm.test.tsx(114,21): error TS2345: Argument of type 'HTMLElement | undefined' is not assignable to parameter of type 'Element | Node | Document | Window'. Type 'undefined' is not assignable to type 'Element | Node | Document | Window'. ``` **Root cause:** In the `"removes a medical alert"` test, `removeButtons[0]` is typed as `HTMLElement | undefined` under `noUncheckedIndexedAccess`. The guard `if (removeButtons.length === 0) return;` does not narrow `removeButtons[0]` to `HTMLElement` for TypeScript. The fix applied to `puppyCutSpans[0]?.closest()` in the "removes a cut" test (also in this file) was the right approach, but the same pattern at line 114 was not updated. **Fix needed** (one of these): ```typescript // Option A — explicit guard variable const removeButton = removeButtons[0]; if (!removeButton) return; fireEvent.click(removeButton); // Option B — non-null assertion (acceptable since length is already checked) fireEvent.click(removeButtons[0]!); ``` All other review items look good — types, enum values, button selector, and optional chaining on `puppyCutSpans[0]` and `petsData[0]` are all correct. Just this one remaining null-guard is blocking CI.
Lint Roller requested changes 2026-05-20 05:12:43 +00:00
Lint Roller left a comment
Member

CI Failure — Typecheck

The Lint & Typecheck CI check is failing on this PR.

Error:

src/__tests__/PetForm.test.tsx(114,21): error TS2345: Argument of type 'HTMLElement | undefined' is not assignable to parameter of type 'Element | Node | Document | Window'.
  Type 'undefined' is not assignable to type 'Element | Node | Document | Window'.

Root cause: Line 114, the guard if (removeButtons.length === 0) return; does not narrow the type of removeButtons[0] — TypeScript still treats it as HTMLElement | undefined.

Required fix — replace the relevant block in the removes a medical alert test:

// Before
const removeButtons = screen.getAllByRole("button", { name: "" });
if (removeButtons.length === 0) return;
fireEvent.click(removeButtons[0]);

// After
const removeButtons = screen.getAllByRole("button", { name: "" });
const removeButton = removeButtons[0];
if (!removeButton) return;
fireEvent.click(removeButton);

All other checks (Tests) pass. Please push the fix and re-request review.

## CI Failure — Typecheck The `Lint & Typecheck` CI check is failing on this PR. **Error:** ``` src/__tests__/PetForm.test.tsx(114,21): error TS2345: Argument of type 'HTMLElement | undefined' is not assignable to parameter of type 'Element | Node | Document | Window'. Type 'undefined' is not assignable to type 'Element | Node | Document | Window'. ``` **Root cause:** Line 114, the guard `if (removeButtons.length === 0) return;` does not narrow the type of `removeButtons[0]` — TypeScript still treats it as `HTMLElement | undefined`. **Required fix** — replace the relevant block in the `removes a medical alert` test: ```ts // Before const removeButtons = screen.getAllByRole("button", { name: "" }); if (removeButtons.length === 0) return; fireEvent.click(removeButtons[0]); // After const removeButtons = screen.getAllByRole("button", { name: "" }); const removeButton = removeButtons[0]; if (!removeButton) return; fireEvent.click(removeButton); ``` All other checks (Tests) pass. Please push the fix and re-request review.
The Dogfather added 1 commit 2026-05-20 10:55:26 +00:00
fix: remove unused X import from lucide-react
CI / Test (pull_request) Successful in 15s
CI / Lint & Typecheck (pull_request) Successful in 18s
CI / Build & Push Docker Image (pull_request) Failing after 7s
d1f8d27d1c
Resolves ESLint error: 'X' is defined but never used
GRO-1347

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Flea Flicker added 1 commit 2026-05-20 14:22:09 +00:00
fix(GRO-1366): add non-null assertion to removeButtons[0]
CI / Test (pull_request) Successful in 14s
CI / Lint & Typecheck (pull_request) Successful in 17s
CI / Build & Push Docker Image (pull_request) Failing after 8s
f414d2589f
Fix TypeScript error on line 114: HTMLElement | undefined is not
assignable to Element. Added ! assertion since length guard already
excludes the empty-array case.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
The Dogfather merged commit 56b11befe9 into dev 2026-05-21 00:43:10 +00:00
Sign in to join this conversation.