From b1554b47f00ba8fd9951b4bfb02da7ca947a1070 Mon Sep 17 00:00:00 2001 From: Tibor Dancs Date: Mon, 2 Sep 2024 13:08:50 +0200 Subject: [PATCH] chore(tests): removing all of vitest from AI Lab tests Signed-off-by: Tibor Dancs --- tests/playwright/src/ai-lab-extension.spec.ts | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/tests/playwright/src/ai-lab-extension.spec.ts b/tests/playwright/src/ai-lab-extension.spec.ts index f69834958..0f0ac6ae2 100644 --- a/tests/playwright/src/ai-lab-extension.spec.ts +++ b/tests/playwright/src/ai-lab-extension.spec.ts @@ -17,9 +17,8 @@ ***********************************************************************/ import type { Page } from '@playwright/test'; -import { expect as playExpect } from '@playwright/test'; -import { afterAll, beforeAll, beforeEach, describe, test } from 'vitest'; -import type { DashboardPage, ExtensionsPage, RunnerTestContext } from '@podman-desktop/tests-playwright'; +import { expect as playExpect, test } from '@playwright/test'; +import type { DashboardPage, ExtensionsPage } from '@podman-desktop/tests-playwright'; import { NavigationBar, WelcomePage, @@ -49,7 +48,7 @@ let navigationBar: NavigationBar; let dashboardPage: DashboardPage; let extensionsPage: ExtensionsPage; -beforeAll(async () => { +test.beforeAll(async () => { pdRunner = new PodmanDesktopRunner({ customFolder: 'ai-lab-tests-pd', autoUpdate: false, autoCheckUpdate: false }); page = await pdRunner.start(); pdRunner.setVideoAndTraceName('ai-lab-e2e'); @@ -60,16 +59,12 @@ beforeAll(async () => { await pdRunner.screenshot('ai-lab-tests-dashboard-podman-machine.png'); }); -beforeEach(async ctx => { - ctx.pdRunner = pdRunner; -}); - -afterAll(async () => { +test.afterAll(async () => { await pdRunner.close(); }); -describe(`AI Lab extension installation and verification`, async () => { - describe(`AI Lab extension installation`, async () => { +test.describe.serial(`AI Lab extension installation and verification`, () => { + test.describe.serial(`AI Lab extension installation`, () => { test(`Open Settings -> Extensions page`, async () => { dashboardPage = await navigationBar.openDashboard(); await playExpect(dashboardPage.mainPage).toBeVisible(); @@ -90,12 +85,14 @@ describe(`AI Lab extension installation and verification`, async () => { await aiLabPage.waitForLoad(); }); }); - describe.skipIf(isLinux)(`AI Lab extension verification`, async () => { + test.describe.serial(`AI Lab extension verification`, () => { + test.skip(isLinux, `Skipping AI App deployment on Linux`); test(`Open Recipes Catalog`, async () => { recipesCatalogPage = await aiLabPage.navigationBar.openRecipesCatalog(); await recipesCatalogPage.waitForLoad(); }); - test(`Install ChatBot example app`, { timeout: 780_000 }, async () => { + test(`Install ChatBot example app`, async () => { + test.setTimeout(780_000); const chatBotApp: AILabAppDetailsPage = await recipesCatalogPage.openRecipesCatalogApp( recipesCatalogPage.recipesCatalogNaturalLanguageProcessing, AI_LAB_AI_APP_NAME,