diff --git a/tests/playwright/src/ai-lab-extension.spec.ts b/tests/playwright/src/ai-lab-extension.spec.ts index 699824979..7ad684c49 100644 --- a/tests/playwright/src/ai-lab-extension.spec.ts +++ b/tests/playwright/src/ai-lab-extension.spec.ts @@ -18,7 +18,13 @@ import type { Page } from '@playwright/test'; import type { DashboardPage, ExtensionsPage, Runner } from '@podman-desktop/tests-playwright'; -import { NavigationBar, expect as playExpect, test, RunnerOptions, waitForPodmanMachineStartup } from '@podman-desktop/tests-playwright'; +import { + NavigationBar, + expect as playExpect, + test, + RunnerOptions, + waitForPodmanMachineStartup, +} from '@podman-desktop/tests-playwright'; import { AILabPage } from './model/ai-lab-page'; import type { AILabRecipesCatalogPage } from './model/ai-lab-recipes-catalog-page'; import type { AILabAppDetailsPage } from './model/ai-lab-app-details-page'; @@ -30,7 +36,11 @@ const AI_LAB_CATALOG_EXTENSION_LABEL: string = 'redhat.ai-lab'; const AI_LAB_NAVBAR_EXTENSION_LABEL: string = 'AI Lab'; const AI_LAB_PAGE_BODY_LABEL: string = 'Webview AI Lab'; const AI_LAB_AI_APP_NAME: string = 'ChatBot'; -const isLinux = os.platform() === 'linux'; +const isWindows = os.platform() === 'win32'; +const isCI = process.env.AI_LAB_CI_RUN; +const customSettingsPodmanPath = isWindows + ? `${process.env.USERPROFILE}\\tools\\podman\\podman-5.2.0\\usr\\bin\\podman.exe` + : '/usr/bin/podman'; //todo: need to get podman path for linux and mac let webview: Page; let aiLabPage: AILabPage; @@ -41,7 +51,21 @@ let dashboardPage: DashboardPage; let extensionsPage: ExtensionsPage; test.use({ - runnerOptions: new RunnerOptions({ customFolder: 'ai-lab-tests-pd' }), + runnerOptions: new RunnerOptions({ + customFolder: 'ai-lab-e2e', + autoCheckUpdates: false, + autoUpdate: false, + extesionsDisabled: [ + 'podman-desktop.compose', + 'podman-desktop.docker', + 'podman-desktop.kind', + 'podman-desktop.kube-context', + 'podman-desktop.kubectl-cli', + 'podman-desktop.registries', + 'podman-desktop.lima', + ], + binaryPath: isCI ? customSettingsPodmanPath : undefined, + }), }); test.beforeAll(async ({ runner, welcomePage, page }) => { runner.setVideoAndTraceName('ai-lab-e2e'); @@ -79,7 +103,7 @@ test.describe.serial(`AI Lab extension installation and verification`, () => { }); }); test.describe.serial(`AI Lab extension verification`, () => { - test.skip(isLinux, `Skipping AI App deployment on Linux`); + test.skip(os.platform() === 'linux', `Skipping AI App deployment on Linux`); test(`Open Recipes Catalog`, async () => { recipesCatalogPage = await aiLabPage.navigationBar.openRecipesCatalog(); await recipesCatalogPage.waitForLoad();