Createa @backstage/plugin-catalog-common-react package
This commit is contained in:
+4
-4
@@ -13,11 +13,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { renderHook } from '@testing-library/react-hooks';
|
||||
import { useConsumerGroupsForEntity } from './useConsumerGroupsForEntity';
|
||||
import { EntityContext } from '@backstage/plugin-catalog';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityContext } from '@backstage/plugin-catalog-common-react';
|
||||
import { renderHook } from '@testing-library/react-hooks';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { useConsumerGroupsForEntity } from './useConsumerGroupsForEntity';
|
||||
|
||||
describe('useConsumerGroupOffsets', () => {
|
||||
let entity: Entity;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { useEntity } from '@backstage/plugin-catalog';
|
||||
import { useEntity } from '@backstage/plugin-catalog-common-react';
|
||||
import { useMemo } from 'react';
|
||||
import { KAFKA_CONSUMER_GROUP_ANNOTATION } from '../../constants';
|
||||
|
||||
|
||||
+6
-6
@@ -13,19 +13,19 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { renderHook } from '@testing-library/react-hooks';
|
||||
import { EntityContext } from '@backstage/plugin-catalog';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import * as data from './__fixtures__/consumer-group-offsets.json';
|
||||
import { ApiProvider, ApiRegistry, errorApiRef } from '@backstage/core';
|
||||
import { EntityContext } from '@backstage/plugin-catalog-common-react';
|
||||
import { renderHook } from '@testing-library/react-hooks';
|
||||
import { when } from 'jest-when';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import {
|
||||
ConsumerGroupOffsetsResponse,
|
||||
KafkaApi,
|
||||
kafkaApiRef,
|
||||
} from '../../api/types';
|
||||
import { ApiProvider, ApiRegistry, errorApiRef } from '@backstage/core';
|
||||
import { useConsumerGroupsOffsetsForEntity } from './useConsumerGroupsOffsetsForEntity';
|
||||
import { when } from 'jest-when';
|
||||
import * as data from './__fixtures__/consumer-group-offsets.json';
|
||||
|
||||
const consumerGroupOffsets = data as ConsumerGroupOffsetsResponse;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user