From dac0cba3b8b65a7b4ca02ffb8944fc54975999e9 Mon Sep 17 00:00:00 2001 From: Jarrod Lilkendey Date: Tue, 28 May 2024 17:24:00 +1000 Subject: [PATCH] added more pages to react library tests --- __tests__/ui/tests/schedules.test.tsx | 22 ++++++++++++++++++++++ __tests__/ui/tests/track.test.tsx | 14 ++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 __tests__/ui/tests/schedules.test.tsx create mode 100644 __tests__/ui/tests/track.test.tsx diff --git a/__tests__/ui/tests/schedules.test.tsx b/__tests__/ui/tests/schedules.test.tsx new file mode 100644 index 0000000..4b4ea2b --- /dev/null +++ b/__tests__/ui/tests/schedules.test.tsx @@ -0,0 +1,22 @@ +import { render, screen } from '@testing-library/react' +// import { mockTools } from '@/__mocks__/mockData' + +import MySchedulesPage from '@/pages/schedules' + +describe('My Schedules Page tests', () => { + test('renders a heading', async () => { + render() + + expect( + screen.getByRole('heading', { name: 'My Schedules' }) + ).toBeInTheDocument() + }) + + test('renders a button', async () => { + render() + + expect( + screen.getByRole('button', { name: 'Create a Schedule' }) + ).toBeInTheDocument() + }) +}) diff --git a/__tests__/ui/tests/track.test.tsx b/__tests__/ui/tests/track.test.tsx new file mode 100644 index 0000000..ae7d875 --- /dev/null +++ b/__tests__/ui/tests/track.test.tsx @@ -0,0 +1,14 @@ +import { render, screen } from '@testing-library/react' +// import { mockTools } from '@/__mocks__/mockData' + +import TimeTrackerPage from '@/pages/track' + +describe('Time Tracker Page tests', () => { + test('renders a heading', async () => { + render() + + expect( + screen.getByRole('heading', { name: 'Time Tracker' }) + ).toBeInTheDocument() + }) +})