From cce30a74dae9076fb9c5eada116492ed4cdbb823 Mon Sep 17 00:00:00 2001 From: Vladimir Lazar <106525396+cbr7@users.noreply.github.com> Date: Fri, 8 Mar 2024 11:41:38 +0100 Subject: [PATCH] chore(tests): fix onboard tests running on linux (#6328) fixes issue with running onboarding tests on linux platform Signed-off-by: Vladimir Lazar --- ...odman-machine-dashboard-onboarding.spec.ts | 39 ++++++++++--------- tests/src/podman-machine-onboarding.spec.ts | 3 +- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/tests/src/podman-machine-dashboard-onboarding.spec.ts b/tests/src/podman-machine-dashboard-onboarding.spec.ts index 4c2920c742d44..9c5fb020f55af 100644 --- a/tests/src/podman-machine-dashboard-onboarding.spec.ts +++ b/tests/src/podman-machine-dashboard-onboarding.spec.ts @@ -24,6 +24,7 @@ import { PodmanDesktopRunner } from './runner/podman-desktop-runner'; import { WelcomePage } from './model/pages/welcome-page'; import { deletePodmanMachine } from './utility/operations'; import { NavigationBar } from './model/workbench/navigation'; +import * as os from 'node:os'; let pdRunner: PodmanDesktopRunner; let page: Page; @@ -52,22 +53,24 @@ afterAll(async () => { await pdRunner.close(); }); -describe.runIf(process.env.TEST_PODMAN_MACHINE !== undefined && process.env.TEST_PODMAN_MACHINE === 'true')( - `Podman machine onboarding from Dashboard`, - async () => { - test('Create Podman machine from Dashboard', async () => { - const navigationBar = new NavigationBar(page); - const dashboardPage = await navigationBar.openDashboard(); - await playExpect(dashboardPage.initilizeAndStartButton).toBeEnabled(); - await dashboardPage.initilizeAndStartButton.click(); - await playExpect(dashboardPage.podmanMachineConnectionStatus).toHaveText('RUNNING', { timeout: 300000 }); - }, 320000); +describe.skipIf(os.platform() === 'linux')(async () => { + describe.runIf(process.env.TEST_PODMAN_MACHINE !== undefined && process.env.TEST_PODMAN_MACHINE === 'true')( + `Podman machine onboarding from Dashboard`, + async () => { + test('Create Podman machine from Dashboard', async () => { + const navigationBar = new NavigationBar(page); + const dashboardPage = await navigationBar.openDashboard(); + await playExpect(dashboardPage.initilizeAndStartButton).toBeEnabled(); + await dashboardPage.initilizeAndStartButton.click(); + await playExpect(dashboardPage.podmanMachineConnectionStatus).toHaveText('RUNNING', { timeout: 300000 }); + }, 320000); - test.runIf(process.env.MACHINE_CLEANUP !== undefined && process.env.MACHINE_CLEANUP === 'true')( - 'Clean Up Podman Machine', - async () => { - await deletePodmanMachine(page, PODMAN_MACHINE_NAME); - }, - ); - }, -); + test.runIf(process.env.MACHINE_CLEANUP !== undefined && process.env.MACHINE_CLEANUP === 'true')( + 'Clean Up Podman Machine', + async () => { + await deletePodmanMachine(page, PODMAN_MACHINE_NAME); + }, + ); + }, + ); +}); diff --git a/tests/src/podman-machine-onboarding.spec.ts b/tests/src/podman-machine-onboarding.spec.ts index bc2aef5e6283d..1a950de89b4d1 100644 --- a/tests/src/podman-machine-onboarding.spec.ts +++ b/tests/src/podman-machine-onboarding.spec.ts @@ -31,6 +31,7 @@ import { deletePodmanMachine } from './utility/operations'; import { PodmanOnboardingPage } from './model/pages/podman-onboarding-page'; import { ResourcesPodmanConnections } from './model/pages/resources-podman-connections-page'; import { PodmanMachineDetails } from './model/pages/podman-machine-details-page'; +import * as os from 'node:os'; const PODMAN_MACHINE_STARTUP_TIMEOUT: number = 360_000; const PODMAN_MACHINE_NAME: string = 'Podman Machine'; @@ -71,7 +72,7 @@ beforeEach(async ctx => { ctx.pdRunner = pdRunner; }); -describe('Podman Machine verification', async () => { +describe.skipIf(os.platform() === 'linux')('Podman Machine verification', async () => { describe('Podman Machine onboarding workflow', async () => { test('Setup Podman push notification is present', async () => { dashboardPage = await navigationBar.openDashboard();