src: Rename "V2" folders to just Wizard

This replaces all occurences of "CreateImageWizardV2" with just "CreateImageWizard" as it is the only version now.
This commit is contained in:
regexowl 2024-07-16 17:10:37 +02:00 committed by Ondřej Ezr
parent b1e5a8c7c6
commit 4fb37c187e
93 changed files with 20 additions and 22 deletions

View file

@ -189,7 +189,7 @@ https://github.com/RedHatInsights/image-builder-frontend/blob/c84b493eba82ce83a7
##### Mocking flags for tests
Flags can be mocked for the unit tests to access some feature. Checkout:
https://github.com/osbuild/image-builder-frontend/blob/9a464e416bc3769cfc8e23b62f1dd410eb0e0455/src/test/Components/CreateImageWizardV2/CreateImageWizard.test.tsx#L49
https://github.com/osbuild/image-builder-frontend/blob/9a464e416bc3769cfc8e23b62f1dd410eb0e0455/src/test/Components/CreateImageWizard/CreateImageWizard.test.tsx#L49
If the two possible code path accessible via the toggles are defined in the code
base, then it's good practice to test the two of them. If not, only test what's

View file

@ -18,7 +18,7 @@ import { useNavigate } from 'react-router-dom';
import { BlueprintResponse } from '../../store/imageBuilderApi';
import { wizardState } from '../../store/wizardSlice';
import { resolveRelPath } from '../../Utilities/path';
import { mapRequestToState } from '../CreateImageWizardV2/utilities/requestMapper';
import { mapRequestToState } from '../CreateImageWizard/utilities/requestMapper';
interface ImportBlueprintModalProps {
setShowImportModal: React.Dispatch<React.SetStateAction<boolean>>;

View file

@ -10,11 +10,9 @@ import { useFlagWithEphemDefault } from './Utilities/useGetEnvironment';
const LandingPage = lazy(() => import('./Components/LandingPage/LandingPage'));
const ImportImageWizard = lazy(
() => import('./Components/CreateImageWizardV2/ImportImageWizard')
);
const CreateImageWizardV2 = lazy(
() => import('./Components/CreateImageWizardV2')
() => import('./Components/CreateImageWizard/ImportImageWizard')
);
const CreateImageWizard = lazy(() => import('./Components/CreateImageWizard'));
export const Router = () => {
const edgeParityFlag = useFlag('edgeParity.image-list');
@ -48,7 +46,7 @@ export const Router = () => {
path="imagewizard/:composeId?"
element={
<Suspense>
<CreateImageWizardV2 />
<CreateImageWizard />
</Suspense>
}
/>

View file

@ -12,22 +12,22 @@ import {
} from './imageBuilderApi';
import { ActivationKeys } from './rhsmApi';
import { FileSystemPartitionMode } from '../Components/CreateImageWizardV2/steps/FileSystem';
import { FileSystemPartitionMode } from '../Components/CreateImageWizard/steps/FileSystem';
import {
Partition,
Units,
} from '../Components/CreateImageWizardV2/steps/FileSystem/FileSystemConfiguration';
} from '../Components/CreateImageWizard/steps/FileSystem/FileSystemConfiguration';
import {
GroupWithRepositoryInfo,
IBPackageWithRepositoryInfo,
} from '../Components/CreateImageWizardV2/steps/Packages/Packages';
import { AwsShareMethod } from '../Components/CreateImageWizardV2/steps/TargetEnvironment/Aws';
import { AzureShareMethod } from '../Components/CreateImageWizardV2/steps/TargetEnvironment/Azure';
} from '../Components/CreateImageWizard/steps/Packages/Packages';
import { AwsShareMethod } from '../Components/CreateImageWizard/steps/TargetEnvironment/Aws';
import { AzureShareMethod } from '../Components/CreateImageWizard/steps/TargetEnvironment/Azure';
import {
GcpAccountType,
GcpShareMethod,
} from '../Components/CreateImageWizardV2/steps/TargetEnvironment/Gcp';
import { V1ListSourceResponseItem } from '../Components/CreateImageWizardV2/types';
} from '../Components/CreateImageWizard/steps/TargetEnvironment/Gcp';
import { V1ListSourceResponseItem } from '../Components/CreateImageWizard/types';
import { RHEL_9, X86_64 } from '../constants';
import { RootState } from '.';

View file

@ -5,7 +5,7 @@ import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { rest } from 'msw';
import CreateImageWizard from '../../../Components/CreateImageWizardV2';
import CreateImageWizard from '../../../Components/CreateImageWizard';
import LandingPage from '../../../Components/LandingPage/LandingPage';
import { IMAGE_BUILDER_API } from '../../../constants';
import { emptyGetBlueprints } from '../../fixtures/blueprints';

View file

@ -6,7 +6,7 @@ import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { rest } from 'msw';
import CreateImageWizard from '../../../Components/CreateImageWizardV2/CreateImageWizard';
import CreateImageWizard from '../../../Components/CreateImageWizard/CreateImageWizard';
import ShareImageModal from '../../../Components/ShareImageModal/ShareImageModal';
import { PROVISIONING_API } from '../../../constants';
import { server } from '../../mocks/server';

View file

@ -5,7 +5,7 @@ import '@testing-library/jest-dom';
import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import CreateImageWizard from '../../../Components/CreateImageWizardV2/CreateImageWizard';
import CreateImageWizard from '../../../Components/CreateImageWizard/CreateImageWizard';
import ShareImageModal from '../../../Components/ShareImageModal/ShareImageModal';
import { clickNext, renderCustomRoutesWithReduxRouter } from '../../testUtils';

View file

@ -6,7 +6,7 @@ import type { Router as RemixRouter } from '@remix-run/router';
import { screen, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import CreateImageWizard from '../../../Components/CreateImageWizardV2/CreateImageWizard';
import CreateImageWizard from '../../../Components/CreateImageWizard/CreateImageWizard';
import {
clickBack,
clickNext,

View file

@ -17,7 +17,7 @@ import {
openAndDismissSaveAndBuildModal,
} from './wizardTestUtils';
import CreateImageWizard from '../../../Components/CreateImageWizardV2/CreateImageWizard';
import CreateImageWizard from '../../../Components/CreateImageWizard/CreateImageWizard';
import ShareImageModal from '../../../Components/ShareImageModal/ShareImageModal';
import { PROVISIONING_API, RHSM_API } from '../../../constants';
import { server } from '../../mocks/server';

View file

@ -4,7 +4,7 @@ import '@testing-library/jest-dom';
import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import CreateImageWizard from '../../../../../Components/CreateImageWizardV2/CreateImageWizard';
import CreateImageWizard from '../../../../../Components/CreateImageWizard/CreateImageWizard';
import {
AARCH64,
CENTOS_9,

View file

@ -4,7 +4,7 @@ import { screen, waitFor } from '@testing-library/react';
import { userEvent } from '@testing-library/user-event';
import { MockedRequest } from 'msw';
import ImageWizard from '../../../Components/CreateImageWizardV2';
import ImageWizard from '../../../Components/CreateImageWizard';
import { RHEL_9 } from '../../../constants';
import {
CreateBlueprintRequest,

View file

@ -6,7 +6,7 @@ import userEvent from '@testing-library/user-event';
import { Provider } from 'react-redux';
import { createMemoryRouter, RouterProvider } from 'react-router-dom';
import ImportImageWizard from '../Components/CreateImageWizardV2/ImportImageWizard';
import ImportImageWizard from '../Components/CreateImageWizard/ImportImageWizard';
import LandingPage from '../Components/LandingPage/LandingPage';
import ShareImageModal from '../Components/ShareImageModal/ShareImageModal';
import { middleware, reducer } from '../store';