chore: change more tests to match yaml display
Signed-off-by: Chris Langhout <clanghout@bol.com>
This commit is contained in:
+4
-4
@@ -40,13 +40,13 @@ describe('DeploymentDrawer', () => {
|
||||
expect(getAllByText('Deployment')).toHaveLength(2);
|
||||
expect(getByText('YAML')).toBeInTheDocument();
|
||||
expect(getByText('Strategy')).toBeInTheDocument();
|
||||
expect(getByText('Rolling Update:')).toBeInTheDocument();
|
||||
expect(getByText(textContentMatcher('Max Surge: 25%'))).toBeInTheDocument();
|
||||
expect(getByText('rollingUpdate:')).toBeInTheDocument();
|
||||
expect(getByText(textContentMatcher('maxSurge: 25%'))).toBeInTheDocument();
|
||||
expect(
|
||||
getByText(textContentMatcher('Max Unavailable: 25%')),
|
||||
getByText(textContentMatcher('maxUnavailable: 25%')),
|
||||
).toBeInTheDocument();
|
||||
expect(
|
||||
getByText(textContentMatcher('Type: RollingUpdate')),
|
||||
getByText(textContentMatcher('type: RollingUpdate')),
|
||||
).toBeInTheDocument();
|
||||
expect(getByText('Min Ready Seconds')).toBeInTheDocument();
|
||||
expect(getByText('???')).toBeInTheDocument();
|
||||
|
||||
@@ -39,10 +39,10 @@ describe('ServiceDrawer', () => {
|
||||
expect(screen.getByText('Cluster IP')).toBeInTheDocument();
|
||||
expect(screen.getByText('Ports')).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByText(textContentMatcher('Target Port: 1997')),
|
||||
screen.getByText(textContentMatcher('targetPort: 1997')),
|
||||
).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByText(textContentMatcher('App: awesome-service')),
|
||||
screen.getByText(textContentMatcher('app: awesome-service')),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
+6
-6
@@ -40,20 +40,20 @@ describe('StatefulSetDrawer', () => {
|
||||
expect(getByText('StatefulSet')).toBeInTheDocument();
|
||||
expect(getByText('YAML')).toBeInTheDocument();
|
||||
expect(
|
||||
getByText(textContentMatcher('Type: RollingUpdate')),
|
||||
getByText(textContentMatcher('type: RollingUpdate')),
|
||||
).toBeInTheDocument();
|
||||
expect(getByText('Rolling Update:')).toBeInTheDocument();
|
||||
expect(getByText(textContentMatcher('Max Surge: 25%'))).toBeInTheDocument();
|
||||
expect(getByText('rollingUpdate:')).toBeInTheDocument();
|
||||
expect(getByText(textContentMatcher('maxSurge: 25%'))).toBeInTheDocument();
|
||||
expect(
|
||||
getByText(textContentMatcher('Max Unavailable: 25%')),
|
||||
getByText(textContentMatcher('maxUnavailable: 25%')),
|
||||
).toBeInTheDocument();
|
||||
expect(getByText('Pod Management Policy')).toBeInTheDocument();
|
||||
expect(getByText('Parallel')).toBeInTheDocument();
|
||||
expect(getByText('Service Name')).toBeInTheDocument();
|
||||
expect(getByText('Selector')).toBeInTheDocument();
|
||||
expect(getByText('Match Labels:')).toBeInTheDocument();
|
||||
expect(getByText('matchLabels:')).toBeInTheDocument();
|
||||
expect(
|
||||
getByText(textContentMatcher('App: dice-roller')),
|
||||
getByText(textContentMatcher('app: dice-roller')),
|
||||
).toBeInTheDocument();
|
||||
expect(getByText('Revision History Limit')).toBeInTheDocument();
|
||||
expect(getByText('10')).toBeInTheDocument();
|
||||
|
||||
@@ -35,6 +35,7 @@ import fixture3 from '../src/__fixtures__/1-cronjobs.json';
|
||||
import fixture4 from '../src/__fixtures__/2-cronjobs.json';
|
||||
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';
|
||||
|
||||
const mockEntity: Entity = {
|
||||
@@ -214,5 +215,18 @@ createDevApp()
|
||||
</TestApiProvider>
|
||||
),
|
||||
})
|
||||
.addPage({
|
||||
path: '/fixture-7',
|
||||
title: 'Fixture 7',
|
||||
element: (
|
||||
<TestApiProvider
|
||||
apis={[[kubernetesApiRef, new MockKubernetesClient(fixture7)]]}
|
||||
>
|
||||
<EntityProvider entity={mockEntity}>
|
||||
<EntityKubernetesContent />
|
||||
</EntityProvider>
|
||||
</TestApiProvider>
|
||||
),
|
||||
})
|
||||
.registerPlugin(kubernetesPlugin)
|
||||
.render();
|
||||
|
||||
Reference in New Issue
Block a user