Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,34 @@ describe('<TreeCollection />', () => {
})
})

it('should not warn about manually passed styles for a nested collection', async () => {
await render(
<TreeCollection
level={1}
id={1}
name="Coll 1"
collections={[
{
id: 2,
name: 'Coll 2',
expanded: true,
items: [{ id: 1, name: 'Item 1' }]
}
]}
expanded={true}
/>
)
await vi.waitFor(() => {
expect(page.getByText('Item 1').element()).toBeInTheDocument()
})

const calls = [
...consoleWarningMock.mock.calls,
...consoleErrorMock.mock.calls
]
expect(calls.flat().join(' ')).not.toMatch(/styles/i)
})

it('should support the containerRef prop', async () => {
const containerRef = vi.fn()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export class TreeCollectionBase extends Component<

renderCollectionNode(collection: CollectionProps, position: number) {
return (
<TreeCollection
<TreeCollectionBase
{...this.props}
key={`c${position}`}
id={collection.id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export class TreeCollectionBase extends Component<

renderCollectionNode(collection: CollectionProps, position: number) {
return (
<TreeCollection
<TreeCollectionBase
{...this.props}
key={`c${position}`}
id={collection.id}
Expand Down
Loading