Commit graph

54 commits

Author SHA1 Message Date
regexowl
7e83c8ecbb test: Enable OpenSCAP initialized packages tests
This re-enables tests checking initialization of packages upon OpenSCAP profile selection.
2024-04-04 12:34:57 +02:00
regexowl
f71175f69b V2Wizard: Add full bottom pagination to Repositories and Packages
This adds full pagination to the bottom of Repositories and Packages steps which will allow the user to get to the very end of the tables in a case of many results.
2024-04-04 11:35:07 +02:00
regexowl
d2c56391f9 V2Wizard: Update "Too many results" copy
This updates copy shown in a table when too many results are fetched. Also a period was added to the end of the empty state bodies.
2024-04-02 10:59:41 +02:00
Ondrej Ezr
ad8fd5ddc3 Blueprint: Validate Blueprint name is not empty
We are now validating Blueprint name on the backend to be non-empty.
Adds same validation for frontend

Refs HMS-3801
2024-03-25 12:51:33 +01:00
Gianluca Zuccarelli
d57cd95c65 V1Wizard: masked services -> disabled services
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.
2024-03-21 11:16:50 +01:00
lucasgarfield
5dcc3abbd8 V2Wizard: Change search parameter from qcow to qcow2
`target=qcow2` is in better alignment with the UI than `target=qcow`
2024-03-20 18:04:44 +01:00
regexowl
a7cc88af44 V2Wizard: Add search parameter for target selection (HMS-3684)
Add an optional search parameter to the wizard 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.
2024-03-20 18:04:44 +01:00
Simon Steinbeiss
ad25c6bcb7 V2 Wizard: Add search parameter for arch selection
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
2024-03-15 12:22:07 +01:00
mgold1234
430ea83df0 V2 Wizard: Add File System Configuration Step (HMS-2781)
The FSC step is added to the wizard and takes full advantage of Redux
for state management.

This is still a work in progress.

Supported features:
1. Select partition mountpoint prefix (e.g. /var, /home)
2. Edit partition mountpoint suffix (e.g. /home/videogames)
3. Change displayed units (KiB, MiB, GiB)

Supported but buggy features:
1. Edit partition size

Unsupported features:
1. Add partitions
2. Remove partitions
3. Validation
2024-03-08 18:14:33 +01:00
lucasgarfield
6af38141be V2 Wizard Tests: Add tests for release and architecture
Adds tests that ensure the blueprint request is generated correctly for
all releases (rhel 8 & 9, centos 8 & 9) and for both architectures
(x86_64 and aarch64).
2024-03-07 17:03:20 +01:00
lucasgarfield
d6016519e5 Test: useChrome() mocks isBeta() returns true
The previous commit adjusts the necessary feature flags to expose the
new blueprints table and V2 wizard in stage-preview.

This causes tests where isBeta() == false to fail. This commit changes
the relevant useChrome() mocks such that isBeta() returns true.
2024-03-05 19:27:46 +01:00
lucasgarfield
25a5ff7772 V2Wizard/Test: Add docstring to preparePathname helper
preparePathname() is called by the render() test helper function, this
commit adds a docstring (JSDoc format) with examples to document how it
works.
2024-03-04 16:43:55 +01:00
lucasgarfield
ad5d2007bb V2 Wizard: Add search parameter for release selection (HMS-3684)
Adding an optional search parameter to the V2 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.

The render() test utility function had to be updated to accept an
optional searchParams argument.
2024-03-04 16:43:55 +01:00
regexowl
c60e45cd4d test: Remove "Click through all"
This removes the "Click through all" test as it will be replaces by testing the requests for separate customisations.
2024-03-04 16:33:24 +01:00
regexowl
2bed43645d V2Wizard/test: Fix bug on registration step and enable tests
This fixes a bug on the registration step which made the text "Connect to Red Hat Insights" not to get rendered when registering with rhc.

All registration tests were also enabled in CreateImageWizard.test.tsx
2024-03-01 10:49:43 +01:00
regexowl
2bb8da190b test: Re-enable part of AWS tests
This re-enables the rest of AWS tests in CreateImageWizard.test.tsx
2024-03-01 10:22:11 +01:00
lucasgarfield
e923cccd41 V2Wizard/Repositories: Add payload_repositories to request and test it
Previously the V2 Wizard's request mapper was only adding the
custom_repositories field. We also need to add a nearly duplicate
payload_repositories field due to how the image-builder API works...
which is admittedly not intuitive.

Tests are also added to ensure that requests are generated correctly
when using the custom repositories feature.
2024-03-01 10:02:52 +01:00
regexowl
08563b9dfa V2Wizard/test: Add autofocus to radios and enable Keyboard accessibility tests
This adds `autoFocus` attribute to radios on AWS, Azure and GCP step.

The Keyboard accessibility tests have been re-enabled.
2024-03-01 09:38:47 +01:00
lucasgarfield
ed61f17d58 V2Wizard/Packages: Add tests for requests
Adds tests that verify using the custom packages step to add a custom
package results in a correctly generated API request.
2024-02-29 14:37:46 +01:00
regexowl
8b224a0327 V2Wizard: Remove bulk select and refresh button from the Packages step
This removes bulk select and a refresh button from the Packages step and updates tests accordingly.
2024-02-29 12:39:09 +01:00
regexowl
11cedba1af test: Re-align CreateImageWizard.test tests
The tests in the suite were improperly nested, this fixes the problem.
2024-02-29 11:19:24 +01:00
regexowl
161e9c05f0 test: Remove @ts-ignore comments
This removes `@ts-ignore` instances in the Azure test suite.
2024-02-28 18:19:57 +01:00
regexowl
2c6c326677 V2Wizard: Add packages to the Review step
This adds packages counter and a table of packages in a popover to the Review step.

The name of the field was also updated to "Additional packages".
2024-02-28 17:17:00 +01:00
regexowl
4c80ab4ad7 test: Adjust original CreateImageWizard tests according to fixture changes
The packages fixtures for content sources have "-sources" added to their name. This updates the tests accordingly.
2024-02-28 17:17:00 +01:00
regexowl
97d4ad7cc8 test: Enable packages tests
This re-enables previously disabled test for the Packages step.
2024-02-28 17:17:00 +01:00
mgold1234
174e37531c V2Wizard: add unit test to Azure step 2024-02-28 12:10:00 +01:00
regexowl
61c575c42e test: Up timeout for 'image name invalid for more than 63 chars'
This increases the timeout of 'image name invalid for more than 63 chars' to 20000.
2024-02-22 12:55:29 +01:00
lucasgarfield
d4c9534ecc V2Wizard/Details: Add request assertion tests
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.
2024-02-15 13:10:34 +01:00
lucasgarfield
ef7582a8ff V2Wizard/Tests: Add new helper function interceptBlueprintRequest
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.
2024-02-15 13:10:34 +01:00
lucasgarfield
8c31e6f54f V2Wizard/Registration: Add request assertion tests
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`.
2024-02-14 17:01:52 +01:00
mgold1234
40b1d4de57 v2Wizrd: add kernel and services data
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.
2024-02-12 17:12:26 +01:00
Amir
74f71f2dca Blueprints: Add handler for creating new blueprint 2024-02-12 15:12:14 +01:00
mgold1234
c80e933c2c V2Wizard: Create a folder for Review step and copy review component and enable tests
This created a new folder for the Review step and copies components that will be needed:
- ReviewStep.tsx
- ReviewStepTables.tsx
- ReviewStepTextLists.tsx
2024-02-06 14:16:16 +01:00
regexowl
c9e124b8c1 test: Enable tests
This enables test for the Repositories step.
2024-01-26 14:04:56 +01:00
regexowl
c2363e3046 test: Add content test suite to V2Wizard
This adds disabled CreateImageWizard.content.test.tsx test suite to the V2Wizard.
2024-01-26 14:04:56 +01:00
regexowl
7c40ca1b77 test: Enable blueprint description test
This enables a description check in the V2Wizard testing suite.
2024-01-25 16:30:32 +01:00
regexowl
269293e181 test: Remove debugging statement and change getBy query to findBy
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.
2024-01-25 14:57:09 +01:00
dependabot[bot]
f081ca78b0 V2Wizard: add Details step to wizrd2
this commit add Details step to v2Wizard
2024-01-25 12:48:25 +01:00
mgold1234
c4e1709de8 V2Wizard: add oscap to wizard2
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
2024-01-24 13:36:04 +01:00
Amir
c2e7c34d6e feat(HMS-3386): add blueprints initial layout 2024-01-19 17:20:21 +01:00
regexowl
f90718815b test: Replace .getBy queries by awaited .findBy
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.
2024-01-17 17:19:57 +01:00
regexowl
7b61700c06 V2Wizard: Enable tests for the Registration step
This re-enables all the tests that are checking the behavior of the Registration step.
2024-01-17 09:33:13 +01:00
lucasgarfield
3ed2192358 V2Wizard: Enable GCP tests
All tests passing except when required to move to registration step as
it has not been implemented yet.
2024-01-15 16:42:28 +01:00
lucasgarfield
698037a7dc V2Wizard: Uncomment relevant GCP tests and add data-testids
The tests have not been modified at this point, only uncommented, so the
next commit will have a clear diff.

Some data-testids were added to radio selectors and the Google principle
input as well for use in the tests.
2024-01-15 16:42:28 +01:00
lucasgarfield
617b36ba4f V2Wizard: Enabled tests for <Aws> substep of Image Output step
Most tests now passing, the one test that requires submission (not
implemented yet) is still disabled.
2024-01-11 09:22:18 +01:00
lucasgarfield
e5f37450a1 V2Wizard: Enable <TargetEnvironment> specific tests
These tests have been updated to satisfy Typescript and are passing.
2024-01-08 11:59:23 +01:00
lucasgarfield
0acb93fe12 V2Wizard: Copy TargetEnvironment specific tests
No changes have been made to this file yet, it has just been copied for
the V2 wizard and converted to .tsx.
2024-01-08 11:59:23 +01:00
lucasgarfield
0153b98d25 V2Wizard: Enable tests for Image Output step
Tests for the Image Output step are enabled and passing.
2024-01-08 11:59:23 +01:00
lucasgarfield
2465ab4b84 V2Wizard: Add <ImageOutput> skeleton
Adds the foundation for the image output step.
2024-01-08 11:59:23 +01:00
lucasgarfield
bb5ff08e2c V2Wizard: Restore tests
Uncomment all tests that should be passing up to this point in the V2
wizard development.
2024-01-08 11:24:54 +01:00