Skip to content

Commit 97a0e5e

Browse files
authored
chore(tests,ci): adding reset dialog confirmation after application restart (#3690)
Signed-off-by: Tibor Dancs <[email protected]>
1 parent 071ebe3 commit 97a0e5e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/playwright/src/ai-lab-extension.spec.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ import {
3737
isMac,
3838
isCI,
3939
resetPodmanMachinesFromCLI,
40+
handleConfirmationDialog,
41+
podmanAILabExtension,
4042
} from '@podman-desktop/tests-playwright';
4143
import type { AILabDashboardPage } from './model/ai-lab-dashboard-page';
4244
import type { AILabRecipesCatalogPage } from './model/ai-lab-recipes-catalog-page';
@@ -731,7 +733,12 @@ async function restartApp(appName: string): Promise<void> {
731733
.poll(async () => await aiRunningAppsPage.getCurrentStatusForApp(appName), { timeout: 60_000 })
732734
.toBe('RUNNING');
733735
await aiRunningAppsPage.restartApp(appName);
734-
736+
// handle possible reset project confirmation dialog https://github.com/containers/podman-desktop-extension-ai-lab/issues/3663
737+
try {
738+
await handleConfirmationDialog(aiLabPage.page, podmanAILabExtension.extensionName, true, 'Reset', 'Cancel', 25_000);
739+
} catch (error) {
740+
console.warn(`Warning: Could not reset the app, repository probably clean.\n\t${error}`);
741+
}
735742
const appProgressBar = aiApp.getByRole('progressbar', { name: 'Loading' });
736743
await playExpect(appProgressBar).toBeVisible({ timeout: 60_000 });
737744
await playExpect

0 commit comments

Comments
 (0)