feat: add mobile shell and unified search
Some checks failed
ci / 정본·보안·린트·타입·테스트 (push) Failing after 50s
ci / 워크스페이스 빌드 검증 (push) Has been skipped
ci / Supabase Edge Functions + Cloudflare Worker (push) Successful in 20s
ci / .NET API 서버 테스트 (push) Successful in 12s
deploy-site / deploy (push) Successful in 39s
ci / 모바일 린트·타입·Jest (push) Failing after 3h10m31s

This commit is contained in:
Yun Chan 2026-09-28 23:23:36 +09:00
parent f505a03d34
commit 5ca3709b32
98 changed files with 5168 additions and 2093 deletions

View file

@ -0,0 +1,47 @@
import React from 'react'
import { act, create, type ReactTestRenderer } from 'react-test-renderer'
import type { UnifiedSearchResult } from '@d3ro/core/types'
import { NativeThemeProvider, getD3roNativePalette } from '@d3ro/ui-native'
import { UnifiedSearchResultRow } from '../src/components/UnifiedSearchResultRow'
const result: UnifiedSearchResult = {
source: 'meeting',
id: '33333333-3333-4333-8333-333333333333',
title: '주간 회의',
excerpt: '로드맵을 다음 주에 검토합니다.',
matchedField: 'transcript',
occurredAt: Date.parse('2026-09-28T00:00:00.000Z'),
}
describe('UnifiedSearchResultRow', () => {
test('exposes a named button and forwards the source result', () => {
const onPress = jest.fn()
let renderer: ReactTestRenderer | undefined
act(() => {
renderer = create(
<NativeThemeProvider palette={getD3roNativePalette('dark')}>
<UnifiedSearchResultRow
result={result}
title="주간 회의"
sourceLabel="회의"
matchLabel="전사 일치"
dateLabel="2026. 9. 28."
previewFallback="미리 볼 내용이 없습니다."
accessibilityLabel="회의 ‘주간 회의’ 열기"
onPress={onPress}
/>
</NativeThemeProvider>,
)
})
const button = renderer!.root.findByProps({
testID: `unified-search-open-${result.source}-${result.id}`,
})
expect(button.props.accessibilityRole).toBe('button')
expect(button.props.accessibilityLabel).toBe('회의 ‘주간 회의’ 열기')
act(() => button.props.onPress())
expect(onPress).toHaveBeenCalledWith(result)
act(() => renderer!.unmount())
})
})