Wizard: Add kernel to Review step
This adds a kernel expandable to the Review step.
This commit is contained in:
parent
aa8086176b
commit
96d68583a3
3 changed files with 75 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import type { Router as RemixRouter } from '@remix-run/router';
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { screen, waitFor, within } from '@testing-library/react';
|
||||
import { userEvent } from '@testing-library/user-event';
|
||||
|
||||
import { CREATE_BLUEPRINT } from '../../../../../constants';
|
||||
|
|
@ -140,6 +140,13 @@ const selectProfile = async () => {
|
|||
await waitFor(() => user.click(cis1Profile));
|
||||
};
|
||||
|
||||
const clickRevisitButton = async () => {
|
||||
const user = userEvent.setup();
|
||||
const expandable = await screen.findByTestId('kernel-expandable');
|
||||
const revisitButton = await within(expandable).findByTestId('revisit-kernel');
|
||||
await waitFor(() => user.click(revisitButton));
|
||||
};
|
||||
|
||||
describe('Step Kernel', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
|
|
@ -219,6 +226,15 @@ describe('Step Kernel', () => {
|
|||
screen.queryByRole('button', { name: /close audit=1/i })
|
||||
).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('revisit step button on Review works', async () => {
|
||||
await renderCreateMode();
|
||||
await goToKernelStep();
|
||||
await selectKernelName('kernel');
|
||||
await goToReviewStep();
|
||||
await clickRevisitButton();
|
||||
await screen.findByRole('heading', { name: /Kernel/ });
|
||||
});
|
||||
});
|
||||
|
||||
describe('Kernel request generated correctly', () => {
|
||||
|
|
@ -333,5 +349,4 @@ describe('Kernel request generated correctly', () => {
|
|||
});
|
||||
});
|
||||
|
||||
// TO DO 'Kernel step' -> 'revisit step button on Review works'
|
||||
// TO DO 'Kernel edit mode'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue