diff --git a/ui/CHANGELOG.md b/ui/CHANGELOG.md index 5f1d78251f..afc93eee63 100644 --- a/ui/CHANGELOG.md +++ b/ui/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to the **Prowler UI** are documented in this file. +## [1.25.0] (Prowler UNRELEASED) + +### 🔄 Changed + +- Redesign compliance page, client-side search for compliance frameworks, compact scan selector trigger, enhanced compliance cards [(#10767)](https://github.com/prowler-cloud/prowler/pull/10767) +- Allows tenant owners to expel users from their organizations [(#10787)](https://github.com/prowler-cloud/prowler/pull/10787) +- Backward-compatibility middleware redirect from `/sign-up?invitation_token=…` to `/invitation/accept?invitation_token=…`; new invitation emails use `/invitation/accept` directly [(#10797)](https://github.com/prowler-cloud/prowler/pull/10797) + +--- + +## [1.24.4] (Prowler UNRELEASED) + +### 🐞 Fixed + +- Provider wizard no longer advances to the Launch Scan step when rotating credentials [(#10851)](https://github.com/prowler-cloud/prowler/pull/10851) + +--- + ## [1.24.2] (Prowler v5.24.2) ### 🐞 Fixed diff --git a/ui/components/providers/wizard/hooks/use-provider-wizard-controller.test.tsx b/ui/components/providers/wizard/hooks/use-provider-wizard-controller.test.tsx index 187c1e0251..9688c3d684 100644 --- a/ui/components/providers/wizard/hooks/use-provider-wizard-controller.test.tsx +++ b/ui/components/providers/wizard/hooks/use-provider-wizard-controller.test.tsx @@ -153,7 +153,7 @@ describe("useProviderWizardController", () => { expect(onOpenChange).not.toHaveBeenCalled(); }); - it("moves to launch step after a successful connection test in update mode", async () => { + it("closes the wizard after a successful connection test in update mode", async () => { // Given const onOpenChange = vi.fn(); const { result } = renderHook(() => @@ -181,9 +181,10 @@ describe("useProviderWizardController", () => { result.current.handleTestSuccess(); }); - // Then - expect(result.current.currentStep).toBe(PROVIDER_WIZARD_STEP.LAUNCH); - expect(onOpenChange).not.toHaveBeenCalled(); + // Then: credential rotation never surfaces the launch/schedule step + expect(onOpenChange).toHaveBeenCalledWith(false); + expect(refreshMock).toHaveBeenCalledTimes(1); + expect(result.current.currentStep).not.toBe(PROVIDER_WIZARD_STEP.LAUNCH); }); it("does not override launch footer config in the controller", () => { diff --git a/ui/components/providers/wizard/hooks/use-provider-wizard-controller.ts b/ui/components/providers/wizard/hooks/use-provider-wizard-controller.ts index 21fce019aa..40644450c2 100644 --- a/ui/components/providers/wizard/hooks/use-provider-wizard-controller.ts +++ b/ui/components/providers/wizard/hooks/use-provider-wizard-controller.ts @@ -197,6 +197,12 @@ export function useProviderWizardController({ }; const handleTestSuccess = () => { + if ( + useProviderWizardStore.getState().mode === PROVIDER_WIZARD_MODE.UPDATE + ) { + handleClose(); + return; + } setCurrentStep(PROVIDER_WIZARD_STEP.LAUNCH); }; @@ -234,6 +240,7 @@ export function useProviderWizardController({ handleTestSuccess, isOrgDirectEntry, isProviderFlow, + mode, modalTitle, openOrganizationsFlow, orgCurrentStep, diff --git a/ui/components/providers/wizard/provider-wizard-modal.tsx b/ui/components/providers/wizard/provider-wizard-modal.tsx index 9157ca74ce..706045a829 100644 --- a/ui/components/providers/wizard/provider-wizard-modal.tsx +++ b/ui/components/providers/wizard/provider-wizard-modal.tsx @@ -10,7 +10,10 @@ import { DialogHeader, DialogTitle } from "@/components/shadcn/dialog"; import { Modal } from "@/components/shadcn/modal"; import { useScrollHint } from "@/hooks/use-scroll-hint"; import { ORG_SETUP_PHASE, ORG_WIZARD_STEP } from "@/types/organizations"; -import { PROVIDER_WIZARD_STEP } from "@/types/provider-wizard"; +import { + PROVIDER_WIZARD_MODE, + PROVIDER_WIZARD_STEP, +} from "@/types/provider-wizard"; import { useProviderWizardController } from "./hooks/use-provider-wizard-controller"; import { @@ -23,7 +26,12 @@ import { WIZARD_FOOTER_ACTION_TYPE } from "./steps/footer-controls"; import { LaunchStep } from "./steps/launch-step"; import { TestConnectionStep } from "./steps/test-connection-step"; import type { OrgWizardInitialData, ProviderWizardInitialData } from "./types"; -import { WizardStepper } from "./wizard-stepper"; +import { PROVIDER_WIZARD_STEPS, WizardStepper } from "./wizard-stepper"; + +const UPDATE_MODE_WIZARD_STEPS = PROVIDER_WIZARD_STEPS.slice( + 0, + PROVIDER_WIZARD_STEP.LAUNCH, +); interface ProviderWizardModalProps { open: boolean; @@ -47,6 +55,7 @@ export function ProviderWizardModal({ handleTestSuccess, isOrgDirectEntry, isProviderFlow, + mode, modalTitle, openOrganizationsFlow, orgCurrentStep, @@ -97,7 +106,14 @@ export function ProviderWizardModal({