From bdbef27728ca616b8e11c5cc657a083364efb6c2 Mon Sep 17 00:00:00 2001 From: alejandrobailo Date: Thu, 2 Jul 2026 18:09:45 +0200 Subject: [PATCH] test(ui): update Lighthouse settings layout assertions --- .../config/business-context-form.tsx | 2 +- .../config/lighthouse-v2-config-page.test.tsx | 21 +++++++++++++------ .../config/lighthouse-v2-config-page.tsx | 2 +- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ui/app/(prowler)/lighthouse/_components/config/business-context-form.tsx b/ui/app/(prowler)/lighthouse/_components/config/business-context-form.tsx index 569ec5936c..6e02d11cad 100644 --- a/ui/app/(prowler)/lighthouse/_components/config/business-context-form.tsx +++ b/ui/app/(prowler)/lighthouse/_components/config/business-context-form.tsx @@ -60,7 +60,7 @@ export function LighthouseV2BusinessContextForm({
diff --git a/ui/app/(prowler)/lighthouse/_components/config/lighthouse-v2-config-page.test.tsx b/ui/app/(prowler)/lighthouse/_components/config/lighthouse-v2-config-page.test.tsx index aa6d6837d0..b5b7ae3de3 100644 --- a/ui/app/(prowler)/lighthouse/_components/config/lighthouse-v2-config-page.test.tsx +++ b/ui/app/(prowler)/lighthouse/_components/config/lighthouse-v2-config-page.test.tsx @@ -108,14 +108,23 @@ describe("LighthouseV2ConfigPage", () => { const settingsSeparator = container.querySelector( '[data-slot="settings-separator"]', ); + const innerCards = settingsCard.querySelectorAll('[data-slot="card"]'); expect(settingsCard).toHaveAttribute("data-slot", "card"); - expect(settingsCard).toHaveClass("w-full", "gap-0", "overflow-hidden"); - expect(settingsCard).not.toHaveClass("mx-auto", "max-w-7xl"); - expect(settingsSeparator).toHaveClass( - "border-t", - "xl:border-t-0", - "xl:border-l", + expect(settingsCard).toHaveClass("w-full", "gap-4", "p-4", "md:p-5"); + expect(settingsCard).not.toHaveClass( + "gap-0", + "overflow-hidden", + "mx-auto", + "max-w-7xl", + ); + expect(settingsSeparator).toBeNull(); + expect(innerCards).toHaveLength(3); + innerCards.forEach((card) => + expect(card).toHaveClass( + "border-border-neutral-tertiary", + "bg-bg-neutral-tertiary", + ), ); expect(settingsCard).toContainElement(openAIProvider); expect(openAIProvider).toHaveAttribute("aria-pressed", "true"); diff --git a/ui/app/(prowler)/lighthouse/_components/config/lighthouse-v2-config-page.tsx b/ui/app/(prowler)/lighthouse/_components/config/lighthouse-v2-config-page.tsx index a86e3c7948..c5e3711c7a 100644 --- a/ui/app/(prowler)/lighthouse/_components/config/lighthouse-v2-config-page.tsx +++ b/ui/app/(prowler)/lighthouse/_components/config/lighthouse-v2-config-page.tsx @@ -152,7 +152,7 @@ export function LighthouseV2ConfigPage({ Configure a provider first to add shared business context.