feat: add i18n to plugin-catalog-react

Signed-off-by: mario ma <mario.ma.node@gmail.com>
This commit is contained in:
mario ma
2024-03-05 17:24:27 +08:00
parent c324de8ccd
commit 06c0956207
39 changed files with 526 additions and 170 deletions
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import React from 'react';
import { fireEvent, render } from '@testing-library/react';
import { fireEvent } from '@testing-library/react';
import { CardHeader } from './CardHeader';
import { ThemeProvider } from '@material-ui/core/styles';
import { lightTheme } from '@backstage/theme';
@@ -30,7 +30,7 @@ import { stringifyEntityRef } from '@backstage/catalog-model';
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
describe('CardHeader', () => {
it('should select the correct theme from the theme provider from the header', () => {
it('should select the correct theme from the theme provider from the header', async () => {
// Can't really test what we want here.
// But we can check that we call the getPage theme with the right type of template at least.
const mockTheme = {
@@ -38,7 +38,7 @@ describe('CardHeader', () => {
getPageTheme: jest.fn(lightTheme.getPageTheme),
};
render(
await renderInTestApp(
<TestApiProvider
apis={[
[