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
This updates tests with a `openAndDismissSaveAndBuildModal` function that handles closing the SaveAndBuild modal after clicking on Create blueprint for the first time.
This updates the logic of parsing bytesize into size/unit pair.
Currently 'GiB' is set as a default which causes problem with smaller partitions on Edit.
A validation for the min_size is in place and the rule is that the size cannot be smaller than 0 of a given unit. If there was a partition with smaller size in KiB it will break the rule when converted to GiB.
Edit mode is now fully tested and working for OpenSCAP profiles. A
handler for the PUT request was added and the fixtures were updated to
support this.
`EditImageWizard.tsx`: Previously we dispatched `initializeWizard()`
while waiting for the blueprintDetails to load. This meant that the
state was incorrect (empty) while the blueprintDetails request was
in flight.
`requestMapper.tsx`: Correctly populate state in edit mode if the
blueprint contains a custom file system – previously custom mountpoints
were dropped and automatic mode was selected.
`spyOnRequest()`: Differentiate between request types (e.g. GET, PUT)
for the same endpoint.
This replaces 'image-installer' target with 'guest-image' in happy path tests which allows proper testing of FSC functionality. File system customisations are not applied to bare metal - installer images.