Wizard: Removed nav status override

The override for registration step nav status got removed as it allowed user to continue without selected activation key.
This commit is contained in:
regexowl 2025-04-02 16:01:23 +02:00 committed by Klara Simickova
parent e9b73c55a4
commit ba4b45c4cd
2 changed files with 2 additions and 14 deletions

View file

@ -9,10 +9,7 @@ import { UNIQUE_VALIDATION_DELAY } from '../../../constants';
import { useLazyGetBlueprintsQuery } from '../../../store/backendApi';
import { useAppSelector } from '../../../store/hooks';
import { BlueprintsResponse } from '../../../store/imageBuilderApi';
import {
useListActivationKeysQuery,
useShowActivationKeyQuery,
} from '../../../store/rhsmApi';
import { useShowActivationKeyQuery } from '../../../store/rhsmApi';
import {
selectBlueprintId,
selectBlueprintName,
@ -124,12 +121,6 @@ export function useRegistrationValidation(): StepValidation {
);
const caCertificate = useAppSelector(selectSatelliteCaCertificate);
const {
isUninitialized,
isFetching: isFetchingKeys,
isError: isErrorKeys,
} = useListActivationKeysQuery();
const { isFetching: isFetchingKeyInfo, isError: isErrorKeyInfo } =
useShowActivationKeyQuery(
{ name: activationKey! },
@ -139,9 +130,6 @@ export function useRegistrationValidation(): StepValidation {
);
if (registrationType !== 'register-later' && !activationKey) {
if (isUninitialized || isFetchingKeys || !isErrorKeys) {
return { errors: {}, disabledNext: false };
}
return {
errors: { activationKey: 'No activation key selected' },
disabledNext: true,

View file

@ -79,7 +79,7 @@ describe('Create Image Wizard', () => {
await screen.findByRole('button', { name: 'Details' });
await screen.findByRole('button', { name: 'Review' });
if (!process.env.IS_ON_PREMISE) {
await screen.findByRole('button', { name: 'Register' });
await screen.findByRole('button', { name: /Register/ });
await screen.findByRole('button', { name: 'OpenSCAP' });
await screen.findByRole('button', { name: 'Repeatable build' });
await screen.findByRole('button', { name: 'Custom repositories' });