Skip to content

Commit 51ca6ff

Browse files
Merge pull request #13354 from Lucifergene/OCPBUGS-23543-Deploy-Image-option-missing
OCPBUGS-23543: Deployment option is missing in 'Deploy Image'
2 parents 8fc1217 + c9ba694 commit 51ca6ff

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

frontend/packages/dev-console/src/components/import/DeployImageForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import { FormFooter, FlexForm, FormBody } from '@console/shared/src/components/f
77
import { hasSampleQueryParameter } from '../../utils/samples';
88
import AdvancedSection from './advanced/AdvancedSection';
99
import AppSection from './app/AppSection';
10+
import { DeploySection } from './DeploySection';
1011
import ImageSearchSection from './image-search/ImageSearchSection';
1112
import { DeployImageFormProps } from './import-types';
1213
import IconSection from './section/IconSection';
13-
import ResourceSection from './section/ResourceSection';
1414

1515
const DeployImageForm: React.FC<FormikProps<FormikValues> & DeployImageFormProps> = ({
1616
values,
@@ -39,7 +39,7 @@ const DeployImageForm: React.FC<FormikProps<FormikValues> & DeployImageFormProps
3939
/>
4040
{showAdvancedSections && (
4141
<>
42-
<ResourceSection />
42+
<DeploySection values={values} />
4343
<AdvancedSection values={values} />
4444
</>
4545
)}

frontend/packages/dev-console/src/components/import/DeploySection.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ export const DeploySection: React.FC<DeploySectionProps> = ({ values, appResourc
1818
<FormSection title={t('devconsole~Deploy')} fullWidth>
1919
<ResourceSection />
2020

21-
<ExpandableSection toggleText={t('devconsole~Show advanced Deployment option')}>
21+
<ExpandableSection
22+
isWidthLimited
23+
toggleText={t('devconsole~Show advanced Deployment option')}
24+
>
2225
<DeploymentConfigSection
2326
namespace={values.project.name}
2427
resource={appResources?.editAppResource?.data}

frontend/packages/dev-console/src/components/import/__tests__/DeployImage.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import AdvancedSection from '../advanced/AdvancedSection';
1313
import AppSection from '../app/AppSection';
1414
import DeployImage from '../DeployImage';
1515
import DeployImagePage from '../DeployImagePage';
16+
import { DeploySection } from '../DeploySection';
1617
import ImageSearchSection from '../image-search/ImageSearchSection';
17-
import ResourceSection from '../section/ResourceSection';
1818

1919
jest.mock('@console/shared/src/hooks/post-form-submit-action', () => ({
2020
usePostFormSubmitAction: () => () => {},
@@ -135,8 +135,8 @@ describe('Deploy Image Test', () => {
135135
it('should load correct app section', () => {
136136
expect(deployImageWrapper.find(AppSection).exists()).toBe(true);
137137
});
138-
it('should load correct resource section', () => {
139-
expect(deployImageWrapper.find(ResourceSection).exists()).toBe(true);
138+
it('should load correct Deploy section', () => {
139+
expect(deployImageWrapper.find(DeploySection).exists()).toBe(true);
140140
});
141141
it('should load correct advanced section', () => {
142142
expect(deployImageWrapper.find(AdvancedSection).exists()).toBe(true);

frontend/packages/dev-console/src/components/import/__tests__/DeployImageForm.spec.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { formikFormProps } from '@console/shared/src/test-utils/formik-props-uti
55
import AdvancedSection from '../advanced/AdvancedSection';
66
import AppSection from '../app/AppSection';
77
import DeployImageForm from '../DeployImageForm';
8+
import { DeploySection } from '../DeploySection';
89
import ImageSearchSection from '../image-search/ImageSearchSection';
910
import IconSection from '../section/IconSection';
1011

@@ -26,6 +27,7 @@ describe('DeployImageForm', () => {
2627
expect(wrapper.find(ImageSearchSection).exists()).toBe(true);
2728
expect(wrapper.find(IconSection).exists()).toBe(true);
2829
expect(wrapper.find(AppSection).exists()).toBe(true);
30+
expect(wrapper.find(DeploySection).exists()).toBe(true);
2931
expect(wrapper.find(AdvancedSection).exists()).toBe(true);
3032
expect(wrapper.find(FormFooter).exists()).toBe(true);
3133
});

0 commit comments

Comments
 (0)