Skip to content

Commit 2bb81b1

Browse files
iagodahlemLauraBeatris
authored andcommitted
chore(ui): drop unreachable reset dialog test and stale provider comment
The Reset connection button only appears on the confirmation step, which itself only renders when the enterprise connection exists, so the missing connection branch is not reachable in practice. Removes the matching test and the stale provider setter JSDoc that no longer describes the flow.
1 parent 58aa895 commit 2bb81b1

2 files changed

Lines changed: 0 additions & 21 deletions

File tree

packages/ui/src/components/ConfigureSSO/ConfigureSSOContext.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ export interface ConfigureSSOData {
2828
* made on the Select Provider step.
2929
*/
3030
provider: ProviderType | undefined;
31-
/**
32-
* Sets the local provider selection used by Select Provider before a
33-
* connection has been created. Pass `undefined` to clear the selection
34-
* (e.g. after deleting the connection from the reset dialog).
35-
*/
3631
setProvider: (provider: ProviderType | undefined) => void;
3732
/**
3833
* Ref to the scrollable content container of the wizard.

packages/ui/src/components/ConfigureSSO/__tests__/ResetConnectionDialog.test.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -159,20 +159,4 @@ describe('ResetConnectionDialog', () => {
159159
expect(onClose).toHaveBeenCalledTimes(1);
160160
});
161161
});
162-
163-
it('does not delete when the active enterprise connection is missing', async () => {
164-
resetMocks();
165-
connectionMockState.current = null;
166-
const onClose = vi.fn();
167-
const { wrapper } = await createFixtures();
168-
const { userEvent } = renderDialog(wrapper, { confirmationValue: 'Acme Inc', onClose });
169-
170-
await userEvent.type(screen.getByLabelText(/below to continue/i), 'Acme Inc');
171-
await userEvent.click(screen.getByRole('button', { name: 'Reset connection' }));
172-
173-
expect(deleteEnterpriseConnection).not.toHaveBeenCalled();
174-
expect(setProvider).not.toHaveBeenCalled();
175-
expect(goToStep).not.toHaveBeenCalled();
176-
expect(onClose).not.toHaveBeenCalled();
177-
});
178162
});

0 commit comments

Comments
 (0)