mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-22 06:41:46 +00:00
test(client): expand frontend test suite to 69.1% coverage
Add and extend tests across 32 files (+10 595 lines) covering Admin panels (AuditLog, Backup, DevNotifications, GitHub), Collab (Chat, Notes, Panel, Polls), Planner (DayDetailPanel, DayPlanSidebar), Settings (DisplaySettings, Integrations, MapSettings), Files (FileManager, FilesPage), Map, Layout (DemoBanner, InAppNotificationBell), shared pickers (CustomDateTimePicker, CustomTimePicker), Vacay holidays, pages (Dashboard, Login), unit stores (authStore, inAppNotificationStore), API (authUrl, client integration), and i18n. Also updates sonar-project.properties and MSW trip handlers to support the new cases.
This commit is contained in:
@@ -46,4 +46,14 @@ export const tripsHandlers = [
|
||||
http.get('/api/trips/:id/accommodations', () => {
|
||||
return HttpResponse.json({ accommodations: [] });
|
||||
}),
|
||||
|
||||
http.delete('/api/trips/:id', () => {
|
||||
return HttpResponse.json({ success: true });
|
||||
}),
|
||||
|
||||
http.post('/api/trips/:id/copy', async ({ params, request }) => {
|
||||
const body = await request.json() as Record<string, unknown>;
|
||||
const trip = buildTrip({ id: Number(params.id) + 1000, ...body });
|
||||
return HttpResponse.json({ trip });
|
||||
}),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user