Fix tests after changes from master.
This commit is contained in:
@@ -57,7 +57,11 @@ describe('<RegisterComponentForm />', () => {
|
||||
) {
|
||||
return await renderInTestApp(
|
||||
<ApiProvider apis={apis}>
|
||||
<RegisterComponentForm nextStep={nextStep} saveConfig={saveConfig} />
|
||||
<RegisterComponentForm
|
||||
nextStep={nextStep}
|
||||
saveConfig={saveConfig}
|
||||
repository="GitHub"
|
||||
/>
|
||||
</ApiProvider>,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -16,9 +16,15 @@
|
||||
import React from 'react';
|
||||
import { msw, renderInTestApp } from '@backstage/test-utils';
|
||||
import { ImportComponentPage } from './ImportComponentPage';
|
||||
import { ApiProvider, ApiRegistry, errorApiRef } from '@backstage/core';
|
||||
import {
|
||||
ApiProvider,
|
||||
ApiRegistry,
|
||||
configApiRef,
|
||||
errorApiRef,
|
||||
} from '@backstage/core';
|
||||
import { catalogApiRef, CatalogClient } from '@backstage/plugin-catalog';
|
||||
import { catalogImportApiRef, CatalogImportClient } from '../api';
|
||||
|
||||
import { fireEvent, screen, waitFor } from '@testing-library/react';
|
||||
|
||||
import { rest } from 'msw';
|
||||
@@ -107,6 +113,17 @@ describe('<ImportComponentPage />', () => {
|
||||
configApi: {} as any,
|
||||
}),
|
||||
],
|
||||
[
|
||||
configApiRef,
|
||||
{
|
||||
getOptional: () => 'Title',
|
||||
getOptionalConfigArray: () => [],
|
||||
has: () => true,
|
||||
getConfig: () => ({
|
||||
has: () => true,
|
||||
}),
|
||||
},
|
||||
],
|
||||
[errorApiRef, mockErrorApi],
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user