Commit graph

422 commits

Author SHA1 Message Date
regexowl
dca94cb190 test: Cleanup Review tests
This cleans up Review tests by replacing block of code by helper functions where possible.

The last two tests were updated so that their descriptions match what the tests do.
2024-09-13 14:32:52 +02:00
Anna Vítová
87ba510680 test: Remove mocking of chrome and unleash 2024-09-12 15:03:35 +02:00
Anna Vítová
22c9b0c106 src: Cleanup import modal on close 2024-09-04 17:45:11 +02:00
Anna Vítová
c385417e93 HMS-4459: Use export endpoint 2024-09-04 17:45:11 +02:00
regexowl
3ae642b848 test: Add Review and finish button tests
This add tests to check whether the Review and finish button works properly, sending user to the Details step. And whether it's disabled when the state is invalid.
2024-09-04 01:21:28 +02:00
regexowl
558bb50c34 test: Add revisit step button checks
This adds tests to check that the revisit buttons on the Review step are working correctly.

Also some minor cleanup, namely making case used in the names of describe and test more consistent and moving render functions outside of functions selecting targets to make the structure easier to go through.
2024-09-04 01:21:28 +02:00
Michal Gold
f1bce4b3ba test: move Review tests to specific folder
this commit moves Review tests to specific folder
2024-09-02 15:59:33 +02:00
regexowl
2bb82b70c1 test: Cleanup Packages tests
This cleans up Packages test file after relevant tests were moved there from `CreateImageWizard.content.test.tsx`.
2024-09-02 12:41:51 +02:00
regexowl
578a9549bd test: Cleanup Azure tests
This moves Azure tests from `CreateImageWizard.azure.test.tsx` to `AzureTarget.test.tsx` and cleans up the structure.
2024-08-27 10:20:17 +02:00
regexowl
58ea64162a test: Cleanup Image output tests
This cleans up Image output test file after relevant tests were moved there from `CreateImageWizard.test.tsx`.
2024-08-19 13:51:27 +02:00
regexowl
e2e0a77bd9 test: Rename TargetEnvironment.test.tsx to ImageOutput.test.tsx
This renames TargetEnvironment.test.tsx test file to ImageOutput.test.tsx so the naming is consistent with the other test files.

The file previously contained tests for both Image output step and it's substeps. Since that's no longer true the naming no longer made sense.
2024-08-19 13:51:27 +02:00
regexowl
57e4ed1f4b test: Clean up GCP tests
This cleans up GCP test file after relevant tests were moved there from `CreateImageWizard.test.tsx`.
2024-08-19 12:45:38 +02:00
Michal Gold
2168bc31d8 test: move packages test to Packages.test.tsx file
this commit move relevant packages test to packages.test.tsx
2024-08-19 11:30:02 +02:00
regexowl
34ef6b2b95 test: Clean up AWS tests
This cleans up AWS test file after relevant tests were moved there from `CreateImageWizard.test.tsx`.
2024-08-19 09:33:40 +02:00
regexowl
4fa0ad863b test: Clean up Registration tests and enable a test
This cleans up Registration tests and re-enables "clicking Cancel loads landing page" test.
2024-08-16 14:56:29 +02:00
regexowl
d31e59bcbf test: Clean up FSC tests
This cleans up FSC test file a bit after tests were moved here from `CreateImageWizard.test.tsx`.
2024-08-14 17:21:30 +03:00
regexowl
a48fbb97b7 test: Add new tests 2024-08-14 15:26:08 +02:00
regexowl
1f40269c01 test: Cleanup tests
This cleans up the Registration test file after relevant tests were moved there from `CreateImageWizard.test.tsx`.
2024-08-14 15:26:08 +02:00
regexowl
0dea61bf00 test: Update tests
This updates the tests to reflect changes made to the new registration step.
2024-08-14 15:26:08 +02:00
Michal Gold
c4bbd413b3 test: move relevant test from createImageWizard to targetEnvironment test file
this commit move relvant test from creatreImageWizrad to targetEnvironment test file
2024-08-14 11:10:38 +02:00
Michal Gold
8ffa797df4 FileSystemTest: move relevant tests from createImageWizard to fileSystem
this commit move relevant tests from createImageWizard to fileSystem test
2024-08-13 10:35:42 +02:00
regexowl
d0412db518 test: Move clicking helper functions to wizardTestUtils
As clicking helper functions are used only in the context of Wizard, this moves them to an appropriate place.
2024-08-12 17:46:38 +02:00
regexowl
b7ccc2cca0 testUtils: Merge renderCustomRoutesWithReduxRouter and renderWithReduxRouter
`renderCustomRoutesWithReduxRouter` and `renderWithReduxRouter`are functionally the same apart from routes they use to render components.

We could just use `renderCustomRoutesWithReduxRouter` and use the routes from `renderWithReduxRouter` as a default value for an optional parameter `routes`.
2024-08-12 09:46:10 +02:00
Michal Gold
3c44d9414a createImage: add default name in details step <HMS-4494>
this commit add default name for blueprint name field to be able
to create an image without filling any name
format name: "$OS $ARCH $TARGETS $DATE".
2024-08-12 08:43:26 +02:00
Michal Gold
346c5752b6 RegistrationTest: move relevant tests from createImageWizard to Registration test 2024-08-09 10:18:57 +02:00
regexowl
1554d78cba test: Move mocks to setup file
This moves all the mocks used throughout our test files into the test setup file.
2024-08-08 16:53:49 +02:00
regexowl
912b56f735 test: Move util function to wizardTestUtils
This moves `selectCustomRepo` to `wizardTestUtils.tsx`

Since the function was originally imported into `Packages.test.tsx` from `CreateImageWizard.content.test.tsx` the entire content suite was re-run under Packages suite each time. This solves the issue.
2024-08-06 15:46:51 +03:00
regexowl
37dfe8584c test: Fix async logic in Oscap flakes
`remove profile` and `change profile` test in `Oscap.test.tsx` suite were flaking for Node 18.x, this should fix the issue.
2024-08-05 12:52:06 +02:00
regexowl
2febf98e93 test: Update tests
Add mocking to tests where needed.
2024-08-01 18:05:01 +02:00
regexowl
e891b0dc04 test: Add flag mocks
This mocks 'image-builder.snapshots.enabled' where needed.
2024-08-01 17:34:03 +02:00
regexowl
fc88b09ce6 test: Update tests
This updates tests after gating WSL behind 'image-builder.wsl.enabled'.
2024-08-01 17:24:42 +02:00
regexowl
8ee2bad55e test: Add flag mocks
This adds mocked 'image-builder.firstboot.enabled' where needed.
2024-08-01 17:16:36 +02:00
Sanne Raymaekers
eab407c09e Wizard: Add tests for repositories and snapshot steps
Tests the bulk select and verifies disabled repositories.
2024-07-31 16:30:01 +02:00
regexowl
fee43d8917 ImagesTable: Update wording of CentOS 8 alert
This adds information about CentOS 8 being automatically replaces with CentOS 9 when editing a blueprint.
2024-07-30 16:16:43 +02:00
regexowl
2bbec0b034 test: Temporarily disable flakey Oscap tests
The disabled tests are flaking for Node 18.x only. I'm quite sure the problem lies within async. Working on a fix.
2024-07-30 12:12:21 +03:00
regexowl
a9bf175403 test: Disable a test and update few others
Test `Repositories edit mode modal pops up when deselecting previously used repository` is temporarily disabled. Also there were some early exits, the awaiting should do the trick.
2024-07-29 19:20:14 +02:00
regexowl
802525edbc test: Move compliance On Recreate test to On Edit
This migrates a test from previously used On Recreate to current On Edit.
2024-07-29 13:24:30 +02:00
Ondrej Ezr
dbfa934b38 Firstboot: validate shebang is defined 2024-07-26 11:57:24 +02:00
regexowl
cba54c54c6 test: Add retry to the flakiest tests
This adds three possible retries to three of the flakiest tests.
2024-07-25 19:22:05 +02:00
Michal Gold
2c61a70fb4 buildImagesButton: change the name of build selected button <HMS-4066>
this commit  change the name of build selected button to build images
2024-07-25 15:49:23 +02:00
regexowl
c3da0af22c test: Remove deprecated flags from mocking
`image-builder.new-wizard.enabled`, `image-builder.wizard.oscap.enabled` and `image-builder.enable-content-sources` are no longer used in the code base and thus don't need to be mocked in tests.
2024-07-25 14:45:35 +02:00
regexowl
16422e96ce test: Improve stability of 'check error details' test
This adds awaiting to a few expects, hopefully improving the stability of the test.
2024-07-23 16:23:04 +02:00
regexowl
eb2cfe9a2f test: Move @testing-library/jest-dom import to test setup file
This removes `@testing-library/jest-dom` from single test files and adds it to the shared setup.ts file.
2024-07-22 15:49:18 +02:00
Ondrej Ezr
df993c7fc2 test: Add nodeFetch back 2024-07-18 17:26:38 +02:00
Ondrej Ezr
69b7c574ae test: await click instead of element not in doc 2024-07-18 17:26:38 +02:00
Ondrej Ezr
a1a49806e1 rtk: Add base to url and fix mock handler 2024-07-18 17:26:38 +02:00
regexowl
797ceddcd1 test: Update handlers in test files
This updates handlers used directly in the test files to match current API.
2024-07-18 17:26:38 +02:00
regexowl
501323b476 MSW: Bump msw from 1.2.3 to 2.3.1
This bumps Mock Service Worker and updates the handlers.
2024-07-18 17:26:38 +02:00
regexowl
e2397b90d4 test: Fix act warnings
This removes the `act()` warnings from the test output.
2024-07-17 12:25:33 +02:00
regexowl
4fb37c187e src: Rename "V2" folders to just Wizard
This replaces all occurences of "CreateImageWizardV2" with just "CreateImageWizard" as it is the only version now.
2024-07-17 11:17:06 +02:00