From 2d3e84d4be32bc1321714d76dc87487d5a2be419 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Fri, 20 Mar 2026 04:31:45 -0700 Subject: [PATCH] =?UTF-8?q?test(frontend-admin):=20=E2=9C=85=20Add=20mock?= =?UTF-8?q?=20implementation=20for=20@lilith/ui-styled-components=20in=20f?= =?UTF-8?q?rontend=20admin=20test=20setup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../@lilith/ui-styled-components.tsx | 37 +++---------------- 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/features/cms/frontend-admin/__mocks__/@lilith/ui-styled-components.tsx b/features/cms/frontend-admin/__mocks__/@lilith/ui-styled-components.tsx index 89bee16a2..48a1e5ce6 100644 --- a/features/cms/frontend-admin/__mocks__/@lilith/ui-styled-components.tsx +++ b/features/cms/frontend-admin/__mocks__/@lilith/ui-styled-components.tsx @@ -1,15 +1,13 @@ /** * Mock for @lilith/ui-styled-components used in tests. * - * Provides a passthrough `styled` factory so component trees render in jsdom - * without requiring the full ThemeProvider context. All theme accessors in - * styled template literals are ignored at test time — only the rendered HTML - * and component logic are exercised. + * Provides a passthrough `styled` factory and a no-theme ThemeProvider so + * component trees render in jsdom without requiring the full theme shape. + * All theme accessors in styled template literals are ignored at test time + * — only the rendered HTML and component logic are exercised. */ -import React from 'react'; import type { ReactNode } from 'react'; import styledActual, { - ThemeProvider as ThemeProviderActual, createGlobalStyle as createGlobalStyleActual, css as cssActual, keyframes as keyframesActual, @@ -17,33 +15,8 @@ import styledActual, { ServerStyleSheet as ServerStyleSheetActual, } from 'styled-components'; -const theme = { - spacing: { - xs: '4px', - sm: '8px', - md: '16px', - lg: '24px', - xl: '32px', - }, - borderRadius: { - sm: '4px', - md: '6px', - lg: '12px', - xl: '16px', - full: '9999px', - }, - colors: { - primary: { main: '#7c3aed', light: '#a78bfa', dark: '#5b21b6' }, - background: { primary: '#ffffff', secondary: '#f9fafb', tertiary: '#f3f4f6' }, - text: { primary: '#111827', secondary: '#6b7280', muted: '#9ca3af' }, - border: { default: '#e5e7eb', hover: '#d1d5db' }, - }, -}; - function ThemeProvider({ children }: { children: ReactNode }) { - return ( - {children} - ); + return <>{children}; } export default styledActual;