test: add tests for trash notes filtering and UI
- Added filterEntries tests: trash excluded from all/section/topic/archived, trash filter returns only trashed entries - Added NoteList render tests: trash header, TRASHED badge, 30-day warning banner, empty trash state - Updated all test files with trashed/trashedAt fields on VaultEntry mocks - Updated useNoteActions to include trashed/trashedAt on new entries Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -213,7 +213,8 @@ export function useNoteActions(
|
||||
path, filename: `${slug}.md`, title, isA: type,
|
||||
aliases: [], belongsTo: [], relatedTo: [],
|
||||
status: noStatusTypes.has(type) ? null : 'Active',
|
||||
owner: null, cadence: null, archived: false, modifiedAt: now, createdAt: now, fileSize: 0,
|
||||
owner: null, cadence: null, archived: false, trashed: false, trashedAt: null,
|
||||
modifiedAt: now, createdAt: now, fileSize: 0,
|
||||
snippet: '', relationships: {}, icon: null, color: null,
|
||||
}
|
||||
|
||||
@@ -240,7 +241,7 @@ export function useNoteActions(
|
||||
const newEntry: VaultEntry = {
|
||||
path, filename: `${slug}.md`, title: typeName, isA: 'Type',
|
||||
aliases: [], belongsTo: [], relatedTo: [],
|
||||
status: null, owner: null, cadence: null, archived: false,
|
||||
status: null, owner: null, cadence: null, archived: false, trashed: false, trashedAt: null,
|
||||
modifiedAt: now, createdAt: now, fileSize: 0,
|
||||
snippet: '', relationships: {}, icon: null, color: null,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user