diff --git a/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx b/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx
index d39e92c75e..2e1550078f 100644
--- a/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx
+++ b/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx
@@ -52,14 +52,14 @@ describe('
', () => {
it('render MarkdownContent component with CodeSnippet for code blocks', async () => {
const rendered = await renderWithEffects(
- wrapInTestApp(
),
+ wrapInTestApp(
+
,
+ ),
);
- const fp1 = rendered.getByText('jest', { selector: 'span' });
+ const fp1 = await rendered.findByText('jest(test:', { selector: 'span' });
expect(fp1).toBeInTheDocument();
- expect(fp1.className).toEqual('hljs-function');
- const fp2 = rendered.getByText('(test: string)', { selector: 'span' });
+ const fp2 = rendered.getByText('string', { selector: 'span' });
expect(fp2).toBeInTheDocument();
- expect(fp2.className).toEqual('hljs-function');
- expect(rendered.getByText(';', { selector: 'span' })).toBeInTheDocument();
+ expect(rendered.getByText(');', { selector: 'span' })).toBeInTheDocument();
});
});
diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx
index ea3ea3e96f..fe5e76c968 100644
--- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx
+++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreviewCatalogInfoComponent.test.tsx
@@ -45,7 +45,7 @@ const entities: Entity[] = [
];
describe('
', () => {
- it('renders without exploding', async () => {
+ it('renders without exploding', () => {
render(
', () => {
const repositoryUrl = screen.getByText(
'http://my-repository/a/catalog-info.yaml',
);
- const kindText = await screen.findByText('Kind_2');
+ const kindText = screen.getByText(/Kind_2/);
expect(repositoryUrl).toBeInTheDocument();
expect(repositoryUrl).toBeVisible();
expect(kindText).toBeInTheDocument();
expect(kindText).toBeVisible();
});
- it('renders card with custom styles', async () => {
+ it('renders card with custom styles', () => {
const { result } = renderHook(() => useStyles());
render(
@@ -77,14 +77,14 @@ describe('
', () => {
const repositoryUrl = screen.getByText(
'http://my-repository/a/catalog-info.yaml',
);
- const kindText = await screen.findByText('Kind_2');
+ const kindText = screen.getByText(/Kind_2/);
expect(repositoryUrl).toBeInTheDocument();
expect(repositoryUrl).not.toBeVisible();
expect(kindText).toBeInTheDocument();
expect(kindText).not.toBeVisible();
});
- it('renders with custom styles', async () => {
+ it('renders with custom styles', () => {
const { result } = renderHook(() => useStyles());
render(
@@ -98,7 +98,7 @@ describe('
', () => {
const repositoryUrl = screen.getByText(
'http://my-repository/a/catalog-info.yaml',
);
- const kindText = await screen.findByText('Kind_2');
+ const kindText = screen.getByText(/Kind_2/);
expect(repositoryUrl).toBeInTheDocument();
expect(repositoryUrl).toBeVisible();
expect(kindText).toBeInTheDocument();