fix: tests

Signed-off-by: Chris Langhout <clanghout@bol.com>
This commit is contained in:
Chris Langhout
2025-01-04 18:28:54 +02:00
committed by blam
parent 9602eb06ce
commit b7d0347678
2 changed files with 19 additions and 3 deletions
+11
View File
@@ -37,6 +37,7 @@ import fixture5 from '../src/__fixtures__/1-rollouts.json';
import fixture6 from '../src/__fixtures__/3-ingresses.json';
import fixture7 from '../src/__fixtures__/2-statefulsets.json';
import { TestApiProvider } from '@backstage/test-utils';
import { StructuredMetadataTable } from '@backstage/core-components';
const mockEntity: Entity = {
apiVersion: 'backstage.io/v1alpha1',
@@ -136,6 +137,12 @@ class MockKubernetesClient implements KubernetesApi {
}
}
const metadata = {
testA: 'stuff',
testB: { testC: 'stuff' },
testD: [{ testE: 'stuff' }],
};
createDevApp()
.addPage({
path: '/fixture-1',
@@ -223,6 +230,10 @@ createDevApp()
apis={[[kubernetesApiRef, new MockKubernetesClient(fixture7)]]}
>
<EntityProvider entity={mockEntity}>
<StructuredMetadataTable
metadata={metadata}
options={{ nestedValuesAsYaml: true }}
/>
<EntityKubernetesContent />
</EntityProvider>
</TestApiProvider>