feat: show property kind icons
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { fireEvent, render, screen, waitFor } from '@testing-library/react'
|
||||
import { fireEvent, render, screen, waitFor, within } from '@testing-library/react'
|
||||
import { DynamicPropertiesPanel } from './DynamicPropertiesPanel'
|
||||
import type { VaultEntry } from '../types'
|
||||
import { initDisplayModeOverrides } from '../utils/propertyTypes'
|
||||
@@ -101,4 +101,17 @@ describe('property type icon control', () => {
|
||||
|
||||
expect(screen.queryByDisplayValue('Weekly')).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('shows the relationship icon for relationship-like property rows', () => {
|
||||
render(
|
||||
<DynamicPropertiesPanel
|
||||
entry={makeEntry()}
|
||||
frontmatter={{ belongs_to: 'Project Alpha' }}
|
||||
onUpdateProperty={vi.fn()}
|
||||
/>
|
||||
)
|
||||
|
||||
const row = screen.getByTestId('editable-property')
|
||||
expect(within(row).getByTestId('display-mode-icon-relationship')).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user