)}
```
Task 1: Add helpTextPrefix prop to TextFieldMD3 and fix tooltip placement + hover in FieldRenderer and PasswordFieldsrc/components/ui/TextFieldMD3.tsx, src/components/ui/FieldRenderer.tsx, src/components/ui/PasswordField.tsx
**TextFieldMD3.tsx — Add helpTextPrefix prop:**
1. Add `helpTextPrefix?: React.ReactNode` to `TextFieldMD3Props` interface.
2. Destructure `helpTextPrefix` in the component function.
3. Change the helpText rendering block (lines 65-67) from:
```tsx
{helpText && !error && (
{helpText}
)}
```
To:
```tsx
{helpText && !error && (
{helpTextPrefix}
{helpText}
)}
```
This renders optional inline content (the tooltip icon) to the left of helpText. When `helpTextPrefix` is undefined/null, the flex container still renders correctly with just the `
cd C:/Users/SebastienQUEROL/Documents/projets/Ready2Blob && npx vitest run --reporter=verbose 2>&1 | tail -30
- Tooltip icon renders inline to the left of helpText below the field (not above the field)
- Hovering the tooltip icon shows tooltip text
- Clicking the tooltip icon pins tooltip open; clicking again dismisses
- Mouse-leaving the icon hides tooltip (unless pinned via click)
- All existing tests pass including FieldRenderer aria-label tests
- PasswordField has identical fix
Task 2: Add tests for tooltip hover behavior and helpTextPrefix renderingsrc/components/ui/FieldRenderer.test.tsx, src/components/ui/TextFieldMD3.test.tsx
- Test: Hovering tooltip button shows tooltip text (fireEvent.mouseEnter on button, then expect tooltipText visible)
- Test: Mouse-leaving tooltip button hides tooltip text (fireEvent.mouseLeave, then expect tooltipText not visible)
- Test: Clicking tooltip button pins tooltip open, mouseLeave does NOT hide it
- Test: TextFieldMD3 renders helpTextPrefix inline with helpText when prop provided
- Test: TextFieldMD3 renders helpText normally when helpTextPrefix is not provided
**FieldRenderer.test.tsx — Add hover behavior tests:**
Add a new describe block `'FieldRenderer - tooltip hover behavior'` with these tests:
1. `'hovering tooltip button shows tooltip text'`:
- Render FieldRenderer with `textFieldWithTooltip` (already defined in test file)
- Get tooltip button via `screen.getByRole('button', { name: /more info about bucket name/i })`
- `fireEvent.mouseEnter(tooltipBtn)`
- `expect(screen.getByText('The name of your storage bucket')).toBeDefined()`
2. `'mouse-leaving tooltip button hides tooltip text'`:
- Render, mouseEnter, verify visible, then `fireEvent.mouseLeave(tooltipBtn)`
- `expect(screen.queryByText('The name of your storage bucket')).toBeNull()`
3. `'clicking tooltip button pins it open through mouseLeave'`:
- Render, `fireEvent.click(tooltipBtn)`, `fireEvent.mouseLeave(tooltipBtn)`
- `expect(screen.getByText('The name of your storage bucket')).toBeDefined()` (still visible because pinned)
4. `'clicking pinned tooltip button again dismisses it'`:
- Render, click (pin), click again (unpin)
- `expect(screen.queryByText('The name of your storage bucket')).toBeNull()`
Import `fireEvent` from `@testing-library/react` (add to existing import).
**TextFieldMD3.test.tsx — Add helpTextPrefix tests:**
Add tests in existing file (or create new describe block):
1. `'renders helpTextPrefix inline with helpText'`:
- Render TextFieldMD3 with `helpText="Some help"` and `helpTextPrefix={icon}`
- `expect(screen.getByTestId('prefix')).toBeDefined()`
- `expect(screen.getByText('Some help')).toBeDefined()`
2. `'renders helpText without wrapper issues when helpTextPrefix is undefined'`:
- Render TextFieldMD3 with `helpText="Some help"` and no helpTextPrefix
- `expect(screen.getByText('Some help')).toBeDefined()`
cd C:/Users/SebastienQUEROL/Documents/projets/Ready2Blob && npx vitest run src/components/ui/FieldRenderer.test.tsx src/components/ui/TextFieldMD3.test.tsx --reporter=verbose 2>&1 | tail -40
- All new tooltip hover tests pass (mouseEnter shows, mouseLeave hides, click pins, click again unpins)
- helpTextPrefix rendering test passes
- All pre-existing FieldRenderer and TextFieldMD3 tests still pass
1. `npx vitest run --reporter=verbose` — all tests pass (179+ existing + new tooltip tests)
2. Manual spot-check: tooltip icon appears beside helpText below field, not above field
3. Hover behavior: mouseEnter shows tooltip, mouseLeave hides it, click pins it
- UAT test 7 passes: tooltip info buttons show tooltip text on hover AND icon is positioned beside helpText below the field
- Zero test regressions
- Both FieldRenderer (text-branch + select-branch) and PasswordField have hover support
- TextFieldMD3 has helpTextPrefix prop for extensibility