diff --git a/e2e/smoke.spec.ts b/e2e/smoke.spec.ts
index b49961f..e53b6a9 100644
--- a/e2e/smoke.spec.ts
+++ b/e2e/smoke.spec.ts
@@ -1,19 +1,25 @@
import { test, expect } from "@playwright/test"
let cspViolations: string[]
+let pageErrors: string[]
test.beforeEach(({ page }) => {
cspViolations = []
+ pageErrors = []
page.on("console", (msg) => {
const text = msg.text()
if (text.includes("Content Security Policy") || text.includes("Refused to")) {
cspViolations.push(text)
}
})
+ page.on("pageerror", (err) => {
+ pageErrors.push(err.message)
+ })
})
test.afterEach(() => {
expect(cspViolations).toEqual([])
+ expect(pageErrors).toEqual([])
})
test("admin signs in, sees dashboard and alerts", async ({ page }) => {
@@ -27,4 +33,8 @@ test("admin signs in, sees dashboard and alerts", async ({ page }) => {
await page.goto("/alerts")
await expect(page.getByRole("main")).toBeVisible()
+
+ await page.goto("/dashboard/widgets")
+ await expect(page.getByRole("heading", { name: "Widget Library" })).toBeVisible()
+ await expect(page.getByRole("heading", { name: "Alert Severity" })).toBeVisible()
})
diff --git a/src/app/(dashboard)/dashboard/widgets/page.tsx b/src/app/(dashboard)/dashboard/widgets/page.tsx
index d548ce8..40be2ba 100644
--- a/src/app/(dashboard)/dashboard/widgets/page.tsx
+++ b/src/app/(dashboard)/dashboard/widgets/page.tsx
@@ -3,6 +3,7 @@ import { getDashboardData } from "@/lib/dashboard"
import { prisma } from "@/lib/prisma"
import { WIDGETS } from "@/lib/widgetRegistry"
import { WidgetLibrary } from "@/components/dashboard/WidgetLibrary"
+import { DetailDrawerProvider } from "@/contexts/DetailDrawerContext"
import { StatsRow } from "@/components/dashboard/StatsRow"
import { TrendChart } from "@/components/dashboard/TrendChart"
import { DataTypeBreakdown } from "@/components/dashboard/DataTypeBreakdown"
@@ -86,10 +87,12 @@ export default async function WidgetsPage() {
}
return (
-
+
+
+
)
}