test(FileEditor, ApprovalBanner): add 30-case FileEditor suite + fix ApprovalBanner mock isolation
FileEditor.test.tsx:
- 30 cases: empty state, file header, dirty badge, download, save button
(root-gated), Cmd+S, Tab indentation, readOnly gating, loading, success
- Uses makeProps() factory to avoid React 19 + vi.fn() module-scope
+ defaultProps issue (prop values resolving to mock objects)
- Uses Object.defineProperty for jsdom textarea selectionStart
- Removes redundant badge-on-change test (covered by other cases)
ApprovalBanner.test.tsx:
- Fix mock isolation: afterEach uses vi.clearAllMocks() instead of
mockRestore().beforeEach re-applies vi.spyOn factory so tests are
resilient to vi.restoreAllMocks() calls from other files
(aria-time-sensitive.test.tsx calls vi.restoreAllMocks() in afterEach)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>