CreateImageWizard: add registration validation
If register now is selected, an activation key is required. If no activation key is entered the Next and Create buttons are disabled. Also, if the activation key is empty an error message will appear to prompt the user to enter an activation key. The subscription errors variable is removed in favor of declaring the error message directly in the registration step component. The validateSubscription function is removed in favor of validating the activation key field on change.
This commit is contained in:
parent
6d147c95fc
commit
f00cf08506
5 changed files with 54 additions and 53 deletions
|
|
@ -509,11 +509,9 @@ describe('Click through all steps', () => {
|
|||
.click();
|
||||
await screen.findByTestId('subscription-activation');
|
||||
userEvent.clear(screen.getByTestId('subscription-activation'));
|
||||
next.click();
|
||||
|
||||
// packages
|
||||
screen.getByText('Optionally add additional packages to your image');
|
||||
next.click();
|
||||
const sidebar = screen.getByRole('navigation');
|
||||
const reviewStep = getByText(sidebar, 'Review');
|
||||
reviewStep.click();
|
||||
|
||||
await screen.
|
||||
findByText('Review the information and click Create image to create the image using the following criteria.');
|
||||
|
|
@ -546,11 +544,9 @@ describe('Click through all steps', () => {
|
|||
.click();
|
||||
await screen.findByTestId('subscription-activation');
|
||||
userEvent.clear(screen.getByTestId('subscription-activation'));
|
||||
next.click();
|
||||
|
||||
// packages
|
||||
screen.getByText('Optionally add additional packages to your image');
|
||||
next.click();
|
||||
const sidebar = screen.getByRole('navigation');
|
||||
const reviewStep = getByText(sidebar, 'Review');
|
||||
reviewStep.click();
|
||||
|
||||
await screen.
|
||||
findByText('Review the information and click Create image to create the image using the following criteria.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue