From 11e352440f53e53c1a3b0b60d12d410cc13a13e0 Mon Sep 17 00:00:00 2001 From: Gianluca Zuccarelli Date: Mon, 11 Aug 2025 14:53:35 +0000 Subject: [PATCH] Wizard: hide some review items for cockpit frontend Hide some of the steps in the review step that aren't applicable to the cockpit frontend. --- playwright/test.spec.ts | 2 + .../steps/Review/ReviewStep.tsx | 32 ++-- .../steps/Review/ReviewStepTextLists.tsx | 151 ++++++++++-------- 3 files changed, 101 insertions(+), 84 deletions(-) diff --git a/playwright/test.spec.ts b/playwright/test.spec.ts index 0f46028e..cea02c9e 100644 --- a/playwright/test.spec.ts +++ b/playwright/test.spec.ts @@ -121,6 +121,7 @@ test.describe.serial('test', () => { await frame.getByRole('button', { name: 'Review and finish' }).click(); await frame.getByRole('button', { name: 'About packages' }).click(); frame.getByRole('gridcell', { name: 'osbuild-composer' }); + await frame.getByRole('button', { name: 'Close', exact: true }).click(); await frame .getByRole('button', { name: 'Save changes to blueprint' }) .click(); @@ -128,6 +129,7 @@ test.describe.serial('test', () => { await frame.getByRole('button', { name: 'Edit blueprint' }).click(); await frame.getByRole('button', { name: 'About packages' }).click(); frame.getByRole('gridcell', { name: 'osbuild-composer' }); + await frame.getByRole('button', { name: 'Close', exact: true }).click(); await frame.getByRole('button', { name: 'Cancel', exact: true }).click(); frame.getByRole('heading', { name: 'All images' }); }); diff --git a/src/Components/CreateImageWizard/steps/Review/ReviewStep.tsx b/src/Components/CreateImageWizard/steps/Review/ReviewStep.tsx index 57ccaef8..f1c3a5e6 100644 --- a/src/Components/CreateImageWizard/steps/Review/ReviewStep.tsx +++ b/src/Components/CreateImageWizard/steps/Review/ReviewStep.tsx @@ -499,21 +499,23 @@ const Review = () => { )} - - onToggleFirstBoot(isExpandableFirstBoot) - } - isExpanded={isExpandableFirstBoot} - isIndented - data-testid='firstboot-expandable' - > - - + {!process.env.IS_ON_PREMISE && ( + + onToggleFirstBoot(isExpandableFirstBoot) + } + isExpanded={isExpandableFirstBoot} + isIndented + data-testid='firstboot-expandable' + > + + + )} {(blueprintName || blueprintDescription) && ( { <> - <> - - Repeatable build - - - - } + {!process.env.IS_ON_PREMISE && ( + <> + - - - {!useLatest && !isLoading && isSuccess && hasSnapshotDateAfter ? ( - - ) : ( - '' - )} - - - - Custom repositories - - - {customRepositories.length + recommendedRepositories.length > 0 ? ( - } + + + {!useLatest && + !isLoading && + isSuccess && + hasSnapshotDateAfter ? ( + + ) : ( + '' + )} + + + )} + {!process.env.IS_ON_PREMISE && ( + <> + - - - ) : ( - 0 - )} - + Custom repositories + + + {customRepositories.length + recommendedRepositories.length > + 0 ? ( + } + > + + + ) : ( + 0 + )} + + + )} Additional packages