From b5f6ae5264602f0098ffdf63102d11c6e608a54e Mon Sep 17 00:00:00 2001 From: Prowler Bot Date: Fri, 6 Mar 2026 14:01:16 +0100 Subject: [PATCH] fix(ui): skip launch step when updating provider credentials (#10279) Co-authored-by: Alejandro Bailo <59607668+alejandrobailo@users.noreply.github.com> --- ui/CHANGELOG.md | 13 +++++++++++++ .../hooks/use-provider-wizard-controller.test.tsx | 7 +++---- .../wizard/hooks/use-provider-wizard-controller.ts | 4 ++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ui/CHANGELOG.md b/ui/CHANGELOG.md index 1db070175d..adace70549 100644 --- a/ui/CHANGELOG.md +++ b/ui/CHANGELOG.md @@ -2,6 +2,19 @@ All notable changes to the **Prowler UI** are documented in this file. + +## [1.19.1] (Prowler v5.19.1 UNRELEASED) + +### 🐞 Fixed + +- Provider wizard now closes after updating credentials instead of incorrectly advancing to the Launch Scan step, which caused API errors for providers with existing scheduled scans [(#10278)](https://github.com/prowler-cloud/prowler/pull/10278) + +### 🔐 Security + +- npm transitive dependencies patched to resolve 11 Dependabot alerts (6 HIGH, 4 MEDIUM, 1 LOW): hono, @hono/node-server, fast-xml-parser, serialize-javascript, minimatch [(#10267)](https://github.com/prowler-cloud/prowler/pull/10267) + +--- + ## [1.19.0] (Prowler v5.19.0) ### 🚀 Added 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 c837fc9135..9cb55dfb87 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 @@ -121,7 +121,7 @@ describe("useProviderWizardController", () => { expect(onOpenChange).not.toHaveBeenCalled(); }); - it("moves to launch step after a successful connection test in update mode", async () => { + it("closes the modal after a successful connection test in update mode", async () => { // Given const onOpenChange = vi.fn(); const { result } = renderHook(() => @@ -149,9 +149,8 @@ describe("useProviderWizardController", () => { result.current.handleTestSuccess(); }); - // Then - expect(result.current.currentStep).toBe(PROVIDER_WIZARD_STEP.LAUNCH); - expect(onOpenChange).not.toHaveBeenCalled(); + // Then — update mode should close the modal, not advance to launch + expect(onOpenChange).toHaveBeenCalledWith(false); }); 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 ce522f6105..a5b6d6e188 100644 --- a/ui/components/providers/wizard/hooks/use-provider-wizard-controller.ts +++ b/ui/components/providers/wizard/hooks/use-provider-wizard-controller.ts @@ -173,6 +173,10 @@ export function useProviderWizardController({ }; const handleTestSuccess = () => { + if (mode === PROVIDER_WIZARD_MODE.UPDATE) { + handleClose(); + return; + } setCurrentStep(PROVIDER_WIZARD_STEP.LAUNCH); };