test: authenticated admin E2E tour with smart mock backend (all pages screenshot)

- Rewrote e2e/mock-backend.mjs to return valid auth responses (login + refresh)
- Created e2e/authenticated-tour.spec.ts that logs in and screenshots all 7 admin pages
- Fixed (dashboard-layout)/layout.tsx: added missing NextIntlClientProvider
- All pages render error-free in dark mode with mock data
- Screenshots: dashboard, members, distributions, distribution/new, stock, stock/new, reports
This commit is contained in:
Patrick Plate
2026-06-12 18:38:22 +02:00
parent 09d5ca6db0
commit 7f99e11d9f
10 changed files with 326 additions and 16 deletions
@@ -1,3 +1,6 @@
import { NextIntlClientProvider } from "next-intl"
import { getMessages } from "next-intl/server"
import { Layout } from "@/components/layout"
export default async function DashboardLayout({
@@ -5,5 +8,11 @@ export default async function DashboardLayout({
}: {
children: React.ReactNode
}) {
return <Layout>{children}</Layout>
const messages = await getMessages()
return (
<NextIntlClientProvider messages={messages}>
<Layout>{children}</Layout>
</NextIntlClientProvider>
)
}