fix(ui): skip launch step when updating provider credentials (#10278)

This commit is contained in:
Alejandro Bailo
2026-03-06 13:39:25 +01:00
committed by GitHub
parent ab92755e47
commit 2e60bb82d5
3 changed files with 11 additions and 4 deletions

View File

@@ -11,6 +11,10 @@ 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)

View File

@@ -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", () => {

View File

@@ -173,6 +173,10 @@ export function useProviderWizardController({
};
const handleTestSuccess = () => {
if (mode === PROVIDER_WIZARD_MODE.UPDATE) {
handleClose();
return;
}
setCurrentStep(PROVIDER_WIZARD_STEP.LAUNCH);
};