tests: there's now two option-menu to select from

Adding a new select into the images output step had for effet to
mechanically add a new option menu. In order to select the release
menu we have to take now the first option menu of all possibilities.

Refs HMS-1135
This commit is contained in:
Thomas Lavocat 2023-10-16 10:59:24 +02:00 committed by jkozol
parent 826882d1ef
commit e2c3ea98b3

View file

@ -193,9 +193,9 @@ describe('Step Image output', () => {
test('expect only RHEL releases before expansion', async () => {
await setUp();
const releaseMenu = screen.getByRole('button', {
const releaseMenu = screen.getAllByRole('button', {
name: /options menu/i,
});
})[0];
await user.click(releaseMenu);
await screen.findByRole('option', {
@ -214,9 +214,9 @@ describe('Step Image output', () => {
test('expect all releases after expansion', async () => {
await setUp();
const releaseMenu = screen.getByRole('button', {
const releaseMenu = screen.getAllByRole('button', {
name: /options menu/i,
});
})[0];
await user.click(releaseMenu);
const showOptionsButton = screen.getByRole('button', {
@ -245,9 +245,9 @@ describe('Step Image output', () => {
test('CentOS acknowledgement appears', async () => {
await setUp();
const releaseMenu = screen.getByRole('button', {
const releaseMenu = screen.getAllByRole('button', {
name: /options menu/i,
});
})[0];
await user.click(releaseMenu);
const showOptionsButton = screen.getByRole('button', {
@ -915,9 +915,9 @@ describe('Step Review', () => {
const setUpCentOS = async () => {
({ router } = renderCustomRoutesWithReduxRouter('imagewizard', {}, routes));
const releaseMenu = screen.getByRole('button', {
const releaseMenu = screen.getAllByRole('button', {
name: /options menu/i,
});
})[0];
await user.click(releaseMenu);
const showOptionsButton = screen.getByRole('button', {