Createa @backstage/plugin-catalog-common-react package

This commit is contained in:
Oliver Sand
2021-01-26 18:53:29 +01:00
parent aca1ada8dc
commit 019fe39a08
100 changed files with 488 additions and 228 deletions
@@ -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';
@@ -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;