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:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user