updated tests

Signed-off-by: Alex Rybchenko <arybchenko@box.com>
This commit is contained in:
Alex Rybchenko
2021-10-04 19:01:54 +02:00
committed by blam
parent 590062d521
commit 7c5351791e
7 changed files with 68 additions and 1 deletions
@@ -19,6 +19,7 @@ import {
CatalogApi,
catalogApiRef,
EntityProvider,
entityRouteRef,
} from '@backstage/plugin-catalog-react';
import { renderInTestApp } from '@backstage/test-utils';
import { waitFor } from '@testing-library/react';
@@ -71,6 +72,11 @@ describe('<ConsumedApisCard />', () => {
<ConsumedApisCard />
</EntityProvider>
</Wrapper>,
{
mountedRoutes: {
'/catalog/:namespace/:kind/:name': entityRouteRef,
},
},
);
expect(getByText(/Consumed APIs/i)).toBeInTheDocument();
@@ -116,6 +122,11 @@ describe('<ConsumedApisCard />', () => {
<ConsumedApisCard />
</EntityProvider>
</Wrapper>,
{
mountedRoutes: {
'/catalog/:namespace/:kind/:name': entityRouteRef,
},
},
);
await waitFor(() => {
@@ -19,6 +19,7 @@ import {
CatalogApi,
catalogApiRef,
EntityProvider,
entityRouteRef,
} from '@backstage/plugin-catalog-react';
import { renderInTestApp } from '@backstage/test-utils';
import { waitFor } from '@testing-library/react';
@@ -71,6 +72,11 @@ describe('<HasApisCard />', () => {
<HasApisCard />
</EntityProvider>
</Wrapper>,
{
mountedRoutes: {
'/catalog/:namespace/:kind/:name': entityRouteRef,
},
},
);
expect(getByText('APIs')).toBeInTheDocument();
@@ -116,6 +122,11 @@ describe('<HasApisCard />', () => {
<HasApisCard />
</EntityProvider>
</Wrapper>,
{
mountedRoutes: {
'/catalog/:namespace/:kind/:name': entityRouteRef,
},
},
);
await waitFor(() => {
@@ -19,6 +19,7 @@ import {
CatalogApi,
catalogApiRef,
EntityProvider,
entityRouteRef,
} from '@backstage/plugin-catalog-react';
import { renderInTestApp } from '@backstage/test-utils';
import { waitFor } from '@testing-library/react';
@@ -71,6 +72,11 @@ describe('<ProvidedApisCard />', () => {
<ProvidedApisCard />
</EntityProvider>
</Wrapper>,
{
mountedRoutes: {
'/catalog/:namespace/:kind/:name': entityRouteRef,
},
},
);
expect(getByText(/Provided APIs/i)).toBeInTheDocument();
@@ -116,6 +122,11 @@ describe('<ProvidedApisCard />', () => {
<ProvidedApisCard />
</EntityProvider>
</Wrapper>,
{
mountedRoutes: {
'/catalog/:namespace/:kind/:name': entityRouteRef,
},
},
);
await waitFor(() => {
@@ -19,6 +19,7 @@ import {
CatalogApi,
catalogApiRef,
EntityProvider,
entityRouteRef,
} from '@backstage/plugin-catalog-react';
import { renderInTestApp } from '@backstage/test-utils';
import { waitFor } from '@testing-library/react';
@@ -70,6 +71,11 @@ describe('<ConsumingComponentsCard />', () => {
<ConsumingComponentsCard />
</EntityProvider>
</Wrapper>,
{
mountedRoutes: {
'/catalog/:namespace/:kind/:name': entityRouteRef,
},
},
);
expect(getByText('Consumers')).toBeInTheDocument();
@@ -121,6 +127,11 @@ describe('<ConsumingComponentsCard />', () => {
<ConsumingComponentsCard />
</EntityProvider>
</Wrapper>,
{
mountedRoutes: {
'/catalog/:namespace/:kind/:name': entityRouteRef,
},
},
);
await waitFor(() => {
@@ -19,6 +19,7 @@ import {
CatalogApi,
catalogApiRef,
EntityProvider,
entityRouteRef,
} from '@backstage/plugin-catalog-react';
import { renderInTestApp } from '@backstage/test-utils';
import { waitFor } from '@testing-library/react';
@@ -70,6 +71,11 @@ describe('<ProvidingComponentsCard />', () => {
<ProvidingComponentsCard />
</EntityProvider>
</Wrapper>,
{
mountedRoutes: {
'/catalog/:namespace/:kind/:name': entityRouteRef,
},
},
);
expect(getByText('Providers')).toBeInTheDocument();
@@ -121,6 +127,11 @@ describe('<ProvidingComponentsCard />', () => {
<ProvidingComponentsCard />
</EntityProvider>
</Wrapper>,
{
mountedRoutes: {
'/catalog/:namespace/:kind/:name': entityRouteRef,
},
},
);
await waitFor(() => {