When a user searches for available packages, already chosen packages are
filtered from the available packages list. This prevents the user from
adding duplicate packages.
When the user filters the chosen packages list they may find no packages
containing the entered string. In this case we display a message that no
packages are found. There are now tests for both the available and
chosen packages lists for when packages are not found.
The review step is improved. The create button now states 'Create
image'. The step description text is updated. The fields to be reviewed
are now split into tabs for 'Target environment', 'Registration',
'System Configuration'. The target environments show the logo of the
environment now. The quantity of packages selected also displays now.
Tests are also updated.
The test Router now takes location and navigator instead of history.
This also means that the history function no longer needs to be mocked
by jest. Instead, the location and pathname can simply be expected.
The composeAdded action includes a field 'insert'. When set to true
`insert` will place the added compose at the beginning of the images
list. The test is modified so the new composes are added to the
beginning of the list.
Sort the package results in the CreateImageWizard
first by exact matches and then by pacakge results
that start with the same letters as the search term,
otherwise sort alphabetically.
Fixes#256
PF4 now allows more control over the DualListSelector. This component is
rewritten to use custom callbacks which allow us to display a more
customized version of the DualListSelector. Currently, the component is
visually identical to the existing implemention except for the addition
of a search button to filter the chosen packages.
screen.click() was being used but in React 17 the registration fields
will not be loaded into the dom until the user selects the radio option.
So, userEvent.click() must be used instead.
The info text is updated and the authorize button is moved below tenant
ID. The tenant ID is now validated as a valid GUID and if is not valid
the authorize button is disabled. This tenant id is now used to validate
image builder on azure because the authorize url containing the tenant
id will authorize for any microsoft account type. Tests are also
updated.
Tests were failing because we are now calling getUser when wizard is shown. This call is asynchronous and requires wrapping the wizard in act to wait for it to be fulfilled