You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Frontend tests: migrate file browser, server form, server list, terminal and root-level tests to the shared api mock #908
The remaining test files use the shared createApiMock(); after this issue no test file in the frontend has a hand-written api factory.
Context
After the shared helpers exist (blocked-by issue), these files under apps/smart-ssh-community/frontend/src/ still have their own vi.mock("…/api", () => ({ … })) factory:
plus any file the previous migrations missed (grep -rlE 'vi\.mock\("(\.\./|\./|\.\./\.\./)api", *\(\) *=>' src).
Requirements
Same as the previous migration: createApiMock({...overrides}), shared stubs into src/test/fixtures.ts, test cases unchanged.
Add a guard test (src/test/noHandWrittenApiMock.test.ts) that fails when a test file defines a hand-written factory for the api module.
Acceptance Criteria
The grep above returns nothing; the guard test passes and fails on a fixture string with a hand-written factory.
Number of test cases per file unchanged (before/after list in the PR).
npm test, npm run lint and the type-check pass.
Technical Notes
Tests only. FileBrowserPanel.test.tsx and ServerForm*.test.tsx may be split by the component decomposition work at the same time; rebase rather than duplicate.
Activity
4 remaining items