test: Replace image installer with guest image in happy path tests

This replaces 'image-installer' target with 'guest-image' in happy path tests which allows proper testing of FSC functionality. File system customisations are not applied to bare metal - installer images.
This commit is contained in:
regexowl 2024-04-29 10:32:48 +02:00 committed by Lucas Garfield
parent ec8cf1c8b9
commit 6494070a40
7 changed files with 21 additions and 21 deletions

View file

@ -31,10 +31,10 @@ jest.mock('@redhat-cloud-services/frontend-components/useChrome', () => ({
}));
const goToFileSystemConfigurationStep = async () => {
const bareMetalCheckBox = await screen.findByRole('checkbox', {
name: /bare metal installer checkbox/i,
const guestImageCheckBox = await screen.findByRole('checkbox', {
name: /virtualization guest image checkbox/i,
});
await userEvent.click(bareMetalCheckBox);
await userEvent.click(guestImageCheckBox);
await clickNext(); // Registration
await clickRegisterLater();
await clickNext(); // OpenSCAP

View file

@ -32,10 +32,10 @@ jest.mock('@redhat-cloud-services/frontend-components/useChrome', () => ({
}));
const goToOscapStep = async () => {
const bareMetalCheckBox = await screen.findByRole('checkbox', {
name: /bare metal installer checkbox/i,
const guestImageCheckBox = await screen.findByRole('checkbox', {
name: /virtualization guest image checkbox/i,
});
await userEvent.click(bareMetalCheckBox);
await userEvent.click(guestImageCheckBox);
await clickNext(); // Registration
await clickRegisterLater();
await clickNext(); // OpenSCAP

View file

@ -39,10 +39,10 @@ jest.mock('@unleash/proxy-client-react', () => ({
}));
const goToPackagesStep = async () => {
const bareMetalCheckBox = await screen.findByRole('checkbox', {
name: /bare metal installer checkbox/i,
const guestImageCheckBox = await screen.findByRole('checkbox', {
name: /virtualization guest image checkbox/i,
});
await userEvent.click(bareMetalCheckBox);
await userEvent.click(guestImageCheckBox);
await clickNext(); // Registration
await clickRegisterLater();
await clickNext(); // OpenSCAP

View file

@ -78,7 +78,7 @@ const goToReviewStep = async () => {
describe('registration request generated correctly', () => {
const imageRequest: ImageRequest = {
architecture: 'x86_64',
image_type: 'image-installer',
image_type: 'guest-image',
upload_request: {
options: {},
type: 'aws.s3',

View file

@ -1,4 +1,4 @@
import { findByLabelText, screen } from '@testing-library/react';
import { screen } from '@testing-library/react';
import { userEvent } from '@testing-library/user-event';
import { CREATE_BLUEPRINT } from '../../../../../constants';
@ -36,10 +36,10 @@ jest.mock('@redhat-cloud-services/frontend-components/useChrome', () => ({
}));
const goToRepositoriesStep = async () => {
const bareMetalCheckBox = await screen.findByRole('checkbox', {
name: /bare metal installer checkbox/i,
const guestImageCheckBox = await screen.findByRole('checkbox', {
name: /virtualization guest image checkbox/i,
});
await userEvent.click(bareMetalCheckBox);
await userEvent.click(guestImageCheckBox);
await clickNext(); // Registration
await clickRegisterLater();
await clickNext(); // OpenSCAP

View file

@ -36,10 +36,10 @@ jest.mock('@redhat-cloud-services/frontend-components/useChrome', () => ({
}));
const goToSnapshotStep = async () => {
const bareMetalCheckBox = await screen.findByRole('checkbox', {
name: /bare metal installer checkbox/i,
const guestImageCheckBox = await screen.findByRole('checkbox', {
name: /virtualization guest image checkbox/i,
});
await userEvent.click(bareMetalCheckBox);
await userEvent.click(guestImageCheckBox);
await clickNext(); // Registration
await clickRegisterLater();
await clickNext(); // OpenSCAP

View file

@ -40,7 +40,7 @@ const routes = [
export const imageRequest: ImageRequest = {
architecture: 'x86_64',
image_type: 'image-installer',
image_type: 'guest-image',
upload_request: {
options: {},
type: 'aws.s3',
@ -80,10 +80,10 @@ export const render = async (searchParams = {}) => {
};
export const goToRegistrationStep = async () => {
const bareMetalCheckBox = await screen.findByRole('checkbox', {
name: /bare metal installer checkbox/i,
const guestImageCheckBox = await screen.findByRole('checkbox', {
name: /virtualization guest image checkbox/i,
});
await userEvent.click(bareMetalCheckBox);
await userEvent.click(guestImageCheckBox);
await clickNext();
};