chore(release): v0.3.8 — UX hole 일괄 hotfix 8건
전수 audit 후 핵심 root fix 3 + edge cases 5: ROOT - inbox:set-status IPC 가 pushNoteUpdated emit (이전엔 stale → 호출처별 refreshMeta 필요) - upsertNote 가 current view status 인식 (이전엔 잘못된 status 노트 잔류) - store async 함수 try/catch (이전엔 IPC fail 시 무한 loading) EDGE - restoreNote 가 status='active' 도 갱신 - upsertNote trash 판정 deletedAt → status='trashed' - Modal Escape dismiss 통일 (5개 modal) - OnboardingWizard IPC fail fallback (try/catch + skip) - MoveStatusModal overlay 클릭 close Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -137,6 +137,42 @@ describe('MoveStatusModal', () => {
|
||||
expect(screen.queryByRole('button', { name: '휴지통' })).toBeNull();
|
||||
});
|
||||
|
||||
it('Escape key → onClose 호출', () => {
|
||||
const onClose = vi.fn();
|
||||
render(
|
||||
<MoveStatusModal
|
||||
noteId="n1"
|
||||
rawText="t"
|
||||
summary=""
|
||||
currentStatus="active"
|
||||
onClose={onClose}
|
||||
onMoved={vi.fn()}
|
||||
/>
|
||||
);
|
||||
fireEvent.keyDown(document, { key: 'Escape' });
|
||||
expect(onClose).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('overlay 클릭 → onClose, modal body 클릭 → 무반응', () => {
|
||||
const onClose = vi.fn();
|
||||
render(
|
||||
<MoveStatusModal
|
||||
noteId="n1"
|
||||
rawText="t"
|
||||
summary=""
|
||||
currentStatus="active"
|
||||
onClose={onClose}
|
||||
onMoved={vi.fn()}
|
||||
/>
|
||||
);
|
||||
// body 클릭 (textarea) → onClose 호출 안 됨
|
||||
fireEvent.click(screen.getByRole('textbox'));
|
||||
expect(onClose).not.toHaveBeenCalled();
|
||||
// overlay (dialog) 클릭 → onClose
|
||||
fireEvent.click(screen.getByRole('dialog', { name: '이동' }));
|
||||
expect(onClose).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('빈 사유 → null reason 전달', async () => {
|
||||
const onMoved = vi.fn();
|
||||
render(
|
||||
|
||||
Reference in New Issue
Block a user