feat: support i18n for core component

Signed-off-by: rui ma <ruima@alauda.io>
This commit is contained in:
rui ma
2024-01-08 23:55:00 +08:00
parent 94c4fe2782
commit ff7e12632d
37 changed files with 575 additions and 248 deletions
@@ -16,9 +16,12 @@
import React from 'react';
import { setupServer } from 'msw/node';
import { setupRequestMockHandlers } from '@backstage/test-utils';
import {
renderInTestApp,
setupRequestMockHandlers,
} from '@backstage/test-utils';
import { ComponentEntity } from '@backstage/catalog-model';
import { render, waitFor } from '@testing-library/react';
import { waitFor } from '@testing-library/react';
import { EntityVaultCard } from './EntityVaultCard';
import { EntityProvider } from '@backstage/plugin-catalog-react';
@@ -40,7 +43,7 @@ describe('EntityVaultCard', () => {
};
it('should render missing entity annotation', async () => {
const rendered = render(
const rendered = await renderInTestApp(
<EntityProvider entity={entityAnnotationMissing}>
<EntityVaultCard />
</EntityProvider>,