feat: warn on missing note types

This commit is contained in:
lucaronin
2026-04-17 00:44:14 +02:00
parent 072591ad59
commit a84f3c93ca
16 changed files with 732 additions and 268 deletions

View File

@@ -1,8 +1,10 @@
import type { ReactElement } from 'react'
import { beforeAll, beforeEach, describe, expect, it, vi } from 'vitest'
import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'
import { act, fireEvent, render as rtlRender, screen, waitFor } from '@testing-library/react'
import { DynamicPropertiesPanel } from './DynamicPropertiesPanel'
import { FOCUS_NOTE_ICON_PROPERTY_EVENT } from './noteIconPropertyEvents'
import type { VaultEntry } from '../types'
import { TooltipProvider } from '@/components/ui/tooltip'
beforeAll(() => {
global.ResizeObserver = class { observe() {} unobserve() {} disconnect() {} }
@@ -54,6 +56,10 @@ function hasSuggestedSlot(label: string): boolean {
.some((node) => node.textContent?.includes(label))
}
function render(ui: ReactElement) {
return rtlRender(ui, { wrapper: TooltipProvider })
}
describe('DynamicPropertiesPanel system metadata', () => {
const onAddProperty = vi.fn()