change repo snapshot step to repeatable builds
This commit is contained in:
parent
a4034e8787
commit
38458810a0
15 changed files with 51 additions and 24 deletions
|
|
@ -427,7 +427,7 @@ describe('Import modal', () => {
|
|||
});
|
||||
expect(sizeValue).toBeInTheDocument();
|
||||
|
||||
// Repository snapshot
|
||||
// Repository snapshot/Repeatable builds
|
||||
await clickNext();
|
||||
|
||||
// Custom Repos step
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ describe('Create Image Wizard', () => {
|
|||
if (!process.env.IS_ON_PREMISE) {
|
||||
await screen.findByRole('button', { name: 'Register' });
|
||||
await screen.findByRole('button', { name: 'OpenSCAP' });
|
||||
await screen.findByRole('button', { name: 'Repository snapshot' });
|
||||
await screen.findByRole('button', { name: 'Repeatable build' });
|
||||
await screen.findByRole('button', { name: 'Custom repositories' });
|
||||
await screen.findByRole('button', {
|
||||
name: 'First boot script configuration',
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import {
|
|||
export const goToDetailsStep = async () => {
|
||||
await clickNext(); // OpenSCAP
|
||||
await clickNext(); // File system configuration
|
||||
await clickNext(); // Repository snapshot
|
||||
await clickNext(); // Repository snapshot/Repeatable builds
|
||||
await clickNext(); // Custom repositories
|
||||
await clickNext(); // Additional packages
|
||||
await clickNext(); // Users
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ const changePartitionUnitsToMiB = async () => {
|
|||
|
||||
const goToReviewStep = async () => {
|
||||
await clickNext(); // File system configuration
|
||||
await clickNext(); // Repository snapshot
|
||||
await clickNext(); // Repository snapshot/Repeatable builds
|
||||
await clickNext(); // Custom repositories
|
||||
await clickNext(); // Additional packages
|
||||
await clickNext(); // Users
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ const goToFirstBootStep = async (): Promise<void> => {
|
|||
await clickRegisterLater();
|
||||
await clickNext(); // OpenSCAP
|
||||
await clickNext(); // File system configuration
|
||||
await clickNext(); // Repository snapshot
|
||||
await clickNext(); // Repository snapshot/Repeatable builds
|
||||
await clickNext(); // Custom repositories
|
||||
await clickNext(); // Additional packages
|
||||
await clickNext(); // Users
|
||||
|
|
@ -69,7 +69,7 @@ const selectSimplifiedOscapProfile = async () => {
|
|||
|
||||
const goFromOscapToFirstBoot = async () => {
|
||||
await clickNext(); // File system configuration
|
||||
await clickNext(); // Repository snapshot
|
||||
await clickNext(); // Repository snapshot/Repeatable builds
|
||||
await clickNext(); // Custom repositories
|
||||
await clickNext(); // Additional packages
|
||||
await clickNext(); // Users
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ const goToPackagesStep = async () => {
|
|||
await clickRegisterLater();
|
||||
await clickNext(); // OpenSCAP
|
||||
await clickNext(); // File system configuration
|
||||
await clickNext(); // Repository snapshot
|
||||
await clickNext(); // Repository snapshot/Repeatable builds
|
||||
await clickNext(); // Custom repositories
|
||||
await clickNext(); // Additional packages
|
||||
};
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ const goToReviewStep = async () => {
|
|||
await clickNext(); // Registration
|
||||
await clickNext(); // OpenSCAP
|
||||
await clickNext(); // File system configuration
|
||||
await clickNext(); // Repository snapshot
|
||||
await clickNext(); // Repository snapshot/Repeatable builds
|
||||
await clickNext(); // Custom repositories
|
||||
await clickNext(); // Additional packages
|
||||
await clickNext(); // Users
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ const goToRepositoriesStep = async () => {
|
|||
await clickRegisterLater();
|
||||
await clickNext(); // OpenSCAP
|
||||
await clickNext(); // File system configuration
|
||||
await clickNext(); // Repository snapshot
|
||||
await clickNext(); // Repository snapshot/Repeatable builds
|
||||
await clickNext(); // Custom repositories
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ const handleRegistration = async () => {
|
|||
const goToReviewStep = async () => {
|
||||
await clickNext(); // OpenSCAP
|
||||
await clickNext(); // File system configuration
|
||||
await clickNext(); // Repository snapshot
|
||||
await clickNext(); // Repository snapshot/Repeatable builds
|
||||
await clickNext(); // Custom repositories
|
||||
await clickNext(); // Additional packages
|
||||
await clickNext(); // Users
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { userEvent } from '@testing-library/user-event';
|
|||
|
||||
import { CREATE_BLUEPRINT, EDIT_BLUEPRINT } from '../../../../../constants';
|
||||
import { CreateBlueprintRequest } from '../../../../../store/imageBuilderApi';
|
||||
import { yyyyMMddFormat } from '../../../../../Utilities/time';
|
||||
import { mockBlueprintIds } from '../../../../fixtures/blueprints';
|
||||
import {
|
||||
expectedCustomRepositories,
|
||||
|
|
@ -84,7 +85,7 @@ const clickBulkSelect = async () => {
|
|||
const selectUseSnapshot = async () => {
|
||||
const user = userEvent.setup();
|
||||
const snapshotRadio = await screen.findByRole('radio', {
|
||||
name: /Use a snapshot/i,
|
||||
name: /Enable repeatable build/i,
|
||||
});
|
||||
await waitFor(async () => user.click(snapshotRadio));
|
||||
};
|
||||
|
|
@ -94,9 +95,17 @@ const updateDatePickerWithValue = async (date: string) => {
|
|||
const dateTextbox = await screen.findByRole('textbox', {
|
||||
name: /Date picker/i,
|
||||
});
|
||||
await waitFor(async () => user.clear(dateTextbox));
|
||||
await waitFor(async () => user.type(dateTextbox, date));
|
||||
};
|
||||
|
||||
const datePickerValue = async () => {
|
||||
const dateTextbox = await screen.findByRole('textbox', {
|
||||
name: /Date picker/i,
|
||||
});
|
||||
return (dateTextbox as HTMLInputElement).value;
|
||||
};
|
||||
|
||||
const clickContentDropdown = async () => {
|
||||
const user = userEvent.setup();
|
||||
const contentExpandable = await screen.findByTestId('content-expandable');
|
||||
|
|
@ -143,6 +152,7 @@ describe('repository snapshot tab - ', () => {
|
|||
await goToSnapshotStep();
|
||||
await selectUseSnapshot();
|
||||
await updateDatePickerWithValue('2024-04-22');
|
||||
|
||||
await clickNext(); // To repositories step
|
||||
await selectFirstRepository();
|
||||
await goToReviewStep();
|
||||
|
|
@ -222,12 +232,14 @@ describe('repository snapshot tab - ', () => {
|
|||
await waitFor(() => {
|
||||
expect(nextBtn).toHaveAttribute('aria-disabled', 'false');
|
||||
});
|
||||
// Check the Next button is disabled after resetting the date
|
||||
// reset fills in the current date, so it should not be disabled
|
||||
await clickReset();
|
||||
await waitFor(() => {
|
||||
expect(nextBtn).toHaveAttribute('aria-disabled', 'true');
|
||||
expect(nextBtn).toHaveAttribute('aria-disabled', 'false');
|
||||
});
|
||||
await screen.findByText(/Date cannot be blank/i);
|
||||
|
||||
const dateStr = yyyyMMddFormat(new Date());
|
||||
expect(await datePickerValue()).toBe(dateStr);
|
||||
});
|
||||
|
||||
test('select using bulk select works ', async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue