Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Merged
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
21 changes: 12 additions & 9 deletions packages/views/src/__tests__/ObjectCalendar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ describe('ObjectCalendar', () => {
{
_id: '1',
title: 'Meeting 1',
start_date: '2024-01-15T10:00:00Z',
end_date: '2024-01-15T11:00:00Z',
start_date: '2026-01-15T10:00:00Z',
end_date: '2026-01-15T11:00:00Z',
},
{
_id: '2',
title: 'Meeting 2',
start_date: '2024-01-20T14:00:00Z',
end_date: '2024-01-20T15:00:00Z',
start_date: '2026-01-20T14:00:00Z',
end_date: '2026-01-20T15:00:00Z',
},
],
}),
Expand Down Expand Up @@ -82,25 +82,28 @@ describe('ObjectCalendar', () => {
});

it('should render with inline data', async () => {
const schemaWithInlineData = {
// Test inline data with the same structure as the mock data
const inlineDataSchema: ObjectGridSchema = {
...mockSchema,
data: {
provider: 'value',
items: [
{
id: '1',
_id: '1',
title: 'Event A',
start_date: '2024-01-15T10:00:00Z',
start_date: '2026-01-15T10:00:00Z',
end_date: '2026-01-15T11:00:00Z',
},
],
},
} as any;

render(<ObjectCalendar schema={schemaWithInlineData} />);
// Don't pass dataSource for inline data
render(<ObjectCalendar schema={inlineDataSchema} />);

await waitFor(() => {
expect(screen.getByText('Event A')).toBeInTheDocument();
});
}, { timeout: 3000 });
});

it('should show error when calendar config is missing', async () => {
Expand Down