OpenSCAP profile info is now correctly loaded into the state and
verified to be in the final request with tests.
I modified the fixtures for the OpenSCAP profiles. My changes ensure we
have a Venn-diagram like overlap when changing from one profile to
another where one package is the same, one package is removed, and one
package is added. The same is true for the services and partitions. For
kernel args it is not so important as that is just a string (as opposed
to an array), so it is enough to be different.
I was able to eliminate a useEffect by replacing it with a lazy query
trigger function. Setting the second arg `preferCacheValue` to `true`
means that a request is only made if cached data is not available.
I modified the Redux reducers a bit to add some additional safety.
`changeFileSystemPartitionMode` is now responsible for initializing the
partitions field in the state by adding the root partition – previously
this was done in the components themselves by dispatching
`addPartition`. This reducer can always be safely dispatched – if the
mode is ‘manual’, dispatching it with a payload of ‘manual’ will not
result in any changes to the state.
`addPackage` is also safer now. When a package is added, the list of
packages is checked. If there is a package with an identical name, the
new package overwrites the previous package. This is useful because the
description may be different for the same package – for instance, when
adding an OpenSCAP package, we use a custom description (‘this package
required by OpenSCAP’).
For the UX the user doesn't really need to know that the services are masked,
rather than disabled in the backend. We can simplify this and show the masked
services as disabled.
Add an optional search parameter to the V1Wizard like so:
`/insights/image-builder/imagewizard?target=iso`
or
`/insights/image-builder/imagewizard?target=qcow`
This results in wizard being opened and iso or qcow target being pre-selected. The Insights assistant chat bot will make use of this feature.
Add an optional search parameter to the wizard like so:
/insights/image-builder/imagewizard?arch=aarch64
This results in the wizard being opened and 'aarch64' being pre-selected as the architecture.
The Insights assistant chat bot and our websites (access.redhat.com and
developers.redhat.com) will make use of this feature.
Relates to HMS-3684
The "Step Details image name invalid for more than 63 chars" is often timing out. The timeout was already increased in V2, this makes the same change for V1.
Adding an optional search parameter to the wizard like so:
/insights/image-builder/imagewizard?release=rhel8
results in the wizard being opened and RHEL 8 being pre-selected as the
release.
The Insights assistant chat bot will make use of this feature.
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.
Components sometimes render slower than tests run which causes failures when the test suite expects elements that did not finish their rendering yet.
This should help to prevent most of possible problems with the rendering speed.
Before, in the Oscap step, the drop down select menu was only listing profile_ids
Now, it shows the profiles names. When the user selects one, the details about the
profile are displayed under the selection, improving user experience.
FIXES# HMS-3087
This adds await to call of asynchronous `setUp()` function. Previously this wasn't awaited which sometimes caused the tests to continue without being properly set up first.
After cleaning up the ESLint plugins a new error for eslint-plugin-testing-library popped up. This PR solves all of the occurences of `Promise returned from async event method `user` must be handled` and removes the `"testing-library/await-async-events": "off"` switch which was temporary put in place.
This new test is complementing the integration testing found in
src/test/Components/CreateImageWizars.*.test.js.
This new test makes sure that the logic within the component itself is
sound without taking care of interacting with other parts of the wizard.
It allows to test more combinations without worrying about combinatory
effects.
Refs HMS-1135
Adding a new select into the images output step had for effet to
mechanically add a new option menu. In order to select the release
menu we have to take now the first option menu of all possibilities.
Refs HMS-1135
There is now a delay between when the user clicks on the architecture
button (or just goes onto the step) and when the targets are being
displayed. This is due to the fact that the data to filter which targets
needs to be displayed has to be fetched from the backend. And during the
meantime a loading spinner is shown.
To adapt to this the code simply waits for the fields to be accessible.
Refs HMS-1135
This commit:
1. Removes the header from the Data Driven Forms wizard
2. Adds padding around the in-page wizard so it is visually consistent
with the images table
3. Refactors the images table header into a re-usable component that is
now used in both the images table and the wizard
4. Allows the repositories table to fill the available vertical space in
the wizard
5. Adjusts the package dual list selectors so that they fill the
available horizontal space in the wizard
There was a mixup on our side between what is a profile and what is a
policy. Long story short, a policy a super set of rules including a
profile. For now the wizard is only able to apply profiles and no
policies on images. So let's fix the terminology there.
When the user clicks on the "create an image" button, the image wizard
shows up replacing the landing page. This allows to keep the quickstart
guides to the right of the wizard while the user is interacting with it.
The compliance step is now tested with two new tests:
- One to test that upon creation, if a user selects a profile, then the
customizations are applied to the file system and package steps
- One to test that upon recreation, the file system and packages
customizations are still present.
HMS-2077