This created a new folder for the Azure step and copies components that will be needed:
- AzureAuthButton.tsx
- AzureResouceGroups.tsx
- AzureSourcesSelect.tsx
Adds tests to verify requets for images with names and descriptions are
formulated correctly.
Test functions shared/common to multiple steps were extracted to the
test utilities.
The logic for spying on an API request has been extracted into a new
reusable helper function to make writing tests that need to perform
request assertions easier.
We need to start using `undefined` as the default state for when a value
has not been defined. Previously we had used things like `’’` for string
typed values. But this causes problems later when generating the request
we send to image-builder. Using `undefined` is explicit and will make
generating the requests much easier (as we don’t need to check for `’’`,
determine the intent, and convert it to undefined if necessary).
Explicit is better than implicit.
With that in mind, tests have been added to ensure that the correct
request is sent to the API for every option on the Registration step.
This is facilitated using a new `spyOnRequest()` function. In the
future, we will have similar tests for the rest of the steps.
A few other minor things:
1. We need to get the `store` using `useStore()`
for when we later call `store.getState()` because the tests use a different
store that is configured in the renderer than the one we were importing.
2. In the wizardSlice, a new type RegistrationType is added that provides
additional type safety instead of using `string`.
this commit adds kernel arguments and enabled/disabled services to Oscap step.
and also add to Review step, add some tests to kernel and services as well.
This removes the aspect ratio for chart and sets `maintainAspectRatio` to false.
The aspect ratio was causing problems with the annotation plugin, rendering the currentDate annotation line in a wrong place for some windows sizes.
This created a new folder for the Review step and copies components that will be needed:
- ReviewStep.tsx
- ReviewStepTables.tsx
- ReviewStepTextLists.tsx
Enables Blueprints filtering.
Given this is a server side filtering, it also ads Debounce hook.
This hook enables delay the API request to save server roundtrips.
Refs HMS-3389
This commit fixes the "A component is changing an uncontrolled input to be controlled" error in React components by ensuring input values are consistently initialized as strings. Previously, values initialized as undefined led to inconsistencies in controlled component behavior. By initializing with empty strings or using value={someValue ?? ''}, we ensure that input components remain controlled throughout their lifecycle, complying with React's expectations for controlled components and enhancing overall component stability.
This creates a new folder for the Repositories step and copies over all needed files:
- Repositories.tsx
- RepositoriesStatus.tsx
- RepositoryUnavailable.tsx
This removes a leftover debugging statement and changes `getBy` query to an awaited async `findBy` as this was causing problems in the test when the checked component wasn't immediately available.
This temporarily disables recreating images containing custom repos.
Changes were marked with "Temporarily disable" and "REMOVE" comments to make the revert easier.
This disables all tests testing behaviour of the Repositories step.
All instances were marked with the "Temporarily disable" comment to make the complete revert easier in the future.
This adds the OpenSCAP step to the V2Wizard,
adds new values to the wizardSlice and enables relevant tests in the `CreateImageWizard.test.tsx` test suite
Commit bae6435fd9 adds scaffolding for the
blueprint table. Blueprint features should be hidden behind experimental
flags. The new buttons related to creating blueprints and rebuilding
images in the header were not hidden behind the experimental flag, this
commit fixes that and does so.
bae6435fd9 also changed the header title
from "Image Builder" to "Images". This change has been a long time
coming - it is being left in for now. We may want to revisit the copy in
the popovers to align it as the term "Image Builder" is still being used
in those.