Commit graph

185 commits

Author SHA1 Message Date
Michal Gold
bf77501eea Wizard: Display customized policy rules in review summary
Previously, when a user selected a compliance policy with tailored rules,
the review page always showed the default profile customizations instead
of the policy-specific customizations.

Root cause: OscapProfileInformation component was only using the profile
endpoint (/oscap/{distribution}/{profile}/customizations) which returns
base profile rules, not the policy endpoint
(/oscap/{policy}/{distribution}/policy_customizations) which returns
customized rules.

Changes:
- Add useGetOscapCustomizationsForPolicyQuery export to backendApi
- Implement dual data fetching in OscapProfileInformation:
  * Profile endpoint: for description and reference ID
  * Policy endpoint: for customized packages, services, kernel args

Fixes the compliance policy customization display bug where edited
policy rules were not reflected in the image build summary.

Add unit tests for compliance policy customizations

Fix profile description title
2025-08-14 19:42:19 +00:00
Lucas Garfield
04adcc133c Wizard: add AAP step 2025-08-14 11:28:49 +00:00
Katarina Sieklova
c930621316 Wizard: clean up unit tests
Did a little cleanup of the goToReviewStep functions, and the infinite clickNext calls.
2025-08-13 15:34:18 +00:00
Gianluca Zuccarelli
cedb4f07bd test: increase timeout for satellite registration
The test started to flake because the test was starting to run longer
than the timeout that was initially set.
2025-08-13 14:32:42 +00:00
Michal Gold
0af6a0324f Test: Fix race conditions in coverage tests with proper await handling
Add waitFor() for CentOS Stream 8 warning dismissal check
Add await to activation key dropdown interactions
Fixes test failures that only occurred during coverage runs due to timing delays

The changes address timing issues where UI elements don't update fast enough during coverage test runs, which are slower due to code instrumentation.
2025-08-07 14:52:37 +00:00
Michal Gold
d66f54a847 Wizard: Add FIPS mode support for OpenSCAP and compliance profiles (HMS-8919)
Automatically enable FIPS mode when:

User selects OpenSCAP profile with FIPS enabled (e.g., DISA STIG)
User selects compliance profile with FIPS enabled and not customized off

- Add FIPS checkbox in openscap step
- Display FIPS status in review step
- Add unit tests to FIPS checkbox feature
This ensures security compliance for profiles that require FIPS mode
without manual user intervention.
2025-08-07 11:47:17 +00:00
regexowl
eafcd200ae ESLint: Set trailingComma to all and run lint fix 2025-08-05 13:56:59 +00:00
regexowl
e9025e460c src: Run lint autofix 2025-08-05 13:56:59 +00:00
Michal Gold
88dd0880c8 Wizard: Add tooltip explaining password visibility in edit mode
When editing a blueprint, password fields show an eye icon that appears
clickable but is actually disabled for security reasons (passwords cannot
be retrieved from the backend). This creates confusing UX where users
expect the icon to work but it doesn't respond.

This change adds a tooltip that appears when hovering over the disabled
eye button, explaining that "Passwords cannot be viewed when editing a
blueprint for security reasons."

The fix wraps the disabled button in a span element to ensure the tooltip
triggers properly, as disabled buttons don't receive mouse events.

Also adds unit test to verify the tooltip functionality

Fixes #3303

🤖 Generated with AI
2025-08-04 14:06:13 +00:00
regexowl
64e5744d8c Wizard: Remove RHEL betas from release options
This removes RHEL betas from release menu and cleans up the code in several places.
2025-07-31 13:40:21 +00:00
regexowl
d5877b256c test: Add test for failing fetching of target environments
This adds a test to check that the appropriate alert gets rendered.
2025-07-29 14:53:43 +00:00
regexowl
730554dc84 Wizard: Add fetch and error state or target environments
This renders an empty state with a spinner when fetching target environments and alert when there's an issue.
2025-07-29 14:53:43 +00:00
regexowl
9f3ad99037 test: Remove delay for .upload user method
This sets delay to null for `uploadFile` helper, meaning there's no delay for the `.upload` user method now.
2025-07-28 10:59:46 +00:00
regexowl
42d96edd00 test: Remove typing delay for locale test
`Step Locale - unknown option is disabled` was quite flaky recently. Removing typing delay from the userEvent actions should solve the issue.
2025-07-24 08:43:24 +00:00
regexowl
25a5f140d8 ESLint: Add rule to sort imports alphabetically
The `import/order` rule isn't enough to sort import within a single import group alphabetically.

This adds `sort-imports` rule that handles the sorting within groups.
2025-07-15 16:52:45 +00:00
regexowl
91b2cc2d10 ESLint: Add rule for duplicate imports
We had decent amount of import groups split into several imports, this adds a rule to output error when there's a duplicate import.
2025-07-15 16:52:45 +00:00
regexowl
a0fe3644c3 src: Remove more data-testids
As using `data-testid`s in tests is an anti-pattern, this removes more of them and replaces them with appropriate locators in the tests.
2025-07-15 16:51:29 +00:00
Florian Schüller
ccfdb49db2 CreateImageWizard: Implement user-friendly error messages
Puts the error messages in one place - LabelInput.tsx
2025-07-15 13:47:37 +00:00
regexowl
b6e9fef70b Wizard: Change WSL file extension
This updates WSL file extension from `.tar.gz` to `.wsl`
2025-07-14 14:02:03 +00:00
regexowl
3f1a80fbe2 Run actions with Node 22
The github actions were previously ran with Node 20, this bumps them to Node 22.

README was also updated to reflect currently used version of Node.
2025-07-03 14:45:48 +00:00
regexowl
caa678ebeb Wizard: Replace VMware radios with checkboxes
This replaces previously used VMware radios with checkboxes, allowing the user to select both VMware vSphere targets at the same time.
2025-07-03 09:15:05 +00:00
regexowl
02cafcc29a devDeps: Bump eslint-plugin-testing-library
This bumps eslint-plugin-testing-library from 7.2.2 to 7.5.3 and updates a test to pass linter check.
2025-07-01 10:41:45 +00:00
regexowl
969497e722 Wizard: Parse locale codes to readable options
This parses options in the Languages dropdown to human readable form like so:
'en_US.UTF-8' -> 'English - United States (en_US.UTF-8)'
2025-06-27 11:45:26 +02:00
regexowl
1ea1c2de8c Wizard: Add packages, kernel and services to Oscap step
This adds the information about profile packages, kernel arguments and services to the profile info list.
2025-06-24 12:12:54 +00:00
regexowl
4b411c9a27 test: Update tests to reflect changes in chart visibility 2025-06-19 14:30:33 +00:00
Gianluca Zuccarelli
78bb1e118b multiple: fix act errors in the tests
This also helps reduce noise in the test output.
2025-06-19 13:53:49 +00:00
Gianluca Zuccarelli
c2998306cf multiple: fix selectable card onChange
The `onChange` event for the selectable cards needed to be placed
inside the `selectableActions` of the `CardHeader`. Since the
`onChange` action was not implemented we were getting warnings
in the test output for that a component was changing an uncontrolled
input to controlled.
2025-06-19 13:53:49 +00:00
regexowl
1d3967a585 test: Add test fixtures and update tests where needed
Mock fixtures for RHEL 10 were missing, meaning the tests were unable to fetch mocked data and failed.
2025-06-19 13:13:08 +00:00
Katarina Sieklova
76320925a0 Wizard: change order of the systemd services 2025-06-18 11:24:36 +00:00
Katarina Sieklova
564c5461d4 Wizard: edit tests related to Compliance step 2025-06-18 07:25:00 +00:00
regexowl
b465920b18 src: Remove image-builder.users.enabled flag
The Users customization is available in production now, the flag is no longer used.
2025-06-16 11:26:03 +00:00
Anna Vítová
6ec6f33fda Wizard: fix datepicker reset glitch (MS-8610)
If the reset button is clicked, there is a glitch that shows error state
for a moment. This commit removes the glitch by setting the snapshot
date even for invalid values, and removes the workaround that was
previously added.
2025-06-09 12:20:23 +02:00
regexowl
e60e15c6d6 test: Update tests 2025-05-28 09:08:52 -05:00
regexowl
d98dd02fa3 test: Update tests 2025-05-28 09:08:52 -05:00
Anna Vítová
f76b5a991e fix: add timeout for Satellite tests 2025-05-16 13:53:24 +02:00
Anna Vítová
2692b75432 Wizard: fix token not having expiration fails 2025-05-16 13:53:24 +02:00
Anna Vítová
2ee812efe0 Wizard: refactor Satellite validation
The Satellite token navigation was a bit too overengineered, refactoring
for better readability.
2025-05-14 17:07:04 +02:00
Anna Vítová
4192ada532 Wizard: add details for Satellite token expiration
This commit adds a more detailed information about when does the token
used in Satellite command expire.
2025-05-14 17:07:04 +02:00
regexowl
9ac104ca3e test: Update tests to reflect sorting changes
This updates the tests to reflect sorting changes.
2025-05-06 18:35:06 -05:00
regexowl
9d8d6d1d99 test: Update tests 2025-05-06 08:58:07 -05:00
Katarina Sieklova
cfa437a34b Wizard: edit compliance according to updated mockups
Changes the compliance step based on most recent mockups
2025-05-06 10:06:52 +02:00
regexowl
2fcfceafeb test: Add new tests for modularity
This adds some create mode tests for modularity, two "generated request" tests and updates edit test.
2025-04-30 17:01:36 +02:00
Sanne Raymaekers
87c754fb45 test: add tests for tailored customizations 2025-04-30 11:38:12 +02:00
regexowl
75288a5ef8 src: Remove unused unleash flags
This removes unused flags from the code base:
- image-builder.hostname.enabled
- image-builder.kernel.enabled
- image-builder.firewall.enabled
- image-builder.services.enabled
2025-04-29 14:14:21 +02:00
regexowl
42747a7eeb src: Remove firstboot flag
Firstboot also seems to be released fully to both stage and prod. The flag is not needed anymore.
2025-04-28 16:00:44 +02:00
regexowl
318d67c3c4 Wizard: Update search input placeholders
The placeholders we tend to use are usually quite specific. "Type to search" felt quite vague for some reason. Also repositories had no placeholder, I believe "filter" is clearer than "search" here as we're not fetching any results, just filtering through the already existing list of repositories.
2025-04-25 13:13:31 +02:00
Bryttanie House
0238c04dfe Wizard: add support for content templates 2025-04-25 10:31:43 +02:00
regexowl
1643b96330 Wizard: Set hasPassword in requestMapper
Add `hasPassword` setter to `getUsers` function.
2025-04-23 14:36:59 +02:00
regexowl
6b0af16471 src: Addressing comments
- addressed AI comments
- fix tab indexing
- added username to the title of Remove user modal
- ensured "Invalid password" is not in the errors object before a password is filled in
- removing a user with empty user, password and ssh key fields does not prompt "Remove user" modal
- check for duplicate username
- focus on new user tab
- remove redundant tabIndex
2025-04-18 16:45:59 -05:00
regexowl
8d74022ab1 test: Dancing around snyk 2025-04-18 16:45:59 -05:00