test/CreateImageWizard: add basic render for cockpit tests
This commit is contained in:
parent
73afbc2b51
commit
d10620cc56
4 changed files with 31 additions and 10 deletions
|
|
@ -45,17 +45,25 @@ describe('Create Image Wizard', () => {
|
|||
// check navigation
|
||||
await screen.findByRole('button', { name: 'Image output' });
|
||||
await screen.findByRole('button', { name: 'Optional steps' });
|
||||
await screen.findByRole('button', { name: 'Register' });
|
||||
await screen.findByRole('button', { name: 'OpenSCAP' });
|
||||
await screen.findByRole('button', { name: 'File system configuration' });
|
||||
await screen.findByRole('button', { name: 'Repository snapshot' });
|
||||
await screen.findByRole('button', { name: 'Custom repositories' });
|
||||
await screen.findByRole('button', { name: 'Additional packages' });
|
||||
await screen.findByRole('button', {
|
||||
name: 'First boot script configuration',
|
||||
});
|
||||
await screen.findByRole('button', { name: 'Users' });
|
||||
await screen.findByRole('button', { name: 'Timezone' });
|
||||
await screen.findByRole('button', { name: 'Hostname' });
|
||||
await screen.findByRole('button', { name: 'Kernel' });
|
||||
await screen.findByRole('button', { name: 'Firewall' });
|
||||
await screen.findByRole('button', { name: 'Systemd services' });
|
||||
await screen.findByRole('button', { name: 'Details' });
|
||||
await screen.findByRole('button', { name: 'Review' });
|
||||
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: 'Custom repositories' });
|
||||
await screen.findByRole('button', {
|
||||
name: 'First boot script configuration',
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,10 @@ const routes = [
|
|||
path: 'insights/image-builder/imagewizard/:composeId?',
|
||||
element: <ImageWizard />,
|
||||
},
|
||||
{
|
||||
path: '/imageWizard',
|
||||
element: <ImageWizard />,
|
||||
},
|
||||
];
|
||||
|
||||
export const imageRequest: ImageRequest = {
|
||||
|
|
@ -64,11 +68,11 @@ export const blueprintRequest: CreateBlueprintRequest = {
|
|||
* // returns 'imageWizard?release=rhel8&architecture=aarch64'
|
||||
* preparePathname({ release: 'rhel8', architecture: 'aarch64' });
|
||||
* @example
|
||||
* // returns 'imageWizard'
|
||||
* // returns '(/)imageWizard'
|
||||
* preparePathname({});
|
||||
*/
|
||||
function preparePathname(searchParams: { [key: string]: string } = {}): string {
|
||||
let pathName = 'imageWizard';
|
||||
let pathName = process.env.IS_ON_PREMISE ? '/imageWizard' : 'imageWizard';
|
||||
const params = Object.entries(searchParams).map(
|
||||
([param, value]) => `${param}=${value}`
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue