fix(confidence-engine): correct legal footer layout

This commit is contained in:
2026-09-10 06:40:30 +01:00
parent 27ded883e5
commit b9d49ff277
6 changed files with 18 additions and 8 deletions
+11
View File
@@ -6,6 +6,7 @@ import PrivacyPage from "@/app/privacy/page.jsx";
import TermsPage from "@/app/terms/page.jsx";
import CookiesPage from "@/app/cookies/page.jsx";
import LegalNavigation from "@/components/legal-navigation.jsx";
import RootLayout from "@/app/layout.jsx";
import { middleware } from "@/middleware.js";
describe("public legal pages", () => {
@@ -16,6 +17,16 @@ describe("public legal pages", () => {
])("renders the %s heading", (heading, Page) => {
const html = renderToStaticMarkup(<Page />);
expect(html).toContain(`<h1 class="text-3xl font-bold tracking-tight text-teal-700">${heading}</h1>`);
expect(html).not.toContain('aria-label="Legal information"');
});
it("keeps the root layout as the single legal navigation owner", () => {
const html = renderToStaticMarkup(
<RootLayout>
<PrivacyPage />
</RootLayout>,
);
expect(html.match(/aria-label="Legal information"/g)).toHaveLength(1);
});
it("exposes all public legal links without cookie consent controls", () => {