Wizard: Add validation for kernel step
This adds validation for the Kernel step.
This commit is contained in:
parent
2d011c52e1
commit
bfef28999d
5 changed files with 64 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import {
|
|||
clickBack,
|
||||
clickNext,
|
||||
enterBlueprintName,
|
||||
getNextButton,
|
||||
interceptBlueprintRequest,
|
||||
openAndDismissSaveAndBuildModal,
|
||||
verifyCancelButton,
|
||||
|
|
@ -121,6 +122,20 @@ describe('Step Kernel', () => {
|
|||
await openKernelNameOptions(kernelNameDropdown);
|
||||
await screen.findByText(CUSTOM_NAME);
|
||||
});
|
||||
|
||||
test('disable Next with invalid custom kernel name', async () => {
|
||||
await renderCreateMode();
|
||||
await goToKernelStep();
|
||||
|
||||
await selectCustomKernelName('-----------');
|
||||
await screen.findByText(/Invalid format/);
|
||||
const nextButton = await getNextButton();
|
||||
expect(nextButton).toBeDisabled();
|
||||
|
||||
await clearKernelName();
|
||||
expect(screen.queryByText(/Invalid format/)).not.toBeInTheDocument();
|
||||
expect(nextButton).toBeEnabled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Kernel request generated correctly', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue