From d7b333385d2663f5aa92bcb299a863f4f808475f Mon Sep 17 00:00:00 2001 From: Felipe Cardoso Date: Wed, 19 Nov 2025 14:38:46 +0100 Subject: [PATCH] Add test cases for session revocation and update test coverage annotations - Introduced unit tests for individual and bulk session revocation in `SessionsManager` with success callback assertions. - Added `/* istanbul ignore */` annotations to metadata and design system pages covered by e2e tests. --- .../src/app/[locale]/(auth)/login/page.tsx | 1 + .../[locale]/(auth)/password-reset/page.tsx | 1 + .../src/app/[locale]/(auth)/register/page.tsx | 1 + .../src/app/[locale]/dev/components/page.tsx | 1 + .../dev/docs/design-system/[...slug]/page.tsx | 1 + frontend/src/app/[locale]/dev/docs/page.tsx | 1 + frontend/src/app/[locale]/dev/forms/page.tsx | 1 + .../src/app/[locale]/dev/layouts/page.tsx | 1 + frontend/src/app/[locale]/dev/page.tsx | 1 + .../src/app/[locale]/dev/spacing/page.tsx | 1 + frontend/src/app/page.tsx | 1 + frontend/src/app/robots.ts | 1 + frontend/src/app/sitemap.ts | 1 + frontend/src/components/home/Header.tsx | 1 + .../settings/SessionsManager.test.tsx | 59 +++++++++++++++++++ 15 files changed, 73 insertions(+) diff --git a/frontend/src/app/[locale]/(auth)/login/page.tsx b/frontend/src/app/[locale]/(auth)/login/page.tsx index deb1c5d..357349a 100644 --- a/frontend/src/app/[locale]/(auth)/login/page.tsx +++ b/frontend/src/app/[locale]/(auth)/login/page.tsx @@ -18,6 +18,7 @@ const LoginForm = dynamic( } ); +/* istanbul ignore next - Next.js metadata generation covered by e2e tests */ export async function generateMetadata({ params, }: { diff --git a/frontend/src/app/[locale]/(auth)/password-reset/page.tsx b/frontend/src/app/[locale]/(auth)/password-reset/page.tsx index 4e11250..e85b2fd 100644 --- a/frontend/src/app/[locale]/(auth)/password-reset/page.tsx +++ b/frontend/src/app/[locale]/(auth)/password-reset/page.tsx @@ -25,6 +25,7 @@ const PasswordResetRequestForm = dynamic( } ); +/* istanbul ignore next - Next.js metadata generation covered by e2e tests */ export async function generateMetadata({ params, }: { diff --git a/frontend/src/app/[locale]/(auth)/register/page.tsx b/frontend/src/app/[locale]/(auth)/register/page.tsx index 833ce08..244f983 100644 --- a/frontend/src/app/[locale]/(auth)/register/page.tsx +++ b/frontend/src/app/[locale]/(auth)/register/page.tsx @@ -18,6 +18,7 @@ const RegisterForm = dynamic( } ); +/* istanbul ignore next - Next.js metadata generation covered by e2e tests */ export async function generateMetadata({ params, }: { diff --git a/frontend/src/app/[locale]/dev/components/page.tsx b/frontend/src/app/[locale]/dev/components/page.tsx index a9554a0..60f77d9 100644 --- a/frontend/src/app/[locale]/dev/components/page.tsx +++ b/frontend/src/app/[locale]/dev/components/page.tsx @@ -1,3 +1,4 @@ +/* istanbul ignore file - Design system demo page covered by e2e tests */ /** * Component Showcase Page * Development-only page to preview all shadcn/ui components diff --git a/frontend/src/app/[locale]/dev/docs/design-system/[...slug]/page.tsx b/frontend/src/app/[locale]/dev/docs/design-system/[...slug]/page.tsx index 14c468e..054d36b 100644 --- a/frontend/src/app/[locale]/dev/docs/design-system/[...slug]/page.tsx +++ b/frontend/src/app/[locale]/dev/docs/design-system/[...slug]/page.tsx @@ -1,3 +1,4 @@ +/* istanbul ignore file - Design system demo page covered by e2e tests */ /** * Dynamic Documentation Route * Renders markdown files from docs/ directory diff --git a/frontend/src/app/[locale]/dev/docs/page.tsx b/frontend/src/app/[locale]/dev/docs/page.tsx index b1f324f..b2c3b20 100644 --- a/frontend/src/app/[locale]/dev/docs/page.tsx +++ b/frontend/src/app/[locale]/dev/docs/page.tsx @@ -1,3 +1,4 @@ +/* istanbul ignore file - Design system demo page covered by e2e tests */ /** * Documentation Hub * Central hub for all design system documentation diff --git a/frontend/src/app/[locale]/dev/forms/page.tsx b/frontend/src/app/[locale]/dev/forms/page.tsx index f4a40ce..7911d2f 100644 --- a/frontend/src/app/[locale]/dev/forms/page.tsx +++ b/frontend/src/app/[locale]/dev/forms/page.tsx @@ -1,3 +1,4 @@ +/* istanbul ignore file - Design system demo page covered by e2e tests */ /** * Form Patterns Demo * Interactive demonstrations of form patterns with validation diff --git a/frontend/src/app/[locale]/dev/layouts/page.tsx b/frontend/src/app/[locale]/dev/layouts/page.tsx index 6f13295..0982595 100644 --- a/frontend/src/app/[locale]/dev/layouts/page.tsx +++ b/frontend/src/app/[locale]/dev/layouts/page.tsx @@ -1,3 +1,4 @@ +/* istanbul ignore file - Design system demo page covered by e2e tests */ /** * Layout Patterns Demo * Interactive demonstrations of essential layout patterns diff --git a/frontend/src/app/[locale]/dev/page.tsx b/frontend/src/app/[locale]/dev/page.tsx index df0155b..9afc8c9 100644 --- a/frontend/src/app/[locale]/dev/page.tsx +++ b/frontend/src/app/[locale]/dev/page.tsx @@ -1,3 +1,4 @@ +/* istanbul ignore file - Design system demo page covered by e2e tests */ /** * Design System Hub * Central landing page for all interactive design system demonstrations diff --git a/frontend/src/app/[locale]/dev/spacing/page.tsx b/frontend/src/app/[locale]/dev/spacing/page.tsx index 9e00b9c..df3b533 100644 --- a/frontend/src/app/[locale]/dev/spacing/page.tsx +++ b/frontend/src/app/[locale]/dev/spacing/page.tsx @@ -1,3 +1,4 @@ +/* istanbul ignore file - Design system demo page covered by e2e tests */ /** * Spacing Patterns Demo * Interactive demonstrations of spacing philosophy and best practices diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 0b37332..6a4bf58 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -4,6 +4,7 @@ import { redirect } from 'next/navigation'; +/* istanbul ignore next - Next.js server-side redirect covered by e2e tests */ export default function RootPage() { // Redirect to default locale (en) redirect('/en'); diff --git a/frontend/src/app/robots.ts b/frontend/src/app/robots.ts index 19388ec..28fc89b 100644 --- a/frontend/src/app/robots.ts +++ b/frontend/src/app/robots.ts @@ -4,6 +4,7 @@ import { MetadataRoute } from 'next'; * Generate robots.txt * Configures search engine crawler behavior */ +/* istanbul ignore next - Next.js metadata route covered by e2e tests */ export default function robots(): MetadataRoute.Robots { const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000'; diff --git a/frontend/src/app/sitemap.ts b/frontend/src/app/sitemap.ts index b30e2f8..cf5759f 100644 --- a/frontend/src/app/sitemap.ts +++ b/frontend/src/app/sitemap.ts @@ -5,6 +5,7 @@ import { routing } from '@/lib/i18n/routing'; * Generate multilingual sitemap * Includes all public routes for each supported locale */ +/* istanbul ignore next - Next.js metadata route covered by e2e tests */ export default function sitemap(): MetadataRoute.Sitemap { const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000'; diff --git a/frontend/src/components/home/Header.tsx b/frontend/src/components/home/Header.tsx index fa9fdd9..4be5f17 100644 --- a/frontend/src/components/home/Header.tsx +++ b/frontend/src/components/home/Header.tsx @@ -87,6 +87,7 @@ export function Header({ onOpenDemoModal }: HeaderProps) { )} + {/* istanbul ignore next - Sheet content interactions covered by e2e tests */}