Commit graph

273 commits

Author SHA1 Message Date
Jacob Kozol
4b9e98bff3 test: able to recreate image
Verify that clicking recreate will pass the expected compose request to
the CreateImageWizard. Also, verify that if passed a composeRequest and
initialStep of 'review', the wizard will display the review page with
all info filled.
2022-03-23 12:30:42 +01:00
Jacob Kozol
20c1537d8e CreateImageWizard: navigate to review step on recreate
When recreating an image navigate to the review step instead of the
initial step. This requires forming the step history to enable a
functional sidebar.
2022-03-23 12:30:42 +01:00
Jacob Kozol
d16f71c98f ImagesTable: add ability to recreate image type 2022-03-23 12:30:42 +01:00
Jacob Kozol
c3f86f3575 CreateImageWizard: enable passing initial state to CreateImageWizard 2022-03-23 12:30:42 +01:00
Jacob Kozol
c3c7888610 CreateImageWizard: use activation key in form state as init value 2022-03-23 12:30:42 +01:00
Jacob Kozol
7aaedd67ab CreateImageWizard: rename google to gcp in form state 2022-03-23 12:30:42 +01:00
Jacob Kozol
a16244edaa ImagesTable: migrate to functional component
The ImagesTable component is now a functional instead of class
component. This is useful because it allows us to use react hooks in the
component.
2022-03-17 16:49:21 +01:00
Gianluca Zuccarelli
ed80d7c32d App: fix tab title
The tab title for image builder in crc
was being diplayed as `image_builder`.
This commit fixes issue #617
2022-03-07 14:32:18 +01:00
lucasgarfield
f85f60bcf0 CreateImageWizard: Use new DocumentationButton component in ImagesTable 2022-03-04 16:44:12 +01:00
lucasgarfield
b4fb26e749 CreateImageWizard: Use new DocumentationButton component in LandingPage 2022-03-04 16:44:12 +01:00
lucasgarfield
db9bb31887 CreateImageWizard: Update Wizard description to match UI design
Changes the Wizard's description (defined in the schema) to `Image
builder allows you to create a custom image and push it to target
environments` as indicated in the UI design prototype. The previous
description (`Create a RHEL image and push it to cloud providers`)
is no longer accurate since CentOS images are also currently supported.
2022-03-04 16:44:12 +01:00
lucasgarfield
0c9b0f1070 CreateImageWizard: Add image output instructions
Resolves #596. Adds the text `Image builder allows you to create a
custom image and push it to target environments.` and a link to the
documentation to the image output step.
2022-03-04 16:44:12 +01:00
lucasgarfield
62559b8323 CreateImageWizard: Add DocumentationButton form component
A documentation button, which contains an external link to the
official documentation, appears several times throughout the frontend.
Currently, the code for the documentation button is copy/pasted where
needed. Adding a form component for the documentation button allows code reuse
and improves readability in the code that calls it.

Because this component is used by the LandingPage, ImagesTable, and
ImageWizard it has been placed in a new directory,
`src/Components/sharedComponents` which is at the same level as these
directories.
2022-03-04 16:44:12 +01:00
Gianluca Zuccarelli
1ec63ba357 CreateImageWizard: prefocus aws input field
Autofocus the input field in the aws step
of the CreateImageWizard modal.
2022-03-04 12:18:15 +01:00
Jacob Kozol
9b4144176a CreateImageWizard: remove unsafe optional chaining
Optional chaining can return undefined. So, we should not use `of` on
getState()?.values?.['file-system-configuration']. But, since we already
check for the existance of this variable we do not need to optionally
chain.
2022-03-03 17:46:14 +01:00
Jacob Kozol
80918f97e4 CreateImageWizard: only display Image name review field when it exists 2022-03-03 17:17:03 +01:00
Jacob Kozol
dc0789dce3 LandingPage: edit header spacing
Increase space between icon and header
2022-03-03 14:03:11 +01:00
Chloe Kaubisch
e238ac9d24 LandingPage: tight space between header and icon 2022-03-03 14:03:11 +01:00
Sanne Raymaekers
531e2ac1b0 CreateImageWizard: Expose centos 9 stream 2022-03-02 17:03:09 +01:00
Jacob Kozol
2300af1152 ImagesTable: add image name
If a user has specified an image name the name will appear. Otherwise
the image's UUID will appear.

The test needed to be modified to search for the compose in the store
with either the image name or the id
2022-03-02 16:24:35 +01:00
Jacob Kozol
c257eec540 CreateImageWizard: add image name field
Add a details step where the user can enter a descriptive image name.
This name is displayed in the review step above the Release. Both these
fields are now horizontal to save vertical space.
2022-03-02 16:24:35 +01:00
Gianluca Zuccarelli
9c9be31677 CreateImageWizard: fix gcp popover
Update the popover for the gcp step
in the CreateImageWizard. This commit
changes the default popover position
to the right of the modal.
2022-03-01 17:17:41 +01:00
Sanne Raymaekers
350acbd21b CreateImageWizard: File system configuration 2022-02-28 15:27:09 +01:00
Sanne Raymaekers
280ed7d884 CreateImageWizard: Make packages step a substep 2022-02-28 15:27:09 +01:00
Chloe Kaubisch
9519fabf11 createimagewizard: update aws step text
fixes #600
2022-02-25 14:58:06 +01:00
lucasgarfield
86e624f321 CreateImageWizard: Change GUID to ID in Azure step 2022-02-25 14:30:57 +01:00
lucasgarfield
dfe8d3e19e CreateImageWizard: Change Image Destination to Destination Azure step 2022-02-25 14:30:57 +01:00
Jacob Kozol
f278f049a9 CreateImageWizard: Add expandable section for azure description
The azure step's descriptive text under the `Authorizing an Azure
account` title text is now expandable. Clicking the title shows or
hides it.
2022-02-25 14:30:57 +01:00
Jacob Kozol
1a6938ef1f CreateImageWizard: set azure field length to 50% width
Azure form fields only need to take in 36 characters for the ID so they
don't need to take up the full width of the wizard. These fields are
now 50% width. The resource group doesn't have the same character limit
but is set to the same 50% for visual consistency.
2022-02-25 14:30:57 +01:00
lucasgarfield
5e0ce52742 CreateImageWizard: Show empty available state on failed search
Resolves issue #588. 'No packages found' is now correctly displayed
after a failed search that follows a successful search.
2022-02-24 17:01:50 +01:00
lucasgarfield
1630f30448 CreateImageWizard: Sort packages alphabetically
Search results are now converted to lower case before sorting. This
ensures that results appear in alphabetical order in a case insensitive
fashion.
2022-02-24 17:01:50 +01:00
lucasgarfield
e8e7329bf6 CreateImageWizard: Get all matching packages from package search
When searching for a package, all matching packages are now returned. First an
attempt is made using the api's default limit and if there are more
matching packages than the default limit a second request is made with
an increased limit. To facilitate this, api.getPackages() now accepts an
optional limit parameter. Retrieving all matching packages is necessary
because of the sorting logic.
2022-02-24 17:01:50 +01:00
Jacob Kozol
92f963c49a CreateImageWizard: add activation keys to registration
The registration step now provides users with a type ahead input so they
can select from all activation keys associated with their accounts.

The testing for this requires that we wait for the mocked api response.
2022-02-14 16:31:19 +01:00
Jacob Kozol
02fbdf5e88 CreateImageWizard: remove act warning on Review step
When we load the organization id but do not use or display it we can
have an act warning because we unmount the component without handling
the response.
2022-02-14 16:31:19 +01:00
Jacob Kozol
fc9735371f tests: remove useless tests
The click through all steps with invalid and missing values are
unneccessary tests. They do not actually check the validation
and instead they just click through all steps.
2022-02-14 16:31:19 +01:00
Sanne Raymaekers
8e4b4ff6d5 CreateImageWizard: Disable vmware and installer images
These images need either user customization or a default user.
2022-02-03 15:42:34 +00:00
Jacob Kozol
f51e9fd9b2 CreateImageWizard: update review step for new subscription strings
The review page and its test now contains the organization id and
additional strings for whether the image is subscribed to insights or
not.
2022-01-21 11:57:04 +01:00
Jacob Kozol
e48e2ca659 CreateImageWizard: redesign registration step
Update the registration options to include registering without insights.
Also, improve the text info in the step.

The org id is also removed from the registration step since we no
longer display the id in this step.
2022-01-21 11:57:04 +01:00
Chloe Kaubisch
3571c969ce CreateImageWizard: conditionally render Registration tab
At the final review step, only render the Registration tab
if the user has selected RHEL 8 as the release. Add a test to
ensure that if the user selects CentOS as the release, there
are only two tabs at the review step.
2022-01-20 15:30:13 +01:00
Jacob Kozol
6d66ab3228 test: add centos setup
In the review step we want to test if the Registration tab is hidden.
This requires selecting CentOS as the distro type since CentOS does not
support RHEL subscription activation.
2022-01-20 15:30:13 +01:00
Jacob Kozol
81629feaad ImagesTable: add target labels for new image types
The "guest-image", "image-installer", and "vsphere" image types now
display proper labels in the ImagesTable target column. Also, the upload
component is renamed to Target for consistency.
2022-01-14 22:23:50 +01:00
Jacob Kozol
59e951653d ImagesTable: add image download link
The new blobby image types are uploaded to aws.s3 for download. Instead
of linking to a cloud instance, these image types display a download
link.
2022-01-14 22:23:50 +01:00
Jacob Kozol
f1f3c0cd66 CreateImageWizard: add new image types
The image types 'vsphere', 'guest-image', and 'image-installer' are now
supported by the CreateImageWizard. They require no additional
customizations and support the current registration and packages
customizations.
2022-01-14 22:23:50 +01:00
Jacob Kozol
0b45e7bc4f CreateImageWizard: validate azure resource group
Resource group names only allow alphanumeric characters, periods,
underscores, hyphens, and parenthesis and cannot end in a period. A
regex validation is now added to ensure this.

Documented by azure here:
https://docs.microsoft.com/en-us/rest/api/resources/resource-groups/create-or-update
2022-01-11 10:54:04 +01:00
Jacob Kozol
989d5fabac ImagesTable: align gcp image details with other instance text
The link for the gcp Instance description was not set to isInline.
Fixing this aligns the text with the rest of the instance links.
2022-01-09 17:13:03 +01:00
Jacob Kozol
e1f6ae1cca test: fix testing-library/no-render-in-setup error
In order to avoid unnexpected sideeffects and to be more specific in our
tests the components should be rendered in each test and not in the
beforeAll. This will improve the testing libraries ability to run
cleanup. Moving the render into a setUp function is okay because it is
still called from within each test and won't cause sideefects for the
cleanup.
2022-01-05 11:51:55 -05:00
Jacob Kozol
e43c41a143 test: move scrollTo to beforeAll
This call occurs before each test because scrollTo is not imlemented in
jsdom. Instead of calling it in each beforeEach we declare it once in
the beforeAll. This simplifies the beforeEach calls.
2022-01-05 11:51:55 -05:00
Jacob Kozol
d1cd05aca7 test: fix testing-library/render-result-naming-convention 2022-01-05 11:51:55 -05:00
Jacob Kozol
6713d279ef test: fix testing-library/no-wait-for-multiple-assertions error
Simplify the waitFor calls to only wait for the asynchronously updating
components.
2022-01-05 11:51:55 -05:00
Jacob Kozol
20d3928744 test: fix testing-library/no-node-access error
We should avoid using native html methods for dom traversal. Our goal
should be to visually test what users would see as much as possible and
accessing 'children' doesn't specifically check for visual elements as
much as checking for text or roles
2022-01-05 11:51:55 -05:00