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
regexowl
4389318de8
test: Update EditImageWizard test file for vitest
...
This adds mocks and imports needed to make the newly added EditImageWizard test file pass with vitest.
2024-07-16 16:55:31 +02:00
regexowl
a5f69a2559
test: Move shared imports to setup.ts file
2024-07-16 16:55:31 +02:00
regexowl
144832f2f8
test: Temporarily disable three tests
...
This temporarily disables three tests:
- target environment tiles are keyboard selectable -> can't make the behaviour correct even in mocked browser, it's possible this test was passing dues to early exit
- image name invalid for more than 100 chars and description for 250 -> this test times out in waitFor for the typing action. We have other valid/invalid name tests which could probably replace this one to not overwhelm the test suite with awaiting a large amount of text
- validate first boot request -> `monaco-editor` mock will be probably needed to make this one pass as it's not included in jsdom and ends in `Ne. init is not a function` error
2024-07-16 16:55:31 +02:00
regexowl
98c17e55df
test: Move beforeEach blocks inside describe
...
This moved the `beforeEach` blocks inside the `describe` blocks as per documentation.
Previously the code inside `beforeEach` didn't trigger which lead to problems with asynchrocinity as mocks didn't get cleared.
2024-07-16 16:55:31 +02:00
regexowl
e036f9b892
src: Move .scrollTo mock implementation to setup.ts
...
This moves the `.scrollTo` mock implementation to a setup file for other test files to use.
2024-07-16 16:55:31 +02:00
regexowl
8597929ff3
test: test: Remove act() warnings
...
This removes `Warning: An update to <component> inside a test was not wrapped inact(...)` warnings.
2024-07-16 16:55:31 +02:00
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
regexowl
989671ba95
test: Update tests
...
A custom repo needs to be selected for the correct mocked response.
2024-07-14 22:13:46 +02:00
Ondrej Ezr
4044b9eba1
Wizard: enable nav items properly in Edit mode
2024-07-11 09:37:36 +02:00
Jakub Rusz
9f3cb26e0a
Wizard/Review: Rename from Image to blueprint
...
Where applicable renamed Image details or name to blueprint details or name.
2024-06-28 16:06:06 +02:00