Ondrej Ezr
7d537bcb66
test: use basic JS types for composes
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
4e24dc35b6
test: Silence the DOM dump in test output
...
This silences the DOM dump logged into test output by testing-library while keeping all the relevant information about the test failure in the output.
2024-07-17 21:22:32 +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
6964e8b312
src: Resolve ResizeObserver is not defined error
...
This mocks and stubs ResizeObserver as it is not defined in jsdom.
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
da16a42128
Migrate from Jest to Vitest
...
This migrates our tests from using the Jest testing framework to Vitest.
2024-07-16 16:55:31 +02:00
regexowl
ac60043199
Wizard: Fix repositories recommendations
...
Repositories were not getting recommended after https://github.com/osbuild/image-builder-frontend/pull/2226 got merged. This fixes the problem.
2024-07-16 15:31:53 +02:00
Ondrej Ezr
22c3686e2e
Firstboot: Add testid to empty state buttons
2024-07-16 13:15:12 +02:00
Ondrej Ezr
e0ec56c94d
Wizard: fix blueprint unique name validation in Edit mode
2024-07-16 12:27:42 +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
regexowl
c89b73687f
Wizard: Fix 400 when fetching packages
...
The request for package search in custom repositories was sent even when no custom repositories were selected, ending in 400. This fixes the problem.
2024-07-14 22:13:46 +02:00
Ondrej Ezr
e8b3814074
Wizard: feature flag to decide environments to be enabled in
...
Feature flags now support enablement in Preview specifically.
This allows us to use single feature flag for rollout.
2024-07-11 14:33:35 +02:00
Ondrej Ezr
4044b9eba1
Wizard: enable nav items properly in Edit mode
2024-07-11 09:37:36 +02:00
Ondrej Ezr
549ef37ab7
Blueprint: enable import/export in ephemeral
...
Adds ability to enable a feature flag in Ephemeral environment by default.
2024-07-10 19:48:58 +02:00
Justin Sherrill
10c9375ee3
V2Wizard: revert add alert on snapshot step
2024-07-08 10:27:21 +02:00
Ondrej Ezr
ff2ccc4101
Wizard: set status on step
...
This implements error status for a step navigation.
It helps user to see on what step there is an validation error and why they can't create the blueprint.
2024-07-05 13:23:58 +02:00
regexowl
fde1cfef10
constants: Update URLs
...
This updates documentation URLs.
2024-07-04 21:34:15 +02:00
Sanne Raymaekers
f8a8e5c782
src/constants: update docs link
...
Image builder docs are now hosted under insights only.
2024-07-04 17:07:01 +02:00
mlahane
6a5417d4d6
Update docs with correct URL
2024-07-04 15:47:25 +02:00
Gianluca Zuccarelli
f0d723686e
wizard/compliance: re-enable stig profiles
...
The stig profiles have been fixed downstream, so we can re-enable these.
2024-07-04 12:01:06 +02:00
Michal Gold
f218109fa4
CreateDropdown: change navigation to specific image when creating and building image HMS-4258
...
this commit change navigation to specific image when creating and building new
image
2024-07-03 15:09:11 +02:00
regexowl
c0508e00ce
src: Add betaPath helper function
...
This replaces all occurences of `isBeta() ? CONTENT_BETA : CONTENT_STABLE` with `betaPath(CONTENT_URL, isBeta())`.
2024-07-01 13:54:15 +02:00
regexowl
b198768ca6
src: Move content urls to const
...
This moves both preview and stable links to content to the `constants.ts` file.
2024-07-01 13:54:15 +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
Jakub Rusz
9b82b22d75
Add ouiaIds for import Modal and button
...
Adding some missing ouiaIds.
2024-06-28 09:49:14 +02:00
regexowl
345c3bbd06
Wizard: Update text for name validation
...
This updates helper text for blueprint name validation, making the "word characters" more specific.
2024-06-28 09:32:06 +02:00
Ondrej Ezr
facb71ceae
Wizard: validate uniqueness of Blueprint name
2024-06-26 15:41:48 +02:00
regexowl
73848c9ed0
Wizard: Add Lightspeed to package recommendations
...
This adds "Powered by RHEL Lightspeed" text and popover to the recommended packages expandable.
2024-06-25 11:15:07 +02:00
Michal Gold
7138552663
add unit test that check disabling build image button when uncheck all targets
2024-06-25 10:21:03 +02:00
Michal Gold
39b29e303c
buildImageButton: add support of building image with mulitple targets <HMS-4066>
...
this commit add support of building an image with mulitple targets,
when user build an image, he can choose which targets he wants to build.
2024-06-25 10:21:03 +02:00
regexowl
916596d5cb
test: Cleanup TargetEnvironment tests
...
This cleans up structure of `src/test/Components/CreateImageWizardV2/steps/TargetEnvironment`, removing the subfolders and surfacing Aws and Azure test files.
We also had two `TargetEnvironment.test.tsx` files, both testing functionality of the Image Output step. For now those were merged into one file under `ImageOutput` step and can be later renamed to `ImageOutput.test.tsx` for consistency.
2024-06-21 16:49:24 +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
Sanne Raymaekers
fad7648d38
CreateImageWizardV2: recommended repositories in review table
...
Package groups can also come from recommended repositories.
2024-06-21 10:12:39 +02:00
Sanne Raymaekers
469585e59c
CreateImageWizardV2: fix disabling recommended repository
...
In case there are groups selected, the recommended repository should be
disabled.
2024-06-21 10:12:39 +02:00
Sanne Raymaekers
a812d8caea
CreateImageWizardV2: fix removing recommended repository
...
Only remove it when there's no packages or groups selected from those
repositories.
2024-06-21 10:12:39 +02:00
Sanne Raymaekers
737074eb49
CreateImageWizardV2: test included packages in group popover
2024-06-21 10:12:39 +02:00
Sanne Raymaekers
d0f52bb1d6
CreateImageWizardV2: fix pagination when search is empty
2024-06-21 10:12:39 +02:00
Sanne Raymaekers
3cb9fe0670
CreatEImageWizardV2: while searching show either pkgs or groups
2024-06-21 10:12:39 +02:00
Sanne Raymaekers
db4e80eb67
CreateImageWizardV2: add info alert to packages step
...
Inform users how to search for package groups.
2024-06-21 10:12:39 +02:00