Commit graph

47 commits

Author SHA1 Message Date
regexowl
2a48966bba test: Update test files to work with Vitest
This updates the files to be compatible with Vitest. Changes include:
- adding `@testing-library/jest-dom` import to enable custom jest matchers
- renaming `jest.` to `vi.`
- setting flags to false as default where needed
2024-07-16 16:55:31 +02:00
regexowl
32ec1a6d27 jest: Increase test timeout
This increases default test timeout from 10000 to 20000 and timeout for "image name invalid for more than 100 chars and description for 250" to 50000.

This should eliminate test flakes caused by timing out, later it will be "reverted" when the Vitest migration gets merged.
2024-07-16 10:47:54 +02:00
Ondrej Ezr
facb71ceae Wizard: validate uniqueness of Blueprint name 2024-06-26 15:41:48 +02:00
Ondrej Ezr
4692eae454 Wizard: validate wizard with Redux Hook
Use redux hook to validate the form.
This gives us single point of contact for "is the data valid?"
while not requiring every redux action touching form data to perform validation.

It's not perfect and might be improved when using external library solving the problems we're having.
2024-06-21 14:40:41 +02:00
Ondrej Ezr
5fcc80d2db Wizard: Drop the WizardV1 2024-06-19 09:10:22 +02:00
regexowl
3b699f99ce test: Update tests to reflect name changes
The target acronyms on the Review step were replaced by full names of the targets. This reflects the change in the unit tests.
2024-06-18 09:19:45 +02:00
Ondřej Budai
642cb10036 drop centos stream 8
CentOS Stream 8 is EOL, thus we should no longer offer it in the
service, because it can pose a security risk.

See https://blog.centos.org/2023/04/end-dates-are-coming-for-centos-stream-8-and-centos-linux-7/
2024-06-12 10:07:33 +02:00
regexowl
a23cc9321b test: Update tests after adding SaveAndBuild modal
This updates tests with a `openAndDismissSaveAndBuildModal` function that handles closing the SaveAndBuild modal after clicking on Create blueprint for the first time.
2024-06-06 16:58:59 +02:00
regexowl
45a42ce549 src: Migrate remaining files to TypeScript
This migrates remaining JavaScript files to TypeScript and updates imports.
2024-06-06 08:38:41 +02:00
Amir
913a7d6406 WizardV2: fix google account typo 2024-05-27 09:42:13 +02:00
regexowl
f37bd91a9a test: Update tests after TypeScript migration
This resolves problems caused by TypeScript migration.
2024-05-03 16:36:26 +02:00
Amir
6f9c4f3864 feat(HMS-3582): add first boot step to wizard 2024-05-02 16:35:26 +02:00
regexowl
ec8cf1c8b9 test: Add test for checking ISO only / more targets FSC options
This adds two tests that check whether the "Manually configure partitions" options is hidden on ISO only target and shown when combined with another target.
2024-04-29 11:57:30 +02:00
Andrew Dewar
3231b324f0 HMS-3796: Add snapshot date selection to wizard 2024-04-25 14:45:50 +02:00
regexowl
dbeee5d066 V2Wizard: Differentiate between Create and Edit mode on Review step
This renames actions on the primary button on Review step for the Create mode so it's clear whether you're creating a blueprint from a scratch or saving changes to an already existing blueprint.
2024-04-17 18:46:49 +03:00
regexowl
a8270fd228 test: Re-enable FSC alert test and clean up
This re-enables test of FSC alert and cleans up previously commented lines of the tests.
2024-04-11 11:21:19 +02:00
regexowl
972190ecaf V2Wizard: Update create/edit button copy
This updates copy on the Save changes button as per recent mocks.
2024-04-10 13:44:22 +03:00
Amir
442d88a4ce fix(HMS-3850): V2Wizard:use menu toggle for save and build 2024-04-09 14:56:34 +02: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
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
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
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
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
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
97d4ad7cc8 test: Enable packages tests
This re-enables previously disabled test for the Packages step.
2024-02-28 17:17: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
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
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
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
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
lucasgarfield
f089080cb1 V2Wizard: Copy original wizard tests
The tests have been converted from .js to .tsx and all lines have been
commented out. As steps are added to the wizard, the relevant lines will
be uncommented. The V2 wizard can be considered finish when all
commented lines have been removed. Proceeding this way (as opposed to
starting with an empty test file and adding tests back) will help us
ensure we do not accidently 'drop' a test.
2024-01-08 11:24:54 +01:00
lucasgarfield
e1f66dd444 V2Wizard: Clean up for a fresh start
To make code reviews easier, these files are being removed for now. They
will be added back over time in a way that results in clearer diffs.
2024-01-08 11:24:54 +01:00
regexowl
c11f80188e test: Update release select option to partial match
With description added to the RHEL release options in Release select every query using name needed to be updated from full to partial match.
2023-12-07 19:39:58 +01:00
Thomas Lavocat
c7ffde49ae wizard/tests: add integration and unit tests
Add integration and unit tests for the wizard. The integration testing
is making sure that the wizard holds up together, is navigable and has
at least a happy path tested.
The unit test of the ImageOuput tests more combinations of clicks on the
interface and make sure the inner logic is sound.

The intersection of the two tests brings us confidence that the UX will
work according to spec.
2023-11-14 09:33:36 +01:00