feat(v029): NoteCard ai_status='disabled' fallback (raw_text 첫 줄 + summary/tags hide)
This commit is contained in:
@@ -90,6 +90,39 @@ describe('NoteCard — image rendering', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('NoteCard — ai_status=disabled fallback (v0.2.9 Cut B Task 13)', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
cleanup();
|
||||
});
|
||||
|
||||
it('ai_status=disabled: title fallback to raw_text first line, hide summary/tags', () => {
|
||||
const disabledNote: Note = {
|
||||
...baseNote,
|
||||
aiStatus: 'disabled',
|
||||
aiTitle: null,
|
||||
aiSummary: 'should-not-show',
|
||||
tags: [{ name: 't1', source: 'user' }],
|
||||
rawText: '첫 줄 본문\n둘째 줄 본문'
|
||||
};
|
||||
render(<NoteCard note={disabledNote} mode="inbox" onUpdated={vi.fn()} />);
|
||||
expect(screen.getByText('첫 줄 본문')).toBeInTheDocument();
|
||||
expect(screen.queryByText('should-not-show')).toBeNull();
|
||||
expect(screen.queryByText('t1')).toBeNull();
|
||||
});
|
||||
|
||||
it('ai_status=disabled: empty raw → "(빈 메모)" fallback', () => {
|
||||
const disabledNote: Note = {
|
||||
...baseNote,
|
||||
aiStatus: 'disabled',
|
||||
aiTitle: null,
|
||||
rawText: ''
|
||||
};
|
||||
render(<NoteCard note={disabledNote} mode="inbox" onUpdated={vi.fn()} />);
|
||||
expect(screen.getByText('(빈 메모)')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
describe('NoteCard — 이동 메뉴 (v0.2.9 Cut B Task 6)', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
|
||||
Reference in New Issue
Block a user