This removes a warning on a no-op being fired when the wizard changes a
state when the request for creation comes back as a success.
Instead don't update the form state if the wizard is going to be closed
anyway.
Use the library https://github.com/ValentinH/jest-fail-on-console to
spy on the errors to make test failing if any occur.
Transfer the configuration from the previous FilteredConsole to this new
library.
Allow a few targeted errors to occur to give some time to refactor while
keeping the benefits to have failing on new error messages.
A weird error occurs because when the tests are executing together. To
avoid that, as a temporary measure, separate the last test in a separate
file to ensure insolation from its peers.
Brute force approach to fix the act errors in the Wizard tests. It's not
ideal but allows to move on toward activating strict mode on the test
suite ASAP
Brute force approach to fix the act errors in the Wizard tests. It's not
ideal but allows to move on toward activating strict mode on the test
suite ASAP.
Before, the LandingPage was not properly rendering because
EdgeImagesTable has a dependency to Scalprum. Scalprum is a service that
is provided by Insight that enables up to access shared components.
However scalprum wasn't getting initialized properly during the
execution of the unit tests making the entire LandingPage not rendering.
There are ways to mock scalprum but this commit takes another decision
to fix the issue. Instead of having a test environment rendering the
LandingPage and the Wizard to test the ShareImageModal, the rendering is
tailored to ShareImageModal needs, which only contains the rendering of
that said module + static routes to avoid 404 on final redirections.
This makes the scalprum errors go without hurting the coverage of the
tests.
Some components were crashing in the test due to a lack of protection
for cases where any data is returned from the API. This solution is
quite temporary and is only ment to allow the unit tests to execute
without throwing errors. A major refactor of the queries is on its way
with RTKQueries and will fix the behavior when data can't be properly
fetched.
Incorrect proptype for `selectedAvailablePackages` was causing following error:
```Warning: Failed prop type: Invalid prop `selectedAvailablePackages` of type `object` supplied to `ExactMatch`, expected an array.```
This fixes the problem.
The conditional in the image details component needed to have a check
added for vsphere-ova type images.
A mock compose and corresponding status for a vsphere-ova type image
have also been added.
Previously the Popover was used within the title of the tab. In addition
to the fact that the Popover had a button to get triggered, it created a
button in a button issue. The web browser was reporting this as abnormal
and the UI behavior was not ideal: while clicking on the interrogation
mark the user was also moved to the corresponding tab.
This commit fixes that issue by using a TabAction to get the Popover
working. Inspired by the patternfly documentation:
- http://v4-archive.patternfly.org/v4/components/tabs#help-action
This adds `request` to a reponse from the `composes/{composeId}` endpoint and `meta` to a response from the `/composes/{composeId}/clones` endpoint as per API documentation.
The incomplete responses were causing problems when fetching data from the endpoints mentioned above.
The fixture was also migrated to TypeScript.
This disables adding of repositories that do not have 'Valid' status.
Status column was also added to the Repositories table to make the reason why the checkbox is disabled visible.
This commit adds eslint support for .ts and .tsx files.
The recommended Typescript rules are applied only to .ts and .tsx files
and not to existing .js or .jsx files. This is accomplished by creating
a separate .eslintrc-typescript.yml file and pointing to it in the
.eslintrc.yml overrides parameter.
A .eslintignore file was added. This file has syntax similiar to
.gitignore and is used to ignore the programatically generated API
slices so that we do not have to deal with a massive diff whenever we
update one of them.
A useEffect was used without conditions to update the value of a state
variable depending on the form state. That's apparent to a way to
initialize the state. Instead, what can be done, is to immediately
initialize the state at the proper value.
v6 of react-router-dom is now supported everywhere, and leaving the
event listener can cause navigation bugs.
See gkarat/ocp-advisor-frontend#101 as an example.
This commit updates the readme to reflect the use of
`@rtk-query/codegen` for generating API slice definitions and adds a new
script, `api.sh`, that is used to generate the API slices when the user
runs `npm run api`.