diff --git a/packages/sanity/src/core/form/inputs/files/FileInput/__tests__/fileInput.test.tsx b/packages/sanity/src/core/form/inputs/files/FileInput/__tests__/fileInput.test.tsx index d7aaf58479c9..967935505420 100644 --- a/packages/sanity/src/core/form/inputs/files/FileInput/__tests__/fileInput.test.tsx +++ b/packages/sanity/src/core/form/inputs/files/FileInput/__tests__/fileInput.test.tsx @@ -184,7 +184,7 @@ describe('FileInput with empty state', () => { }) await waitFor(() => { - expect(result.queryByText(`inputs.files.common.placeholder.read-only`)).toBeInTheDocument() + expect(result.queryByText('Read only')).toBeInTheDocument() }) }) diff --git a/packages/sanity/test/testUtils/TestProvider.tsx b/packages/sanity/test/testUtils/TestProvider.tsx index fa1ee4021b6d..efc92b75a838 100644 --- a/packages/sanity/test/testUtils/TestProvider.tsx +++ b/packages/sanity/test/testUtils/TestProvider.tsx @@ -2,11 +2,15 @@ import React from 'react' import {SanityClient} from '@sanity/client' import {LayerProvider, studioTheme, ThemeProvider, ToastProvider} from '@sanity/ui' import { + LocaleProviderBase, ResourceCacheProvider, SingleWorkspace, SourceProvider, + usEnglishLocale, WorkspaceProvider, } from '../../src/core' +import {prepareI18n} from '../../src/core/i18n/i18nConfig' +import {studioDefaultLocaleResources} from '../../src/core/i18n/bundles/studio' import {getMockWorkspace} from './getMockWorkspaceFromConfig' interface TestProviderOptions { @@ -17,18 +21,30 @@ interface TestProviderOptions { export async function createTestProvider({client, config}: TestProviderOptions = {}) { const workspace = await getMockWorkspace({client, config}) + const locales = [usEnglishLocale] + const {i18next} = prepareI18n({ + projectId: 'test', + dataset: 'test', + name: 'test', + i18n: {bundles: [studioDefaultLocaleResources]}, + }) + + await i18next.init() + function TestProvider({children}: {children: React.ReactNode}) { return ( - - - - - {children} - - - - + + + + + + {children} + + + + + ) }