From 8bc340caadc902de108a2376fb5b95db6a5d2683 Mon Sep 17 00:00:00 2001 From: isaac_lindenman Date: Mon, 15 Jan 2024 22:24:47 +0200 Subject: [PATCH] fix: failing tests --- frontend/src/styles/globals.scss | 7 +++++++ frontend/src/styles/landing-page.scss | 8 -------- frontend/tests/mocks.ts | 12 ++++++++++++ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/frontend/src/styles/globals.scss b/frontend/src/styles/globals.scss index 1ea86aa1..1586e1a6 100644 --- a/frontend/src/styles/globals.scss +++ b/frontend/src/styles/globals.scss @@ -100,4 +100,11 @@ div#__next > div { .page-content-container { @apply mx-auto container px-8 2xl:px-0 pb-8; } + .marketing-card { + @apply card shadow-xl shadow-info-content hover:shadow-info rounded-4xl bg-base-300 text-base-content/90 hover:text-base-content transition-shadow duration-700; + } + + .gradient-headline { + @apply text-transparent bg-gradient-to-r from-base-content/50 via-base-content/90 to-base-content/50 hover:text-neutral-content transition-colors ease-in-out duration-500 bg-clip-text; + } } diff --git a/frontend/src/styles/landing-page.scss b/frontend/src/styles/landing-page.scss index 92df4cc4..879bfe87 100644 --- a/frontend/src/styles/landing-page.scss +++ b/frontend/src/styles/landing-page.scss @@ -22,14 +22,6 @@ } } -.marketing-card { - @apply card shadow-xl shadow-info-content hover:shadow-info rounded-4xl bg-base-300 text-base-content/90 hover:text-base-content transition-shadow duration-700; -} - -.gradient-headline { - @apply text-transparent bg-gradient-to-r from-base-content/50 via-base-content/90 to-base-content/50 hover:text-neutral-content transition-colors ease-in-out duration-500 bg-clip-text; -} - .animate-slideUp { animation: slideUp 42s linear infinite; } diff --git a/frontend/tests/mocks.ts b/frontend/tests/mocks.ts index aa13b06d..92959790 100644 --- a/frontend/tests/mocks.ts +++ b/frontend/tests/mocks.ts @@ -173,3 +173,15 @@ beforeEach(() => { mockGroup.mockReset(); process.env.NEXT_PUBLIC_SEGMENT_WRITE_KEY = 'test'; }); +export const unstableSetRequestLocaleMock = vi.fn(); + +vi.mock( + 'next-intl/server', + async (importOriginal: () => Promise>) => { + const original = importOriginal(); + return { + ...original, + unstable_setRequestLocale: unstableSetRequestLocaleMock, + }; + }, +);