diff --git a/frontend/src/components/common/modals/__snapshots__/common-modal.test.tsx.snap b/frontend/src/components/common/modals/__snapshots__/common-modal.test.tsx.snap index bf2744106..f9151276c 100644 --- a/frontend/src/components/common/modals/__snapshots__/common-modal.test.tsx.snap +++ b/frontend/src/components/common/modals/__snapshots__/common-modal.test.tsx.snap @@ -95,7 +95,9 @@ exports[`CommonModal render correctly with i18nTitle 1`] = ` > testText @@ -115,7 +117,9 @@ exports[`CommonModal render correctly with title 1`] = ` > testText diff --git a/frontend/src/components/common/modals/common-modal.test.tsx b/frontend/src/components/common/modals/common-modal.test.tsx index 736fd64ee..5b4d42949 100644 --- a/frontend/src/components/common/modals/common-modal.test.tsx +++ b/frontend/src/components/common/modals/common-modal.test.tsx @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: AGPL-3.0-only */ +import { mockI18n } from '../../markdown-renderer/test-utils/mock-i18n' import { CommonModal } from './common-modal' import { fireEvent, render, screen } from '@testing-library/react' import React from 'react' @@ -13,6 +14,10 @@ describe('CommonModal', () => { jest.resetModules() }) + beforeAll(async () => { + await mockI18n() + }) + it('does not render if show is false', () => { const view = render(testText) expect(view.container).toMatchSnapshot()