Chore/test UI#20
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces testing infrastructure and UI improvements for the Evently client application. The changes focus on setting up Vitest for unit testing React components while also making several improvements to routing, styling, and data models.
- Sets up comprehensive testing infrastructure with Vitest, Testing Library, and jsdom
- Removes unused login callback route and simplifies authentication flow
- Refactors data model organization by moving interfaces to a separate directory
Reviewed Changes
Copilot reviewed 39 out of 43 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Adds Vitest configuration and switches from Vite to Vitest config import |
| tsconfig.app.json | Adds type definitions for Vitest globals and Testing Library |
| src/setup-tests.ts | Creates test setup file for jest-dom matchers |
| src/routes/login/index.tsx | Updates default redirect URL from callback to bookings page |
| src/routes/login/callback.tsx | Removes entire login callback route implementation |
| src/routes/healthcheck/index.tsx | Improves styling and accessibility with proper semantic elements |
| src/routes/healthcheck/-index.test.tsx | Adds comprehensive unit tests for the healthcheck page |
| src/routes/gatherings/index.tsx | Updates import path for PageResult interface |
| src/routes/gatherings/-index.test.tsx | Adds unit tests for gatherings page functionality |
| src/routes/__root.tsx | Extracts RouteContext interface and fixes padding class |
| src/routeTree.gen.ts | Auto-generated route tree updates removing callback route |
| src/lib/services/*.ts | Updates import paths for moved PageResult interface |
| src/lib/domains/interfaces/ | New directory structure for interfaces |
| src/lib/components/ | Adds test wrapper components and removes unused dock component |
| package.json | Adds testing dependencies and test script |
Files not reviewed (2)
- src/Evently.Server/Common/Adapters/Data/Migrations/20250827143433_RenameAccountId.Designer.cs: Language not supported
- src/evently.client/pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -1,10 +1,10 @@ | |||
| import { defineConfig } from "vite"; | |||
| import { env } from "process"; | |||
There was a problem hiding this comment.
The 'env' import from 'process' is not used anywhere in this file. Consider removing this unused import to keep the code clean.
| } | ||
|
|
||
| export async function getMockGatherings( | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars |
There was a problem hiding this comment.
Instead of disabling the eslint rule for unused parameters, consider using the TypeScript convention of prefixing the parameter name with an underscore (e.g., '_params') to indicate it's intentionally unused, or remove the parameter name entirely if it's not needed.
| // eslint-disable-next-line @typescript-eslint/no-unused-vars |
|
|
||
| export async function createMockGathering( | ||
| gatheringDto: GatheringReqDto, | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars |
There was a problem hiding this comment.
Similar to the previous comment, instead of disabling the eslint rule, the parameter is already prefixed with underscore. The eslint-disable comment is unnecessary and should be removed.
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | |
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| _coverImg?: File | null |
There was a problem hiding this comment.
Same issue as above - the eslint-disable comment is unnecessary since the parameter is already prefixed with underscore to indicate it's intentionally unused.
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | |
| _coverImg?: File | null | |
| _coverImg?: File | null |
No description provided.