summaryrefslogtreecommitdiff
path: root/client/src/components/Schedule.test.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/components/Schedule.test.tsx')
-rw-r--r--client/src/components/Schedule.test.tsx22
1 files changed, 22 insertions, 0 deletions
diff --git a/client/src/components/Schedule.test.tsx b/client/src/components/Schedule.test.tsx
new file mode 100644
index 0000000..76f0f91
--- /dev/null
+++ b/client/src/components/Schedule.test.tsx
@@ -0,0 +1,22 @@
+import '@testing-library/jest-dom';
+import React from 'react';
+import { fireEvent } from '@testing-library/react';
+import { userEvent } from '@testing-library/user-event';
+import { describe, expect, it } from 'vitest';
+import { createMemoryRouter, RouterProvider } from 'react-router-dom';
+import { renderWithProviders } from '../renderWithProviders';
+import routes from '../routes';
+
+describe('Schedule', async () => {
+ const memoryRouter = createMemoryRouter(routes, {
+ initialEntries: ['/schedule'],
+ });
+ it('displays calendar dialog', async () => {
+ const { getByLabelText, findByText } = renderWithProviders(
+ <RouterProvider router={memoryRouter} />
+ );
+
+ fireEvent.click(getByLabelText(/insert invitation/i));
+ expect(await findByText(/calendar invitation/i)).toBeInTheDocument();
+ });
+});