Skip to content

Commit 8a1a4be

Browse files
authored
chore(tests): enhance pushing image to kind method (podman-desktop#11494)
* chore(tests): enhance pushing image to kind method Signed-off-by: Tamara Babalova <[email protected]> * chore(test): increase timeout for stabilization Signed-off-by: Tamara Babalova <[email protected]> * chore(test): address changes Signed-off-by: Tamara Babalova <[email protected]> --------- Signed-off-by: Tamara Babalova <[email protected]>
1 parent 29ec0e8 commit 8a1a4be

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/playwright/src/model/pages/image-details-page.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,19 @@ export class ImageDetailsPage extends DetailsPage {
122122
}
123123

124124
async pushImageToKindCluster(): Promise<void> {
125-
const pushToKindButton = this.page.getByRole('button', { name: 'Push image to Kind cluster' });
125+
const kebabMenuButton = this.controlActions.getByRole('button', { name: 'kebab menu', exact: true });
126+
let pushToKindButton;
127+
const pushToKindName = 'Push image to Kind Cluster';
128+
129+
if ((await kebabMenuButton.count()) > 0) {
130+
await kebabMenuButton.click();
131+
pushToKindButton = this.controlActions.getByTitle('Drop Down Menu Items').getByTitle(pushToKindName);
132+
} else {
133+
pushToKindButton = this.controlActions.getByRole('button', { name: pushToKindName });
134+
}
126135
await playExpect(pushToKindButton).toBeVisible();
127136
await pushToKindButton.click();
128137

129-
await handleConfirmationDialog(this.page, 'Kind', true, 'OK', '', 15_000);
138+
await handleConfirmationDialog(this.page, 'Kind', true, 'OK', '', 30_000);
130139
}
131140
}

0 commit comments

Comments
 (0)