fix: align note list header actions

This commit is contained in:
lucaronin
2026-04-12 22:29:36 +02:00
parent a4397d48de
commit de91167a28
3 changed files with 80 additions and 29 deletions

View File

@@ -123,6 +123,27 @@ describe('NoteList rendering', () => {
expect(screen.getByTitle('Create new note')).toBeInTheDocument()
})
it('uses matching ghost icon button styling for note-list header actions', () => {
renderNoteList({
entries: makeBookTypeEntries(['Priority'], { properties: { Priority: 'High' } }),
selection: { kind: 'filter', filter: 'inbox' },
inboxNoteListProperties: null,
onUpdateInboxNoteListProperties: () => undefined,
})
const buttons = [
screen.getByTitle('Search notes'),
screen.getByTitle('Customize Inbox columns'),
screen.getByTitle('Create new note'),
]
for (const button of buttons) {
expect(button).toHaveAttribute('data-size', 'icon-xs')
expect(button).toHaveAttribute('data-variant', 'ghost')
expect(button).toHaveClass('h-7', 'w-7', 'text-muted-foreground', 'hover:bg-accent')
}
})
it('shows backlinks from outgoing links in entity view', () => {
const entriesWithBacklink = mockEntries.map((entry) =>
entry.path === mockEntries[2].path ? { ...entry, outgoingLinks: ['Build Laputa App'] } : entry,