test(mobile): settings smoke test; docs: capture points to blob-upload

- settings.test.tsx mirrors auth/home import smoke pattern
- Capture screen comment: future uploads via api/blob-upload

Made-with: Cursor
This commit is contained in:
Saravana Achu Mac 2026-03-31 01:51:07 -07:00
parent 6620e5dabb
commit 370e96fa45
2 changed files with 38 additions and 0 deletions

View File

@ -6,6 +6,8 @@ import { useWorkspaceStore, type WorkspaceState } from '../../store/workspace-st
import { OFFLINE_QUEUE_MAX_RETRIES, OFFLINE_QUEUE_MAX_SIZE } from '../../lib/offline-queue';
import { colors } from '../../theme';
/** File/image uploads should go through `api/blob-upload` (shared `blobClient`) when implemented. */
export default function CaptureScreen() {
const [title, setTitle] = useState('');
const [body, setBody] = useState('');

View File

@ -0,0 +1,36 @@
import { beforeEach, describe, expect, it, vi } from 'vitest';
import React, { isValidElement } from 'react';
vi.mock('expo-router', () => ({
router: { replace: vi.fn() },
}));
vi.mock('../../lib/feedback-client', () => ({
getFeedbackClient: () => ({
submitWithScreenshot: vi.fn().mockResolvedValue(undefined),
}),
}));
vi.mock('../../store/auth-store', () => ({
useAuthStore: (selector: (state: { email: string | null; signOut: () => void }) => unknown) =>
selector({ email: 'test@example.com', signOut: vi.fn() }),
}));
import SettingsScreen from './settings';
describe('SettingsScreen', () => {
beforeEach(() => {
vi.clearAllMocks();
});
it('is a valid React component', () => {
expect(typeof SettingsScreen).toBe('function');
const element = React.createElement(SettingsScreen);
expect(isValidElement(element)).toBe(true);
});
it('exports as default', () => {
expect(SettingsScreen).toBeDefined();
expect(SettingsScreen.name).toBe('SettingsScreen');
});
});