Wizard: Swap release select

This replaces deprecated PF4 select with non-deprecated PF5 one.
This commit is contained in:
regexowl 2025-03-05 11:50:37 +01:00 committed by Lucas Garfield
parent dcd1bb6fc9
commit 54983cddf9
4 changed files with 51 additions and 40 deletions

View file

@ -45,15 +45,13 @@ let router: RemixRouter | undefined = undefined;
const openReleaseMenu = async () => {
const user = userEvent.setup();
const releaseMenu = screen.getAllByRole('button', {
name: /options menu/i,
})[0];
const releaseMenu = screen.getByTestId('release_select');
await waitFor(() => user.click(releaseMenu));
};
const clickShowOptions = async () => {
const user = userEvent.setup();
const showOptions = await screen.findByRole('button', {
const showOptions = await screen.findByRole('option', {
name: /show options for further development of rhel/i,
});
await waitFor(() => user.click(showOptions));
@ -220,7 +218,7 @@ describe('Step Image output', () => {
await screen.findAllByRole('option', {
name: /Red Hat Enterprise Linux \(RHEL\) 9/,
});
await screen.findByRole('button', {
await screen.findByRole('option', {
name: 'Show options for further development of RHEL',
});
});
@ -229,7 +227,7 @@ describe('Step Image output', () => {
await renderCreateMode();
await openReleaseMenu();
const showOptionsButton = await screen.findByRole('button', {
const showOptionsButton = await screen.findByRole('option', {
name: 'Show options for further development of RHEL',
});
user.click(showOptionsButton);

View file

@ -30,13 +30,7 @@ import {
const selectRhel8 = async () => {
const user = userEvent.setup();
await waitFor(async () =>
user.click(
screen.getAllByRole('button', {
name: /options menu/i,
})[0]
)
);
await waitFor(async () => user.click(screen.getByTestId('release_select')));
const rhel8 = await screen.findByRole('option', {
name: /red hat enterprise linux \(rhel\) 8/i,
});

View file

@ -28,12 +28,10 @@ const setupWithRhel = async () => {
const setupWithCentos = async () => {
const user = userEvent.setup();
await renderCreateMode();
const releaseMenu = screen.getAllByRole('button', {
name: /options menu/i,
})[0];
const releaseMenu = screen.getByTestId('release_select');
await waitFor(() => user.click(releaseMenu));
const showOptionsButton = await screen.findByRole('button', {
const showOptionsButton = await screen.findByRole('option', {
name: 'Show options for further development of RHEL',
});
await waitFor(() => user.click(showOptionsButton));