test: Add Review and finish button tests

This add tests to check whether the Review and finish button works properly, sending user to the Details step. And whether it's disabled when the state is invalid.
This commit is contained in:
regexowl 2024-09-03 15:06:29 +02:00 committed by Lucas Garfield
parent 558bb50c34
commit 3ae642b848
8 changed files with 137 additions and 5 deletions

View file

@ -15,6 +15,7 @@ import {
import {
clickBack,
clickNext,
clickReviewAndFinish,
verifyCancelButton,
} from '../../wizardTestUtils';
import { selectCustomRepo } from '../../wizardTestUtils';
@ -196,6 +197,15 @@ describe('Step Packages', () => {
await verifyCancelButton(router);
});
test('clicking Review and finish leads to Details', async () => {
await renderCreateMode();
await goToPackagesStep();
await clickReviewAndFinish();
await screen.findByRole('heading', {
name: 'Details',
});
});
test('should display search bar and toggle buttons', async () => {
await renderCreateMode();
await goToPackagesStep();