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
+1 -1
View File
@@ -22,7 +22,7 @@
"dependencies": {
"@backstage/catalog-model": "^0.7.0",
"@backstage/core": "^0.5.0",
"@backstage/plugin-catalog": "^0.2.14",
"@backstage/plugin-catalog-common-react": "^0.0.1",
"@backstage/theme": "^0.2.2",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
@@ -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;