@podman-desktop/tests-playwright 1.25.0-next.202512231026-ece8eb4 → 1.25.0-next.202512231505-a3cea86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/utility/cleanup.ts","../src/globalSetup/global-setup.ts","../src/utility/platform.ts","../src/model/core/states.ts","../src/model/core/operations.ts","../src/model/core/types.ts","../src/model/pages/base-page.ts","../src/model/pages/settings-page.ts","../src/model/pages/cli-tools-page.ts","../src/model/pages/experimental-page.ts","../src/model/pages/preferences-page.ts","../src/model/pages/registries-page.ts","../src/model/pages/resource-card-page.ts","../src/model/pages/resource-connection-card-page.ts","../src/model/pages/resources-page.ts","../src/model/pages/settings-bar.ts","../src/model/pages/details-page.ts","../src/model/pages/create-volume-page.ts","../src/model/pages/main-page.ts","../src/model/pages/volumes-page.ts","../src/model/pages/volume-details-page.ts","../src/utility/operations.ts","../src/model/core/platforms.ts","../src/model/pages/image-edit-page.ts","../src/model/pages/deploy-to-kubernetes-page.ts","../src/model/pages/container-details-page.ts","../src/model/pages/run-image-page.ts","../src/model/pages/image-details-page.ts","../src/model/pages/pull-image-page.ts","../src/model/pages/images-page.ts","../src/model/pages/build-image-page.ts","../src/model/pages/podman-kube-play-page.ts","../src/model/pages/pods-details-page.ts","../src/model/pages/pods-page.ts","../src/model/pages/create-pod-page.ts","../src/model/pages/select-image-page.ts","../src/model/pages/containers-page.ts","../src/model/pages/dashboard-page.ts","../src/model/pages/extension-details-page.ts","../src/model/pages/extension-card-page.ts","../src/model/pages/extensions-page.ts","../src/model/pages/kubernetes-dashboard-page.ts","../src/model/pages/kubernetes-resource-details-page.ts","../src/model/pages/kubernetes-resource-page.ts","../src/model/pages/kubernetes-bar.ts","../src/model/pages/network-details-page.ts","../src/model/pages/create-network-page.ts","../src/model/pages/networks-page.ts","../src/model/workbench/navigation.ts","../src/utility/wait.ts","../src/runner/runner-options.ts","../src/runner/podman-desktop-runner.ts","../src/setupFiles/setup-registry.ts","../src/utility/auth-utils.ts","../src/model/pages/cluster-creation-base-page.ts","../src/model/pages/create-kind-cluster-page.ts","../src/model/pages/resource-details-page.ts","../src/model/pages/tasks-page.ts","../src/model/workbench/status-bar.ts","../src/utility/cluster-operations.ts","../src/model/pages/welcome-page.ts","../src/utility/fixtures.ts","../src/utility/kubernetes.ts","../src/utility/provider.ts","../src/model/core/extensions.ts","../src/model/pages/authentication-page.ts","../src/model/pages/command-palette.ts","../src/model/pages/onboarding-page.ts","../src/model/pages/compose-onboarding/compose-onboarding-page.ts","../src/model/pages/compose-onboarding/compose-failed-page.ts","../src/model/pages/compose-onboarding/compose-local-install-page.ts","../src/model/pages/compose-onboarding/compose-version-page.ts","../src/model/pages/compose-onboarding/compose-wide-install-page.ts","../src/model/components/dropdown-component.ts","../src/model/pages/forms/machine-creation-form.ts","../src/model/pages/create-machine-page.ts","../src/model/pages/docker-compatibility-page.ts","../src/model/pages/extension-catalog-card-page.ts","../src/model/pages/kubernetes-context-page.ts","../src/model/pages/podman-machine-details-page.ts","../src/model/pages/podman-onboarding-page.ts","../src/model/pages/resource-cli-card-page.ts","../src/model/pages/troubleshooting-page.ts"],"sourcesContent":["/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { existsSync, rmSync } from 'node:fs';\n\n/**\n * Force remove recursively folder, if exists\n * @param path path to a folder to be force removed recursively\n */\nexport async function removeFolderIfExists(path: string): Promise<void> {\n console.log(`Cleaning up folder: ${path}`);\n\n if (existsSync(path)) {\n console.log('Folder found, removing...');\n rmSync(path, { recursive: true, force: true, maxRetries: 5 });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { removeFolderIfExists } from '/@/utility/cleanup';\n\nlet setupCalled = false;\nlet teardownCalled = false;\n\nexport async function setup(): Promise<void> {\n if (!setupCalled) {\n // remove all previous testing output files\n // Junit reporter output file is created before we can clean up output folders\n // It is not possible to remove junit output file because it is opened by the process already, at least on windows\n if (!process.env.CI && !process.env.SKIP_REMOVE_FOLDER) {\n await removeFolderIfExists('tests/output');\n } else {\n console.log(\n 'On CI, skipping before All tests/output cleanup, see https://github.com/containers/podman-desktop/issues/5460',\n );\n }\n setupCalled = true;\n }\n}\n\nexport async function teardown(): Promise<void> {\n if (!teardownCalled) {\n // here comes teardown logic\n teardownCalled = true;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport * as os from 'node:os';\n\nexport const isLinux = os.platform() === 'linux';\nexport const isMac = os.platform() === 'darwin';\nexport const isWindows = os.platform() === 'win32';\nexport const archType = os.arch();\n\n// powershell $true value is 'True', we need to make it a lowercase first\nexport const isCI = String(process.env.CI).toLowerCase() === 'true';\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nexport enum ContainerState {\n Starting = 'STARTING',\n Stopping = 'STOPPING',\n Running = 'RUNNING',\n Error = 'ERROR',\n Exited = 'EXITED',\n Deleting = 'DELETING',\n Created = 'CREATED',\n Paused = 'PAUSED',\n Stopped = 'STOPPED',\n Unknown = 'UNKNOWN',\n}\n\nexport enum PodState {\n Created = 'CREATED',\n Running = 'RUNNING',\n Stopped = 'STOPPED',\n Exited = 'EXITED',\n Dead = 'DEAD',\n Starting = 'STARTING',\n Stopping = 'STOPPING',\n Deleting = 'DELETING',\n Restarting = 'RESTARTING',\n Degraded = 'DEGRADED',\n Paused = 'PAUSED',\n Unknown = 'UNKNOWN',\n}\n\nexport enum VolumeState {\n Used = 'USED',\n Unused = 'UNUSED',\n}\n\nexport enum ResourceElementState {\n Running = 'RUNNING',\n Off = 'OFF',\n Starting = 'STARTING',\n}\n\nexport enum KubernetesResourceState {\n Starting = 'STARTING',\n Running = 'RUNNING',\n Stopped = 'STOPPED',\n Unknown = 'UNKNOWN',\n Succeeded = 'SUCCEEDED',\n None = '',\n}\nexport enum ExtensionState {\n Disabled = 'DISABLED',\n Active = 'ACTIVE',\n Running = 'RUNNING',\n NotInstalled = 'NOT-INSTALLED',\n Downloadable = 'DOWNLOADABLE',\n}\n\nexport enum ImageState {\n Used = 'USED',\n Unused = 'UNUSED',\n}\n\nexport enum TaskState {\n Canceled = 'canceled',\n Success = 'success',\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nexport enum ResourceElementActions {\n Start = 'Start',\n Restart = 'Restart',\n Stop = 'Stop',\n Delete = 'Delete',\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nexport interface ContainerInteractiveParams {\n interactive?: boolean;\n attachTerminal?: boolean;\n attachVolumeName?: string;\n attachVolumePath?: string;\n}\n\nexport interface KindClusterOptions {\n configFilePath?: string;\n providerType?: string;\n httpPort?: string;\n httpsPort?: string;\n useIngressController?: boolean;\n containerImage?: string;\n}\n\nexport interface DeployPodOptions {\n useKubernetesServices?: boolean;\n useRestrictedSecurityContext?: boolean;\n useKubernetesIngress?: boolean;\n containerExposedPort?: string;\n isOpenShiftCluster?: boolean;\n useOpenShiftRoutes?: boolean;\n}\n\nexport enum PodmanKubePlayOptions {\n SelectYamlFile = 0,\n CreateYamlFileFromScratch = 1,\n}\n\nexport interface PlayFromScratch {\n podmanKubePlayOption: PodmanKubePlayOptions.CreateYamlFileFromScratch;\n jsonResourceDefinition: string;\n}\n\nexport interface PlayFromYaml {\n podmanKubePlayOption: PodmanKubePlayOptions.SelectYamlFile;\n pathToYaml: string;\n}\n\nexport type PlayYamlOptions = PlayFromScratch | PlayFromYaml;\n\nexport enum KubernetesResources {\n Nodes = 'Nodes',\n Deployments = 'Deployments',\n Services = 'Services',\n IngeressesRoutes = 'Ingresses & Routes',\n PVCs = 'Persistent Volume Claims',\n ConfigMapsSecrets = 'ConfigMaps & Secrets',\n PortForwarding = 'Port Forwarding',\n Pods = 'Pods',\n Cronjobs = 'CronJobs',\n Jobs = 'Jobs',\n}\n\nexport const KubernetesResourceAttributes: Record<KubernetesResources, string[]> = {\n [KubernetesResources.Nodes]: ['Status', 'Name', 'Roles', 'Version', 'OS', 'Kernel', 'Age'],\n [KubernetesResources.Deployments]: ['Selected', 'Status', 'Name', 'Conditions', 'Pods', 'Age', 'Actions'],\n [KubernetesResources.Services]: ['Selected', 'Status', 'Name', 'Type', 'Cluster IP', 'Ports', 'Age', 'Actions'],\n [KubernetesResources.IngeressesRoutes]: ['Selected', 'Status', 'Name', 'Host/Path', 'Backend', 'Age', 'Actions'],\n [KubernetesResources.PVCs]: ['Selected', 'Status', 'Name', 'Environment', 'Age', 'Size', 'Actions'],\n [KubernetesResources.ConfigMapsSecrets]: ['Selected', 'Status', 'Name', 'Type', 'Keys', 'Age', 'Actions'],\n [KubernetesResources.PortForwarding]: ['Status', 'Name', 'Type', 'Local Port', 'Remote Port', 'Actions'],\n [KubernetesResources.Pods]: ['Selected', 'Status', 'Name', 'Containers', 'Age', 'Actions'],\n [KubernetesResources.Cronjobs]: [\n 'Selected',\n 'Status',\n 'Name',\n 'Schedule',\n 'Last scheduled',\n 'Suspended',\n 'Active',\n 'Age',\n 'Actions',\n ],\n [KubernetesResources.Jobs]: ['Selected', 'Status', 'Name', 'Conditions', 'Completions', 'Age', 'Actions'],\n};\n\nexport enum PodmanVirtualizationProviders {\n WSL = 'Wsl',\n HyperV = 'Hyperv',\n AppleHV = 'Apple HyperVisor',\n LibKrun = 'default GPU enabled (LibKrun)',\n Qemu = 'Qemu',\n Native = '', //not a real provider, used for 'Connection Type' check in Resources page of Linux machines\n}\n\n/**\n * Maps each virtualization provider enum value to an array of possible UI values.\n * This allows handling version differences where the same provider may appear with different names.\n * For example, HyperV can appear as 'Hyperv' or 'Hyper-V' in different versions.\n */\nexport const PodmanVirtualizationProviderVariants: Record<PodmanVirtualizationProviders, string[]> = {\n [PodmanVirtualizationProviders.WSL]: ['Wsl', 'WSL'],\n [PodmanVirtualizationProviders.HyperV]: ['Hyperv', 'Hyper-V', 'HyperV'],\n [PodmanVirtualizationProviders.AppleHV]: ['Apple HyperVisor', 'Apple Hypervisor', 'AppleHV'],\n [PodmanVirtualizationProviders.LibKrun]: ['default GPU enabled (LibKrun)', 'LibKrun', 'libkrun'],\n [PodmanVirtualizationProviders.Qemu]: ['Qemu', 'QEMU', 'qemu'],\n [PodmanVirtualizationProviders.Native]: [''],\n};\n\n/**\n * Checks if a given value matches any of the possible variants for a provider enum value.\n * @param provider - The provider enum value to check against\n * @param value - The value to check (case-insensitive comparison)\n * @returns True if the value matches any variant of the provider\n */\nexport function matchesProviderVariant(provider: PodmanVirtualizationProviders, value: string): boolean {\n const variants = PodmanVirtualizationProviderVariants[provider];\n const normalizedValue = value.toLowerCase().trim();\n return variants.some(variant => variant.toLowerCase().trim() === normalizedValue);\n}\n\n/**\n * Gets the first matching provider enum value for a given UI value, or undefined if no match.\n * @param value - The UI value to match (case-insensitive comparison)\n * @returns The matching provider enum value, or undefined if no match\n */\nexport function getProviderFromVariant(value: string): PodmanVirtualizationProviders | undefined {\n const normalizedValue = value.toLowerCase().trim();\n for (const [provider, variants] of Object.entries(PodmanVirtualizationProviderVariants)) {\n if (variants.some(variant => variant.toLowerCase().trim() === normalizedValue)) {\n return provider as PodmanVirtualizationProviders;\n }\n }\n return undefined;\n}\n\nexport enum PodmanMachinePrivileges {\n Rootful = 'rootful',\n Rootless = 'rootless',\n}\n\nexport enum ProxyTypes {\n Disabled = 'Disabled',\n Manual = 'Manual',\n System = 'System',\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Page } from '@playwright/test';\n\nexport abstract class BasePage {\n readonly page: Page;\n // TODO: extract header and content locators into base class, add that roles into all pages\n\n constructor(page: Page) {\n this.page = page;\n }\n\n public getPage(): Page {\n return this.page;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport abstract class SettingsPage extends BasePage {\n readonly tabName: string;\n readonly parent: Locator;\n readonly header: Locator;\n readonly content: Locator;\n\n constructor(page: Page, tabName: string) {\n super(page);\n this.tabName = tabName;\n this.parent = this.page.getByRole('region', { name: tabName });\n this.header = this.parent.getByRole('region', { name: 'Header' });\n this.content = this.parent.getByRole('region', { name: 'Content' });\n }\n\n async getTab(): Promise<Locator> {\n let tabName = this.tabName;\n if (this.tabName === 'Preferences') {\n // special case for lower case first letter in 'preferences' tab\n tabName = this.tabName.toLowerCase();\n }\n return this.page\n .getByRole('navigation', { name: 'PreferencesNavigation' })\n .getByRole('link', { name: tabName, exact: true });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog } from '/@/utility/operations';\nimport { waitUntil } from '/@/utility/wait';\n\nimport { SettingsPage } from './settings-page';\n\nexport class CLIToolsPage extends SettingsPage {\n readonly main: Locator;\n readonly header: Locator;\n readonly content: Locator;\n readonly heading: Locator;\n readonly toolsTable: Locator;\n readonly dropDownDialog: Locator;\n readonly versionInputField: Locator;\n private rateLimitReachedFlag = false;\n\n constructor(page: Page) {\n super(page, 'CLI Tools');\n this.main = page.getByRole('region', { name: 'CLI Tools' }); //check name\n this.header = this.main.getByRole('region', { name: 'Header' });\n this.heading = this.header.getByRole('heading', { name: 'CLI Tools', exact: true });\n this.content = this.main.getByRole('region', { name: 'Content' });\n this.toolsTable = this.content.getByRole('table', { name: 'cli-tools' });\n this.dropDownDialog = page.getByRole('dialog', { name: 'drop-down-dialog' });\n this.versionInputField = this.dropDownDialog.getByRole('textbox');\n this.attachRateLimitListener();\n }\n\n public wasRateLimitReached(): boolean {\n return this.rateLimitReachedFlag;\n }\n\n public getToolRow(toolName: string): Locator {\n return this.toolsTable.getByRole('row', { name: toolName, exact: true });\n }\n\n public getInstallButton(toolName: string): Locator {\n return this.getToolRow(toolName).getByLabel('Install', { exact: true });\n }\n\n public getUninstallButton(toolName: string): Locator {\n return this.getToolRow(toolName).getByLabel('Uninstall', { exact: true });\n }\n\n public getUpdateButton(toolName: string): Locator {\n return this.getToolRow(toolName)\n .getByRole('button')\n .and(this.getToolRow(toolName).getByText('Update available', { exact: true }));\n }\n\n public getDowngradeButton(toolName: string): Locator {\n return this.getToolRow(toolName)\n .getByRole('button')\n .and(this.getToolRow(toolName).getByText('Upgrade/Downgrade', { exact: true }));\n }\n\n public getVersionSelectionButton(version: string): Locator {\n return this.dropDownDialog.getByRole('button', { name: version });\n }\n\n public async getCurrentToolVersion(toolName: string): Promise<string> {\n return test.step(`Get current version of ${toolName}`, async () => {\n if ((await this.getToolRow(toolName).getByLabel('no-cli-version', { exact: true }).count()) > 0) {\n return '';\n }\n\n if ((await this.getToolRow(toolName).getByLabel('cli-version', { exact: true }).count()) === 0) {\n return '';\n }\n\n try {\n return await this.getToolRow(toolName).getByLabel('cli-version', { exact: true }).innerText();\n } catch (e) {\n console.log(`Could not get version for ${toolName}: ${e}`);\n return '';\n }\n });\n }\n\n public async installTool(toolName: string, timeout = 60_000): Promise<this> {\n return test.step(`Install ${toolName}`, async () => {\n await playExpect(this.getInstallButton(toolName)).toBeEnabled();\n await this.getInstallButton(toolName).click();\n\n await this.ensureAPIRateLimitNotReached();\n const confirmationDialog = this.page.getByRole('dialog', { name: toolName });\n try {\n await playExpect(confirmationDialog).toBeVisible();\n await handleConfirmationDialog(this.page, toolName);\n } catch {\n console.log(`Dialog for tool ${toolName} was not visible. Proceeding.`);\n }\n\n await playExpect.poll(async () => await this.getCurrentToolVersion(toolName), { timeout: timeout }).toBeTruthy();\n return this;\n });\n }\n\n public async uninstallTool(toolName: string, timeout = 60_000): Promise<this> {\n return test.step(`Uninstall ${toolName}`, async () => {\n if ((await this.getUninstallButton(toolName).count()) === 0) {\n console.log(`Tool ${toolName} is not installed`);\n return this;\n }\n\n await playExpect(this.getUninstallButton(toolName)).toBeEnabled();\n await this.getUninstallButton(toolName).click();\n await handleConfirmationDialog(this.page, 'Uninstall');\n\n await playExpect.poll(async () => await this.getCurrentToolVersion(toolName), { timeout: timeout }).toBeFalsy();\n return this;\n });\n }\n\n public async downgradeTool(toolName: string, version = '', timeout = 60_000): Promise<this> {\n return test.step(`Downgrade ${toolName}`, async () => {\n const currentVersion = await this.getCurrentToolVersion(toolName);\n if (!currentVersion) {\n throw new Error(`Tool ${toolName} is not installed`);\n }\n\n if ((await this.getDowngradeButton(toolName).count()) === 0) {\n console.log(`Tool ${toolName} is already in a downgraded version`);\n return this;\n }\n\n await playExpect(this.getDowngradeButton(toolName)).toBeEnabled();\n await this.getDowngradeButton(toolName).click();\n\n await this.ensureAPIRateLimitNotReached();\n await playExpect(this.dropDownDialog).toBeVisible();\n\n let versionToSelect = version;\n if (!versionToSelect) {\n versionToSelect = await this.getFirstDifferentVersionFromList(currentVersion);\n }\n\n await playExpect(this.getVersionSelectionButton(versionToSelect)).toBeEnabled();\n await this.getVersionSelectionButton(versionToSelect).click();\n\n await this.ensureAPIRateLimitNotReached();\n await playExpect\n .poll(async () => await this.getCurrentToolVersion(toolName), { timeout: timeout })\n .toContain(versionToSelect);\n return this;\n });\n }\n\n public async updateTool(toolName: string, timeout = 60_000): Promise<this> {\n return test.step(`Update ${toolName}`, async () => {\n const currentVersion = await this.getCurrentToolVersion(toolName);\n if (!currentVersion) {\n throw new Error(`Tool ${toolName} is not installed`);\n }\n\n if ((await this.getUpdateButton(toolName).count()) === 0) {\n console.log(`Tool ${toolName} is already on latest`);\n return this;\n }\n\n await playExpect(this.getUpdateButton(toolName)).toBeEnabled();\n await this.getUpdateButton(toolName).click();\n\n await this.ensureAPIRateLimitNotReached();\n await playExpect\n .poll(async () => await this.getCurrentToolVersion(toolName), { timeout: timeout })\n .not.toContain(currentVersion);\n\n return this;\n });\n }\n\n public async ensureAPIRateLimitNotReached(): Promise<void> {\n await waitUntil(async () => this.wasRateLimitReached(), { timeout: 2_000, sendError: false });\n if (this.rateLimitReachedFlag) {\n console.log('Skipping test due to API rate limit being reached');\n test.skip(true, 'Skipping test due to API rate limit being reached');\n }\n }\n\n private async getFirstDifferentVersionFromList(currentVersion = ''): Promise<string> {\n if (!currentVersion) {\n return this.dropDownDialog.getByRole('button').first().innerText();\n }\n const versionSplitInParts = currentVersion.split(' ');\n const versionNumber = versionSplitInParts[versionSplitInParts.length - 1];\n return this.dropDownDialog.getByRole('button').filter({ hasNotText: versionNumber }).first().innerText();\n }\n\n private attachRateLimitListener(): void {\n this.page.on('console', msg => {\n if (msg.text().includes('API rate limit exceeded')) {\n console.log('Rate limit flag triggered!');\n this.rateLimitReachedFlag = true;\n }\n if (msg.text().includes('/releases') && msg.text().includes('403 with id')) {\n console.log('Could not fetch releases - assuming rate limit exceeded');\n this.rateLimitReachedFlag = true;\n }\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { SettingsPage } from './settings-page';\n\nexport class ExperimentalPage extends SettingsPage {\n readonly heading: Locator;\n readonly enableAllExperimentalFeaturesCheckbox: Locator;\n readonly enableAllExperimentalFeaturesButton: Locator;\n readonly statusBarProvidersCheckbox: Locator;\n\n constructor(page: Page) {\n super(page, 'Experimental');\n this.heading = this.header.getByRole('heading', { name: 'Title' }).and(this.header.getByText('Experimental'));\n this.enableAllExperimentalFeaturesCheckbox = this.content\n .getByRole('checkbox')\n .and(this.content.locator('#input-experimental-enable-all'));\n this.enableAllExperimentalFeaturesButton = this.enableAllExperimentalFeaturesCheckbox.locator('..');\n this.statusBarProvidersCheckbox = this.content.getByRole('checkbox', { name: 'Show providers in the status bar' });\n }\n\n public async enableAllExperimentalFeatures(): Promise<void> {\n await playExpect(this.enableAllExperimentalFeaturesCheckbox).toBeVisible();\n\n if (!(await this.enableAllExperimentalFeaturesCheckbox.isChecked())) {\n await this.enableAllExperimentalFeaturesButton.check();\n }\n\n await playExpect(this.enableAllExperimentalFeaturesCheckbox).toBeChecked();\n }\n\n public async disableAllExperimentalFeatures(): Promise<void> {\n await playExpect(this.enableAllExperimentalFeaturesCheckbox).toBeVisible();\n\n if (await this.enableAllExperimentalFeaturesCheckbox.isChecked()) {\n await this.enableAllExperimentalFeaturesButton.uncheck();\n }\n\n await playExpect(this.enableAllExperimentalFeaturesCheckbox).not.toBeChecked();\n }\n\n public async setExperimentalCheckbox(checkbox: Locator, enable: boolean): Promise<void> {\n await playExpect(checkbox).toBeVisible();\n const isEnabled = await checkbox.isChecked();\n if (isEnabled !== enable) {\n await checkbox.locator('..').setChecked(enable);\n const isEnabled = await checkbox.isChecked();\n playExpect(isEnabled).toEqual(enable);\n }\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { SettingsPage } from './settings-page';\n\nexport class PreferencesPage extends SettingsPage {\n readonly heading: Locator;\n readonly searchbar: Locator;\n readonly kubePathInput: Locator;\n readonly APPEARANCE_PREFERENCE_LABEL = 'Appearance';\n\n constructor(page: Page) {\n super(page, 'Preferences');\n this.heading = this.header.getByLabel('Title', { exact: true });\n this.searchbar = this.header.getByLabel('search preferences');\n this.kubePathInput = this.content.getByLabel(\n 'Path to the Kubeconfig file for accessing clusters. (Default is usually ~/.kube/config)',\n );\n }\n\n getPreferenceRowByName(name: string): Locator {\n return this.content\n .locator('div.flex.flex-row.justify-between')\n .filter({ has: this.page.getByText(name, { exact: true }) });\n }\n\n async isPreferenceManaged(name: string): Promise<boolean> {\n const preferenceRow = this.getPreferenceRowByName(name);\n return (await preferenceRow.getByText('Managed').count()) > 0;\n }\n\n async resetPreference(name: string): Promise<void> {\n const preferenceRow = this.getPreferenceRowByName(name);\n const resetButton = preferenceRow.getByRole('button', { name: 'Reset to default value' });\n await playExpect(resetButton).toBeVisible();\n await resetButton.click();\n }\n\n async getAppearancePreferenceValue(): Promise<string> {\n const appearancePreferenceRow = this.getPreferenceRowByName(this.APPEARANCE_PREFERENCE_LABEL);\n await playExpect(appearancePreferenceRow).toBeAttached();\n await appearancePreferenceRow.scrollIntoViewIfNeeded();\n await playExpect(appearancePreferenceRow).toBeVisible();\n\n const preferenceInput = appearancePreferenceRow.getByLabel('hidden input');\n await playExpect(preferenceInput).toBeAttached();\n return await preferenceInput.inputValue();\n }\n\n async setAppearancePreference(value: string): Promise<void> {\n const appearancePreferenceRow = this.getPreferenceRowByName(this.APPEARANCE_PREFERENCE_LABEL);\n await playExpect(appearancePreferenceRow).toBeAttached();\n await appearancePreferenceRow.scrollIntoViewIfNeeded();\n await playExpect(appearancePreferenceRow).toBeVisible();\n\n const selectionButton = appearancePreferenceRow.getByLabel(\n 'Select between light or dark mode, or use your system setting.',\n );\n await playExpect(selectionButton).toBeVisible();\n await selectionButton.click();\n\n const option = appearancePreferenceRow.getByRole('button', { name: value, exact: true });\n await playExpect(option).toBeVisible();\n await option.click();\n }\n\n async selectKubeFile(pathToKube: string): Promise<void> {\n return test.step('Select Kube File', async () => {\n if (!pathToKube) {\n throw Error('Path to Kube config file is incorrect or not provided!');\n }\n playExpect(this.kubePathInput).toBeDefined();\n await this.kubePathInput.clear();\n await playExpect(this.kubePathInput).toHaveValue('');\n\n await this.kubePathInput.fill(pathToKube);\n await playExpect(this.kubePathInput).toHaveValue(pathToKube);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect } from '@playwright/test';\nimport type { Locator, Page } from 'playwright';\n\nimport { waitUntil } from '/@/utility/wait';\n\nimport { SettingsPage } from './settings-page';\n\nexport class RegistriesPage extends SettingsPage {\n readonly heading: Locator;\n readonly addRegistryButton: Locator;\n readonly registriesTable: Locator;\n readonly addRegistryDialog: Locator;\n readonly cancelDialogButton: Locator;\n readonly confirmDialogButton: Locator;\n readonly registryUrlField: Locator;\n readonly registryUsernameField: Locator;\n readonly registryPswdField: Locator;\n\n constructor(page: Page) {\n super(page, 'Registries');\n this.heading = page.getByRole('heading').and(page.getByText('Registries', { exact: true }));\n this.addRegistryButton = page.getByRole('button', { name: 'Add registry' });\n this.registriesTable = page.getByRole('table', { name: 'Registries' });\n this.addRegistryDialog = page.getByRole('dialog', { name: 'Add Registry' });\n this.cancelDialogButton = this.addRegistryDialog.getByRole('button', {\n name: 'Cancel',\n });\n this.confirmDialogButton = this.addRegistryDialog.getByRole('button', {\n name: 'Add',\n });\n this.registryUrlField = this.addRegistryDialog.getByPlaceholder('https://registry.io');\n this.registryUsernameField = this.addRegistryDialog.getByPlaceholder('username');\n this.registryPswdField = this.addRegistryDialog.getByPlaceholder('password');\n }\n\n async createRegistry(url: string, username: string, pswd: string): Promise<void> {\n return test.step('Create a new registry', async () => {\n await this.page.waitForTimeout(4_000);\n await playExpect(this.addRegistryButton).toBeEnabled();\n await this.addRegistryButton.click();\n await playExpect(this.addRegistryDialog).toBeVisible();\n await playExpect(this.cancelDialogButton).toBeEnabled();\n\n await this.registryUrlField.fill(url);\n await this.registryUsernameField.fill(username);\n await this.registryPswdField.fill(pswd);\n\n await playExpect(this.confirmDialogButton).toBeEnabled();\n await this.confirmDialogButton.click();\n });\n }\n\n async editRegistry(title: string, newUsername: string, newPswd: string): Promise<void> {\n return test.step('Edit registry', async () => {\n const registryBox = await this.getRegistryRowByName(title);\n\n const dropdownMenu = registryBox.getByRole('button', {\n name: 'kebab menu',\n });\n await dropdownMenu.click();\n\n const editButton = registryBox.getByTitle('Edit password');\n await editButton.click();\n\n const registryUsername = registryBox.getByLabel('Username');\n const registryPswd = registryBox.getByRole('textbox', {\n name: 'Password',\n });\n await registryUsername.pressSequentially(newUsername, { delay: 100 });\n await registryPswd.pressSequentially(newPswd, { delay: 100 });\n\n const loginButton = registryBox.getByRole('button', { name: 'Login' });\n await this.loginButtonHandling(loginButton);\n });\n }\n\n /*\n * There are two types of registries, if it is custom, then it can be actually deleted\n * If it is default registry, it will delete only the credentials and the record will be kept there.\n */\n async removeRegistry(title: string): Promise<void> {\n return test.step('Remove registry', async () => {\n const registryBox = await this.getRegistryRowByName(title);\n\n const dropdownMenu = registryBox.getByRole('button', {\n name: 'kebab menu',\n });\n try {\n await dropdownMenu.waitFor({ state: 'visible', timeout: 3_000 });\n } catch (_err) {\n throw Error(`Dropdown menu on ${title} registry not available.`);\n }\n await dropdownMenu.click();\n\n const editButton = registryBox.getByTitle('Remove');\n await editButton.click();\n });\n }\n\n async getRegistryRowByName(name: string): Promise<Locator> {\n return this.registriesTable.getByRole('row', { name: name });\n }\n\n private async loginButtonHandling(loginButton: Locator): Promise<void> {\n return test.step('Handle login button', async () => {\n try {\n await waitUntil(\n async function loginIsEnabled() {\n return await loginButton.isEnabled();\n },\n { message: 'Login Button not enabled in time' },\n );\n await loginButton.click({ timeout: 3000 });\n } catch (err) {\n throw Error(`An error occured when trying to log into registry: ${(err as Error).message}`);\n }\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport abstract class ResourceCardPage extends BasePage {\n readonly parent: Locator;\n readonly card: Locator;\n readonly providerSetup: Locator;\n readonly providerConnections: Locator;\n readonly markdownContent: Locator;\n readonly setupButton: Locator;\n\n constructor(page: Page, resourceName: string) {\n super(page);\n this.parent = this.page.getByRole('region', { name: 'content' });\n this.card = this.parent.getByRole('region', { name: resourceName, exact: true });\n this.providerSetup = this.card.getByRole('region', { name: 'Provider Setup', exact: true });\n this.providerConnections = this.card.getByRole('region', { name: 'Provider Connections', exact: true });\n this.markdownContent = this.providerConnections.getByLabel('markdown-content');\n this.setupButton = this.providerSetup.getByRole('button', { name: 'Setup' });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport type { ResourceElementActions } from '/@/model/core/operations';\n\nimport { ResourceCardPage } from './resource-card-page';\n\nexport class ResourceConnectionCardPage extends ResourceCardPage {\n readonly resourceElement: Locator;\n readonly resourceElementDetailsButton: Locator;\n readonly resourceElementConnectionStatus: Locator;\n readonly resourceElementConnectionActions: Locator;\n readonly createButton: Locator;\n readonly connectionType: Locator;\n readonly machinePrivileges: Locator;\n\n constructor(page: Page, resourceName: string, resourceElementVisibleName?: string) {\n super(page, resourceName);\n this.resourceElement = this.providerConnections.getByRole('region', {\n name: resourceElementVisibleName,\n exact: true,\n });\n this.resourceElementDetailsButton = this.resourceElement.getByRole('button', { name: 'details' });\n this.resourceElementConnectionStatus = this.resourceElement.getByLabel('Connection Status Label');\n this.resourceElementConnectionActions = this.resourceElement.getByRole('group', { name: 'Connection Actions' });\n this.createButton = this.providerSetup.getByRole('button', {\n name: 'Create',\n });\n this.connectionType = this.resourceElement.getByLabel('Connection Type');\n this.machinePrivileges = this.resourceElement.getByLabel('Machine with root privileges:');\n }\n\n public async doesResourceElementExist(): Promise<boolean> {\n return (await this.resourceElement.count()) > 0;\n }\n\n public async performConnectionAction(operation: ResourceElementActions, timeout = 25000): Promise<void> {\n return test.step(`Perform connection action '${operation}' on resource element '${this.resourceElement}'`, async () => {\n const button = this.resourceElementConnectionActions.getByRole('button', {\n name: operation,\n exact: true,\n });\n await playExpect(button).toBeEnabled({ timeout: timeout });\n await button.click();\n });\n }\n\n public async getConnectionInfoByLabel(label: string): Promise<string> {\n return (await this.card.getByLabel(label, { exact: true }).textContent()) ?? '';\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from 'playwright';\n\nimport { SettingsPage } from './settings-page';\n\nexport class ResourcesPage extends SettingsPage {\n readonly heading: Locator;\n readonly featuredProviderResources: Locator;\n\n constructor(page: Page) {\n super(page, 'Resources');\n this.heading = this.header.getByRole('heading', { name: 'Title' }).and(this.header.getByText('Resources'));\n this.featuredProviderResources = this.content.getByRole('region', { name: 'Featured Provider Resources' });\n }\n\n public async resourceCardIsVisible(resourceCardAriaLabel: string): Promise<boolean> {\n return (await this.resourceCardLocatorGenerator(resourceCardAriaLabel).count()) > 0;\n }\n\n public async goToCreateNewResourcePage(resourceCardAriaLabel: string, newResourceName = ''): Promise<void> {\n if (!(await this.resourceCardIsVisible(resourceCardAriaLabel))) {\n throw new Error(`Resource card with label \"${resourceCardAriaLabel}\" is not available`);\n }\n\n const buttonName = newResourceName || resourceCardAriaLabel;\n await this.resourceCardLocatorGenerator(resourceCardAriaLabel)\n .getByRole('button', { name: `Create new ${buttonName}` })\n .click();\n }\n\n private resourceCardLocatorGenerator(resourceCardAriaLabel: string): Locator {\n return this.content.getByRole('region', { name: resourceCardAriaLabel, exact: true });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { type Locator, type Page, test } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport type { SettingsPage } from './settings-page';\n\nexport class SettingsBar {\n readonly page: Page;\n readonly settingsNavBar: Locator;\n readonly resourcesTab: Locator;\n readonly proxyTab: Locator;\n readonly registriesTab: Locator;\n readonly authenticationTab: Locator;\n readonly preferencesTab: Locator;\n readonly cliToolsTab: Locator;\n readonly kubernetesTab: Locator;\n\n constructor(page: Page) {\n this.page = page;\n this.settingsNavBar = page.getByRole('navigation', { name: 'PreferencesNavigation' });\n this.resourcesTab = this.settingsNavBar.getByRole('link', { name: 'Resources' });\n this.proxyTab = this.settingsNavBar.getByRole('link', { name: 'Proxy' });\n this.registriesTab = this.settingsNavBar.getByRole('link', { name: 'Registries' });\n this.authenticationTab = this.settingsNavBar.getByRole('link', { name: 'Authentication' });\n this.cliToolsTab = this.settingsNavBar.getByRole('link', { name: 'CLI Tools' });\n this.kubernetesTab = this.settingsNavBar.getByRole('link', { name: 'Kubernetes' });\n this.preferencesTab = this.settingsNavBar.getByRole('link', { name: 'preferences' });\n }\n\n public async openTabPage<T extends SettingsPage>(type: new (page: Page) => T): Promise<T> {\n return test.step(`Open ${type.name} tab from Settings`, async () => {\n const desiredPage = new type(this.page);\n const tab = await desiredPage.getTab();\n await playExpect(tab).toBeVisible();\n await tab.click({ force: true });\n return desiredPage;\n });\n }\n\n public getSettingsNavBarTabLocator(name: string): Locator {\n return this.settingsNavBar.getByLabel(name);\n }\n\n public getPreferencesLinkLocator(label: string): Locator {\n return this.settingsNavBar.getByRole('link', { name: label, exact: true });\n }\n\n public getLinkLocatorByHref(href: string): Locator {\n return this.settingsNavBar.locator(`[href*=\"${href}\"]`);\n }\n\n public async expandPreferencesTab(): Promise<void> {\n await playExpect(this.preferencesTab).toBeVisible({ timeout: 10_000 });\n await this.preferencesTab.click();\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { type Locator, type Page } from '@playwright/test';\n\nimport { waitUntil } from '/@/utility/wait';\n\nimport { BasePage } from './base-page';\n\nexport abstract class DetailsPage extends BasePage {\n readonly header: Locator;\n readonly tabs: Locator;\n readonly tabContent: Locator;\n readonly controlActions: Locator;\n readonly closeButton: Locator;\n readonly backLink: Locator;\n readonly pageName: Locator;\n readonly resourceName: string;\n readonly heading: Locator;\n readonly breadcrumb: Locator;\n\n constructor(page: Page, resourceName: string) {\n super(page);\n this.resourceName = resourceName;\n\n this.tabContent = page.getByRole('region', { name: 'Tab Content' });\n this.header = page.getByRole('region', { name: 'Header' });\n this.tabs = page.getByRole('region', { name: 'Tabs' });\n this.breadcrumb = this.header.getByRole('navigation', { name: 'Breadcrumb' });\n this.controlActions = this.header.getByRole('group', { name: 'Control Actions' });\n this.heading = this.header.getByRole('heading', { name: this.resourceName });\n this.closeButton = this.breadcrumb.getByRole('button', { name: 'Close' });\n this.backLink = this.breadcrumb.getByRole('link', { name: 'Back' });\n this.pageName = this.breadcrumb.getByRole('region', { name: 'Page Name' });\n }\n\n async activateTab(tabName: string): Promise<this> {\n return test.step(`Activate tab: ${tabName}`, async () => {\n const tabItem = this.tabs.getByRole('link', { name: tabName, exact: true });\n await waitUntil(async () => await tabItem.isVisible(), {\n message: `Tab ${tabName} does not exist currently, maybe entry was deleted!`,\n });\n await tabItem.click();\n return this;\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { VolumesPage } from './volumes-page';\n\nexport class CreateVolumePage extends BasePage {\n readonly heading: Locator;\n readonly closeLink: Locator;\n readonly volumeNameBox: Locator;\n readonly doneButton: Locator;\n readonly closeButton: Locator;\n readonly createVolumeButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = this.page.getByRole('heading', { name: 'Create a volume' });\n this.closeLink = this.page.getByRole('link', { name: 'Close' });\n this.volumeNameBox = this.page.getByRole('textbox', {\n name: 'Volume name',\n });\n this.doneButton = this.page.getByRole('button', { name: 'Done' });\n this.closeButton = this.page.getByRole('button', { name: 'Close' });\n this.createVolumeButton = this.page.getByRole('button', { name: 'Create' });\n }\n\n async createVolume(name: string): Promise<VolumesPage> {\n return test.step(`Create volume ${name}`, async () => {\n await this.volumeNameBox.fill(name);\n await playExpect(this.createVolumeButton).toBeEnabled();\n await this.createVolumeButton.click();\n await playExpect(this.doneButton).toBeEnabled({ timeout: 30000 });\n await this.doneButton.click();\n return new VolumesPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { type Locator, type Page, test } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { waitUntil } from '/@/utility/wait';\n\nimport { BasePage } from './base-page';\n\n/**\n * Abstract representation of a visual page objects of the main content pages of Podman Desktop app: Images,\n * Containers, Volumes and Pods.\n * Is not intended to be directly used, but rather by particular page's implementation.\n */\nexport abstract class MainPage extends BasePage {\n readonly title: string;\n readonly mainPage: Locator;\n readonly header: Locator;\n readonly search: Locator;\n readonly content: Locator;\n readonly additionalActions: Locator;\n readonly bottomAdditionalActions: Locator;\n readonly heading: Locator;\n readonly noContainerEngineHeading: Locator;\n readonly noImagesHeading: Locator;\n readonly rowTable: Locator;\n\n constructor(page: Page, title: string) {\n super(page);\n this.title = title;\n this.mainPage = page.getByRole('region', { name: this.title });\n this.header = this.mainPage.getByRole('region', { name: 'header' });\n this.search = this.mainPage.getByRole('region', { name: 'search' });\n this.content = this.mainPage.getByRole('region', { name: 'content' });\n this.additionalActions = this.header.getByRole('group', {\n name: 'additionalActions',\n });\n this.bottomAdditionalActions = this.search.getByRole('group', {\n name: 'bottomAdditionalActions',\n });\n this.heading = this.header.getByRole('heading', { name: this.title });\n this.noContainerEngineHeading = this.content.getByRole('heading', {\n name: 'No Container Engine',\n exact: true,\n });\n this.noImagesHeading = this.content.getByRole('heading', {\n name: `No ${this.title}`,\n exact: true,\n });\n this.rowTable = this.content.getByRole('table');\n }\n\n /**\n * Check the presence of items in main page's content.\n * @returns true, if there are any items present in the content's table, false otherwise\n */\n async pageIsEmpty(): Promise<boolean> {\n return test.step('Check if the page is empty', async () => {\n if (await this.noContainerEngine()) return true;\n return (await this.noImagesHeading.count()) > 0;\n });\n }\n\n async noContainerEngine(): Promise<boolean> {\n return test.step('Check if there is no container engine', async () => {\n return (await this.noContainerEngineHeading.count()) > 0;\n });\n }\n\n async rowsAreVisible(): Promise<boolean> {\n return await this.page.getByRole('row').first().isVisible();\n }\n\n async getAllTableRows(): Promise<Locator[]> {\n return await this.rowTable.getByRole('row').all();\n }\n\n async getRowsFromTableByStatus(status: string): Promise<Locator[]> {\n return test.step(`Get rows from ${this.title} page table by status: ${status}`, async () => {\n await waitUntil(async () => await this.rowsAreVisible(), {\n sendError: false,\n });\n\n const rows = await this.getAllTableRows();\n const filteredRows = [];\n for (let rowNum = 1; rowNum < rows.length; rowNum++) {\n //skip header\n const statusCount = await rows[rowNum].getByRole('cell').nth(2).getByTitle(status, { exact: true }).count();\n if (statusCount > 0) filteredRows.push(rows[rowNum]);\n }\n return filteredRows;\n });\n }\n\n async countRowsFromTable(): Promise<number> {\n return test.step(`Count rows from ${this.title} page table`, async () => {\n await waitUntil(async () => await this.rowsAreVisible(), {\n sendError: false,\n });\n const table = this.content.getByRole('table');\n const rows = await table.getByRole('row').all();\n return rows.length > 1 ? rows.length - 1 : 0;\n });\n }\n\n async getRowByName(name: string, exact = true): Promise<Locator | undefined> {\n return test.step(`Get row from ${this.title} page table by name: ${name}`, async () => {\n const locator = this.page\n .getByRole('row')\n .and(this.page.getByLabel(name, { exact: exact }))\n .first();\n\n return (await locator.count()) > 0 ? locator : undefined;\n });\n }\n\n async waitForRowToExists(name: string, timeout = 5_000): Promise<boolean> {\n return test.step(`Wait for row with name: ${name} to exist`, async () => {\n await waitUntil(async () => (await this.getRowByName(name)) !== undefined, { timeout: timeout });\n return true;\n });\n }\n\n async waitForRowToBeDelete(name: string, timeout = 5_000): Promise<boolean> {\n return test.step(`Wait for row with name: ${name} to be deleted`, async () => {\n await waitUntil(async () => (await this.getRowByName(name)) === undefined, { timeout: timeout });\n return true;\n });\n }\n\n async uncheckAllRows(): Promise<void> {\n return test.step(`Uncheck all rows on ${this.title} page`, async () => {\n try {\n const toggle = await this.getToggleLocator();\n\n if ((await toggle.innerHTML()).includes('pd-input-checkbox-indeterminate')) {\n await toggle.click();\n }\n\n if ((await toggle.innerHTML()).includes('pd-input-checkbox-checked')) {\n await toggle.click();\n }\n\n await playExpect\n .poll(async () => await toggle.innerHTML(), { timeout: 15_000 })\n .toContain('pd-input-checkbox-unchecked');\n } catch (err) {\n console.log(`Exception caught on ${this.title} page when checking cells for unchecking with message: ${err}`);\n throw err;\n }\n });\n }\n\n async checkAllRows(): Promise<void> {\n return test.step(`Checks all rows on ${this.title} page`, async () => {\n try {\n const toggle = await this.getToggleLocator();\n\n if ((await toggle.innerHTML()).includes('pd-input-checkbox-unchecked')) {\n await toggle.click();\n }\n\n await playExpect\n .poll(async () => toggle.innerHTML(), { timeout: 15_000 })\n .toContain('pd-input-checkbox-checked');\n } catch (err) {\n console.log(`Exception caught on containers page when checking cells with message: ${err}`);\n throw err;\n }\n });\n }\n\n private async getToggleLocator(): Promise<Locator> {\n await playExpect(this.rowTable).toBeVisible();\n const controlRow = this.rowTable.getByRole('row').first();\n await playExpect(controlRow).toBeAttached();\n const checkboxColumnHeader = controlRow.getByRole('columnheader').nth(1);\n await playExpect(checkboxColumnHeader).toBeAttached();\n const toggle = checkboxColumnHeader.getByTitle('Toggle all');\n await playExpect(toggle).toBeAttached();\n\n return toggle;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { VolumeState } from '/@/model/core/states';\nimport { handleConfirmationDialog } from '/@/utility/operations';\nimport { waitUntil, waitWhile } from '/@/utility/wait';\n\nimport { CreateVolumePage } from './create-volume-page';\nimport { MainPage } from './main-page';\nimport { VolumeDetailsPage } from './volume-details-page';\n\nexport class VolumesPage extends MainPage {\n readonly createVolumeButton: Locator;\n readonly pruneVolumesButton: Locator;\n readonly collectUsageDataButton: Locator;\n\n constructor(page: Page) {\n super(page, 'volumes');\n this.createVolumeButton = this.additionalActions.getByRole('button', { name: 'Create' });\n this.pruneVolumesButton = this.additionalActions.getByRole('button', { name: 'Prune' });\n this.collectUsageDataButton = this.additionalActions.getByRole('button', { name: 'Gather volume sizes' });\n }\n\n async openCreateVolumePage(volumeName: string): Promise<CreateVolumePage> {\n return test.step('Open Create Volume Page', async () => {\n const row = await this.getVolumeRowByName(volumeName);\n if (row !== undefined) {\n throw Error('Volume is already created');\n }\n\n await playExpect(this.createVolumeButton).toBeEnabled();\n await this.createVolumeButton.click();\n return new CreateVolumePage(this.page);\n });\n }\n\n async openVolumeDetails(volumeName: string): Promise<VolumeDetailsPage> {\n return test.step('Open Volume Details Page', async () => {\n const volumeRow = await this.getVolumeRowByName(volumeName);\n if (volumeRow === undefined) {\n throw Error(`Volume: ${volumeName} does not exist`);\n }\n const containerRowName = volumeRow.getByRole('cell').nth(3);\n await containerRowName.click();\n\n return new VolumeDetailsPage(this.page, volumeName);\n });\n }\n\n async deleteVolume(volumeName: string): Promise<VolumesPage> {\n return test.step('Delete Volume', async () => {\n const volumeRow = await this.getVolumeRowByName(volumeName);\n if (volumeRow === undefined) {\n throw Error(`Volume: ${volumeName} does not exist`);\n }\n const containerRowDeleteButton = volumeRow.getByRole('button', { name: 'Delete Volume' });\n await playExpect(containerRowDeleteButton).toBeEnabled();\n await containerRowDeleteButton.click();\n await handleConfirmationDialog(this.page);\n\n return this;\n });\n }\n\n async getVolumeRowByName(name: string): Promise<Locator | undefined> {\n return this.getRowByName(name, false);\n }\n\n protected async volumeExists(name: string): Promise<boolean> {\n return test.step(`Check if volume ${name} exists`, async () => {\n const result = await this.getVolumeRowByName(name);\n return result !== undefined;\n });\n }\n\n async countVolumesFromTable(): Promise<number> {\n return this.countRowsFromTable();\n }\n\n async countUsedVolumesFromTable(): Promise<number> {\n return (await this.getRowsFromTableByStatus(VolumeState.Used)).length;\n }\n\n async waitForVolumeExists(name: string, timeout = 30_000): Promise<boolean> {\n return test.step(`Wait for volume ${name} to exist`, async () => {\n if (!name) {\n throw Error('Volume name is not provided');\n }\n await waitUntil(async () => await this.volumeExists(name), { timeout });\n return true;\n });\n }\n\n async waitForVolumeDelete(name: string, timeout = 30_000): Promise<boolean> {\n return test.step(`Wait for volume ${name} to be deleted`, async () => {\n if (!name) {\n throw Error('Volume name is not provided');\n }\n await waitWhile(async () => await this.volumeExists(name), { timeout });\n return true;\n });\n }\n\n async pruneVolumes(): Promise<VolumesPage> {\n return test.step('Prune Volumes', async () => {\n await playExpect(this.pruneVolumesButton).toBeEnabled();\n await this.pruneVolumesButton.click();\n await handleConfirmationDialog(this.page, 'Prune');\n return this;\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { VolumeState } from '/@/model/core/states';\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { DetailsPage } from './details-page';\nimport { VolumesPage } from './volumes-page';\n\nexport class VolumeDetailsPage extends DetailsPage {\n readonly deleteButton: Locator;\n\n static readonly SUMMARY_TAB = 'Summary';\n\n constructor(page: Page, name: string) {\n super(page, name);\n this.deleteButton = this.controlActions.getByRole('button', {\n name: 'Delete Volume',\n });\n }\n\n async isUsed(): Promise<boolean> {\n return (await this.header.getByTitle(VolumeState.Used).count()) > 0;\n }\n\n async deleteVolume(): Promise<VolumesPage> {\n return test.step('Delete Volume', async () => {\n await playExpect(this.deleteButton).toBeEnabled();\n await this.deleteButton.click();\n await handleConfirmationDialog(this.page);\n return new VolumesPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { execSync } from 'node:child_process';\nimport * as os from 'node:os';\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { ResourceElementActions } from '/@/model/core/operations';\nimport { ResourceElementState } from '/@/model/core/states';\nimport type { PodmanVirtualizationProviders } from '/@/model/core/types';\nimport { matchesProviderVariant, PodmanMachinePrivileges } from '/@/model/core/types';\nimport { CLIToolsPage } from '/@/model/pages/cli-tools-page';\nimport { ExperimentalPage } from '/@/model/pages/experimental-page';\nimport { PreferencesPage } from '/@/model/pages/preferences-page';\nimport { RegistriesPage } from '/@/model/pages/registries-page';\nimport { ResourceConnectionCardPage } from '/@/model/pages/resource-connection-card-page';\nimport { ResourcesPage } from '/@/model/pages/resources-page';\nimport { SettingsBar } from '/@/model/pages/settings-bar';\nimport { VolumeDetailsPage } from '/@/model/pages/volume-details-page';\nimport { NavigationBar } from '/@/model/workbench/navigation';\nimport { isLinux, isMac, isWindows } from '/@/utility/platform';\nimport { waitUntil, waitWhile } from '/@/utility/wait';\n\n/**\n * Stop and delete container defined by its name\n * @param page playwright's page object\n * @param name name of container to be removed\n */\nexport async function deleteContainer(page: Page, name: string): Promise<void> {\n return test.step(`Delete container with name ${name}`, async () => {\n const navigationBar = new NavigationBar(page);\n const containers = await navigationBar.openContainers();\n await playExpect(containers.heading).toBeVisible({ timeout: 10_000 });\n const container = await containers.getContainerRowByName(name);\n // check for container existence\n if (container === undefined) {\n console.log(`container '${name}' does not exist, skipping...`);\n } else {\n // stop container first, might not be running\n const stopButton = container.getByRole('button').and(container.getByLabel('Stop Container'));\n if ((await stopButton.count()) > 0) await stopButton.click();\n\n // delete the container\n const deleteButton = container.getByRole('button').and(container.getByLabel('Delete Container'));\n await deleteButton.click();\n await handleConfirmationDialog(page);\n // wait for container to disappear\n try {\n console.log('Waiting for container to get deleted ...');\n await playExpect\n .poll(async () => await containers.getContainerRowByName(name), { timeout: 30_000 })\n .toBeFalsy();\n } catch (error) {\n if (!(error as Error).message.includes('Page is empty')) {\n throw Error(`Error waiting for container '${name}' to get removed, ${error}`);\n }\n }\n }\n });\n}\n\n/**\n * Delete image defined by its name\n * @param page playwright's page object\n * @param name name of image to be removed\n */\nexport async function deleteImage(page: Page, name: string): Promise<void> {\n return test.step(`Delete image ${name}`, async () => {\n const navigationBar = new NavigationBar(page);\n const images = await navigationBar.openImages();\n await playExpect(images.heading).toBeVisible({ timeout: 10_000 });\n const row = await images.getImageRowByName(name);\n if (row === undefined) {\n console.log(`image '${name}' does not exist, skipping...`);\n } else {\n const deleteButton = row.getByRole('button', { name: 'Delete Image' });\n if (await deleteButton.isEnabled()) {\n await deleteButton.click();\n await handleConfirmationDialog(page);\n } else {\n throw Error(`Cannot delete image ${name}, because it is in use`);\n }\n // wait for image to disappear\n try {\n console.log('image deleting, waiting...');\n await waitWhile(\n async () => {\n const images = await new NavigationBar(page).openImages();\n const result = await images.getImageRowByName(name);\n return !!result;\n },\n { timeout: 10_000, sendError: false },\n );\n } catch (error) {\n if (!(error as Error).message.includes('Page is empty')) {\n throw Error(`Error waiting for image '${name}' to get removed, ${error}`);\n }\n }\n }\n });\n}\n\nexport async function deleteRegistry(page: Page, name: string, failIfNotExist = false): Promise<void> {\n return test.step(`Delete registry ${name}`, async () => {\n const navigationBar = new NavigationBar(page);\n const settingsBar = await navigationBar.openSettings();\n const registryPage = await settingsBar.openTabPage(RegistriesPage);\n const registryRecord = await registryPage.getRegistryRowByName(name);\n await waitUntil(() => registryRecord.isVisible(), { sendError: failIfNotExist });\n if (await registryRecord.isVisible()) {\n // it might be that the record exist but there are no credentials -> it is default registry and it is empty\n // or if there is a kebab memu available\n const dropdownMenu = registryRecord.getByRole('button', { name: 'kebab menu' });\n if (await dropdownMenu.isVisible()) {\n await registryPage.removeRegistry(name);\n }\n }\n });\n}\n\nexport async function deletePod(page: Page, name: string, timeout = 50_000): Promise<void> {\n return test.step(`Delete pod ${name}`, async () => {\n const navigationBar = new NavigationBar(page);\n const pods = await navigationBar.openPods();\n await playExpect(pods.heading).toBeVisible({ timeout: 10_000 });\n const pod = await pods.getPodRowByName(name);\n // check if pod exists\n if (pod === undefined) {\n console.log(`pod '${name}' does not exist, skipping...`);\n } else {\n // delete the pod\n const deleteButton = pod.getByRole('button').and(pod.getByLabel('Delete Pod'));\n await deleteButton.click();\n // config delete dialog\n await handleConfirmationDialog(page);\n // wait for pod to disappear\n try {\n console.log('Waiting for pod to get deleted ...');\n await waitWhile(\n async () => {\n return !!(await pods.getPodRowByName(name));\n },\n { timeout: timeout },\n );\n } catch (error) {\n if (!(error as Error).message.includes('Page is empty')) {\n throw Error(`Error waiting for pod '${name}' to get removed, ${error}`);\n }\n }\n }\n });\n}\n\n/**\n * Delete network defined by its name\n * @param page playwright's page object\n * @param name name of network to be removed\n */\nexport async function deleteNetwork(page: Page, name: string): Promise<void> {\n return test.step(`Delete network with name ${name}`, async () => {\n const navigationBar = new NavigationBar(page);\n const networksPage = await navigationBar.openNetworks();\n await playExpect(networksPage.heading).toBeVisible({ timeout: 10_000 });\n const networkExists = await networksPage.networkExists(name);\n\n if (!networkExists) {\n console.log(`network '${name}' does not exist, skipping...`);\n } else {\n await networksPage.deleteNetwork(name);\n\n try {\n console.log('Waiting for network to get deleted ...');\n await playExpect\n .poll(async () => await networksPage.getNetworkRowByName(name), { timeout: 30_000 })\n .toBeFalsy();\n } catch (error) {\n if (!(error as Error).message.includes('Page is empty')) {\n throw Error(`Error waiting for network '${name}' to get removed, ${error}`);\n }\n }\n }\n });\n}\n\n// Handles dialog that has accessible name `dialogTitle` and either confirms or rejects it.\nexport async function handleConfirmationDialog(\n page: Page,\n dialogTitle = 'Confirmation',\n confirm = true,\n confirmationButton = 'Yes',\n cancelButton = 'Cancel',\n timeout = 10_000,\n moreThanOneConsecutiveDialogs = false,\n): Promise<void> {\n return test.step('Handle confirmation dialog', async () => {\n // wait for dialog to appear using waitFor\n const dialog = page.getByRole('dialog', { name: dialogTitle, exact: true });\n await waitUntil(async () => await dialog.isVisible(), { timeout: timeout });\n const button = confirm\n ? dialog.getByRole('button', { name: confirmationButton })\n : dialog.getByRole('button', { name: cancelButton });\n await playExpect(button).toBeEnabled({ timeout: timeout });\n await button.click();\n\n if (moreThanOneConsecutiveDialogs) {\n const button = dialog.getByRole('button', { name: 'Done' });\n await playExpect(button).toBeEnabled({ timeout: timeout });\n await button.click();\n }\n\n await waitUntil(async () => !(await dialog.isVisible()), { timeout: timeout });\n });\n}\n\n/**\n * Handles the Edit Network dialog by filling DNS server fields and clicking Cancel or Update button.\n * @param page playwright's page object\n * @param networkName name of the network being edited\n * @param options optional configuration for DNS servers and action\n */\nexport async function handleEditNetworkDialog(\n page: Page,\n networkName: string,\n options?: {\n dnsServersToAdd?: string;\n dnsServersToRemove?: string;\n action?: 'Cancel' | 'Update';\n },\n): Promise<void> {\n return test.step(`Handle Edit Network dialog for: ${networkName}`, async () => {\n const dialogTitle = `Edit Network ${networkName}`;\n const editDialog = page.getByRole('dialog', { name: dialogTitle });\n await playExpect(editDialog).toBeVisible();\n\n // Get the two input fields (both have placeholder \"8.8.8.8 1.1.1.1\")\n const inputFields = editDialog.getByPlaceholder('8.8.8.8 1.1.1.1');\n const dnsServersToAddInput = inputFields.nth(0);\n const dnsServersToRemoveInput = inputFields.nth(1);\n\n const cancelButton = editDialog.getByRole('button', { name: 'Cancel', exact: true });\n const updateButton = editDialog.getByRole('button', { name: 'Update', exact: true });\n\n if (options?.dnsServersToAdd !== undefined) {\n await dnsServersToAddInput.clear();\n await playExpect(dnsServersToAddInput).toHaveValue('');\n\n await dnsServersToAddInput.fill(options.dnsServersToAdd);\n await playExpect(dnsServersToAddInput).toHaveValue(options.dnsServersToAdd);\n }\n\n if (options?.dnsServersToRemove !== undefined) {\n await dnsServersToRemoveInput.clear();\n await playExpect(dnsServersToRemoveInput).toHaveValue('');\n\n await dnsServersToRemoveInput.fill(options.dnsServersToRemove);\n await playExpect(dnsServersToRemoveInput).toHaveValue(options.dnsServersToRemove);\n }\n\n const action = options?.action ?? 'Update';\n if (action === 'Cancel') {\n await playExpect(cancelButton).toBeEnabled();\n await cancelButton.click();\n } else {\n await playExpect(updateButton).toBeEnabled();\n await updateButton.click();\n }\n\n await playExpect(editDialog).not.toBeVisible();\n });\n}\n\n/**\n * Async function that stops and deletes Podman Machine through Settings -> Resources page\n * @param page playwright's page object\n * @param machineVisibleName Name of the Podman Machine to delete\n */\nexport async function deletePodmanMachine(page: Page, machineVisibleName: string): Promise<void> {\n return test.step('Delete Podman machine', async () => {\n const RESOURCE_NAME: string = 'podman';\n\n // Navigate to resources page\n const navigationBar = new NavigationBar(page);\n const dashboardPage = await navigationBar.openDashboard();\n await playExpect(dashboardPage.heading).toBeVisible();\n\n const settingsBar = await navigationBar.openSettings();\n const resourcesPage = await settingsBar.openTabPage(ResourcesPage);\n await playExpect(resourcesPage.heading).toBeVisible({ timeout: 10_000 });\n\n await playExpect\n .poll(async () => await resourcesPage.resourceCardIsVisible(RESOURCE_NAME), { timeout: 15_000 })\n .toBeTruthy();\n\n const podmanResourceCard = new ResourceConnectionCardPage(page, RESOURCE_NAME, machineVisibleName);\n await playExpect(podmanResourceCard.providerConnections).toBeVisible({ timeout: 10_000 });\n\n // Wait for resource element to be visible\n const isResourceVisible = await waitUntil(async () => await podmanResourceCard.resourceElement.isVisible(), {\n timeout: 30_000,\n })\n .then(() => true)\n .catch(() => false);\n\n if (!isResourceVisible) {\n console.log(`Podman machine [${machineVisibleName}] not present, skipping deletion.`);\n return;\n }\n\n // Ensure connection actions and status are visible\n await playExpect(podmanResourceCard.resourceElementConnectionActions).toBeVisible();\n await playExpect(podmanResourceCard.resourceElementConnectionStatus).toBeVisible();\n\n // Handle machine state and stop if needed\n await ensurePodmanMachineStopped(podmanResourceCard, machineVisibleName);\n\n // Delete the machine\n await podmanResourceCard.performConnectionAction(ResourceElementActions.Delete);\n await playExpect(podmanResourceCard.resourceElement).toBeHidden({ timeout: 60_000 });\n });\n}\n\nasync function ensurePodmanMachineStopped(\n podmanResourceCard: ResourceConnectionCardPage,\n machineVisibleName: string,\n): Promise<void> {\n const currentStatus = await podmanResourceCard.resourceElementConnectionStatus.innerText();\n\n if (currentStatus === ResourceElementState.Off) {\n console.log('Podman machine already stopped');\n return;\n }\n\n // Handle Starting state - use CLI immediately\n if (currentStatus === ResourceElementState.Starting) {\n console.log('Podman machine is starting, will stop via CLI');\n await stopPodmanMachineViaCLI(machineVisibleName);\n await waitForPodmanMachineStoppedState(podmanResourceCard);\n return;\n }\n\n // Handle Running state - try UI first, fallback to CLI\n if (currentStatus === ResourceElementState.Running) {\n try {\n await podmanResourceCard.performConnectionAction(ResourceElementActions.Stop);\n await waitForPodmanMachineStoppedState(podmanResourceCard);\n } catch (error) {\n console.log(\n 'Podman machine stop via UI failed, trying CLI:',\n error instanceof Error ? error.message : String(error),\n );\n await stopPodmanMachineViaCLI(machineVisibleName);\n await waitForPodmanMachineStoppedState(podmanResourceCard);\n }\n }\n}\n\nasync function stopPodmanMachineViaCLI(machineVisibleName: string): Promise<void> {\n // eslint-disable-next-line sonarjs/os-command\n execSync(`podman machine stop ${machineVisibleName}`);\n console.log(`Podman machine stopped via CLI: ${machineVisibleName}`);\n}\n\nasync function waitForPodmanMachineStoppedState(podmanResourceCard: ResourceConnectionCardPage): Promise<void> {\n await playExpect(podmanResourceCard.resourceElementConnectionStatus).toHaveText(ResourceElementState.Off, {\n timeout: 30_000,\n });\n}\n\nexport async function getVolumeNameForContainer(page: Page, containerName: string): Promise<string> {\n return test.step('Get volume name for container', async () => {\n let volumeName: string | null;\n let volumeSummaryContent: string[];\n try {\n const navigationBar = new NavigationBar(page);\n const volumePage = await navigationBar.openVolumes();\n await playExpect(volumePage.heading).toBeVisible({ timeout: 10_000 });\n const rows = await volumePage.getAllTableRows();\n\n for (let i = rows.length - 1; i > 0; i--) {\n volumeName = await rows[i].getByRole('cell').nth(3).getByRole('button').textContent();\n if (volumeName) {\n const volumeDetails = await volumePage.openVolumeDetails(volumeName);\n await volumeDetails.activateTab(VolumeDetailsPage.SUMMARY_TAB);\n volumeSummaryContent = await volumeDetails.tabContent.allTextContents();\n for (const content of volumeSummaryContent) {\n if (content.includes(containerName)) {\n await volumeDetails.backLink.click();\n return volumeName;\n }\n }\n await volumeDetails.backLink.click();\n }\n }\n return '';\n } catch (error) {\n if (\n error instanceof Error &&\n (error.message === 'Page is empty, there is no content' || error.message.includes('does not exist'))\n ) {\n return '';\n }\n throw error;\n }\n });\n}\n\nexport async function ensureCliInstalled(page: Page, resourceName: string, timeout = 60_000): Promise<void> {\n return test.step(`Ensure ${resourceName} CLI is installed`, async () => {\n const cliToolsPage = new CLIToolsPage(page);\n await playExpect(cliToolsPage.toolsTable).toBeVisible({ timeout: 10_000 });\n await playExpect.poll(async () => await cliToolsPage.toolsTable.count()).toBeGreaterThan(0);\n await playExpect(cliToolsPage.getToolRow(resourceName)).toBeVisible({ timeout: 10_000 });\n\n if (!(await cliToolsPage.getCurrentToolVersion(resourceName))) {\n await cliToolsPage.installTool(resourceName, timeout);\n }\n\n await playExpect\n .poll(async () => await cliToolsPage.getCurrentToolVersion(resourceName), { timeout: timeout })\n .toBeTruthy();\n });\n}\n\nexport async function createPodmanMachineFromCLI(): Promise<void> {\n return test.step('Create Podman machine from CLI', async () => {\n if (isLinux) return;\n\n const podmanMachineMode = process.env.PODMAN_ROOTFUL === '0' ? '' : '--rootful';\n const userModeNetworking = process.env.PODMAN_NETWORKING === '1' ? '--user-networking' : '';\n\n try {\n // eslint-disable-next-line sonarjs/no-os-command-from-path, sonarjs/os-command\n execSync(`podman machine init ${podmanMachineMode} ${userModeNetworking}`);\n } catch (error) {\n if (error instanceof Error && error.message.includes('VM already exists')) {\n console.log('Podman machine already exists, skipping creation.');\n }\n }\n\n try {\n // eslint-disable-next-line sonarjs/no-os-command-from-path\n execSync('podman machine start');\n console.log('Default podman machine started');\n } catch (error) {\n if (error instanceof Error && error.message.includes('already running')) {\n console.log('Default podman machine already started, skipping start.');\n }\n }\n });\n}\n\nexport async function deletePodmanMachineFromCLI(podmanMachineName: string): Promise<void> {\n return test.step('Delete Podman machine from CLI', () => {\n try {\n // eslint-disable-next-line sonarjs/os-command\n execSync(`podman machine rm ${podmanMachineName} -f`);\n } catch (error) {\n if (error instanceof Error && error.message.includes('VM does not exist')) {\n console.log(`Podman machine [${podmanMachineName}] does not exist, skipping deletion.`);\n }\n }\n });\n}\n\nexport async function resetPodmanMachinesFromCLI(): Promise<void> {\n return test.step('Reset Podman machine from CLI', () => {\n // eslint-disable-next-line sonarjs/no-os-command-from-path\n execSync('podman machine reset -f');\n });\n}\n\nexport async function fillTextbox(textbox: Locator, text: string): Promise<void> {\n return test.step(`Fill textbox with ${text}`, async () => {\n await playExpect(textbox).toBeVisible({ timeout: 15_000 });\n await textbox.fill(text);\n await playExpect(textbox).toHaveValue(text);\n });\n}\n\nexport async function runComposeUpFromCLI(composeFilePath: string): Promise<void> {\n return test.step('Run Compose up from CLI', async () => {\n try {\n // eslint-disable-next-line sonarjs/os-command\n execSync(`podman compose -f ${composeFilePath} up -d`);\n } catch (error) {\n throw new Error(`Error running podman compose up from CLI: ${error}`);\n }\n });\n}\n\nexport async function untagImagesFromPodman(name: string, tag = ''): Promise<void> {\n return test.step('Untag images from Podman', async () => {\n try {\n if (tag) {\n // eslint-disable-next-line sonarjs/os-command\n execSync(`podman untag ${name}:${tag}`);\n } else {\n // eslint-disable-next-line sonarjs/os-command\n execSync(`podman untag ${name}`);\n }\n } catch (error) {\n throw new Error(`Error untagging images from Podman: ${error}`);\n }\n });\n}\n\nexport async function setDockerCompatibilityFeature(page: Page, enable: boolean): Promise<void> {\n //Open the preferences bar and verify DC preferences page\n const settingsBar = new SettingsBar(page);\n\n if (await settingsBar.preferencesTab.isHidden()) {\n //Open settings if not opened already\n const navigationBar = new NavigationBar(page);\n await navigationBar.openSettings();\n }\n\n await settingsBar.expandPreferencesTab();\n\n const DCPreferencesLink = settingsBar.getLinkLocatorByHref('/preferences/default/preferences.dockerCompatibility');\n await playExpect(DCPreferencesLink).toBeVisible();\n await DCPreferencesLink.click();\n const DCPreferencesPage = new PreferencesPage(page);\n\n await playExpect(DCPreferencesPage.heading).toBeVisible();\n const experimentalTitle = DCPreferencesPage.content.getByText('Docker Compatibility', { exact: true });\n await playExpect(experimentalTitle).toBeVisible();\n\n //Set the feature\n const dockerCompatibilityCheckbox = DCPreferencesPage.content.getByRole('checkbox', {\n name: 'Enable the section for Docker compatibility.',\n });\n await playExpect(dockerCompatibilityCheckbox).toBeVisible();\n const isEnabled = await dockerCompatibilityCheckbox.isChecked();\n if (isEnabled !== enable) {\n await dockerCompatibilityCheckbox.locator('..').setChecked(enable);\n const isEnabled = await dockerCompatibilityCheckbox.isChecked();\n playExpect(isEnabled).toEqual(enable);\n }\n\n //Verify the main docker compatibility page (dis)appeared\n const DCSettingsLink = settingsBar.getLinkLocatorByHref('/preferences/docker-compatibility');\n if (enable) {\n await playExpect(DCSettingsLink).toBeVisible();\n } else {\n await playExpect(DCSettingsLink).not.toBeVisible();\n }\n\n //Close the preferences bar\n await settingsBar.expandPreferencesTab();\n}\n\nexport async function setStatusBarProvidersFeature(\n page: Page,\n navigationBar: NavigationBar,\n enable: boolean,\n): Promise<void> {\n await navigationBar.openSettings();\n const settingsBar = new SettingsBar(page);\n const experimentalPage = await settingsBar.openTabPage(ExperimentalPage);\n await experimentalPage.setExperimentalCheckbox(experimentalPage.statusBarProvidersCheckbox, enable);\n}\n\nfunction isRootlessPodman(): boolean {\n try {\n let output: string;\n\n if (isMac || isWindows) {\n // eslint-disable-next-line sonarjs/no-os-command-from-path\n output = execSync('podman machine ssh podman info --format json').toString();\n } else if (isLinux) {\n // eslint-disable-next-line sonarjs/no-os-command-from-path\n output = execSync('podman info --format json').toString();\n } else {\n throw new Error('Unsupported platform');\n }\n const info = JSON.parse(output);\n return info?.host?.security?.rootless === true;\n } catch (err) {\n throw new Error(`Failed to determine Podman rootless mode: ${err}`);\n }\n}\n\nfunction getPodmanVolumePath(volumeName: string, fileName: string): string {\n const relativePath = `${volumeName}/_data/${fileName}`;\n const isRootless = isRootlessPodman();\n\n if (isMac || isWindows) {\n const base = isRootless ? '.local/share/containers/storage/volumes' : '/var/lib/containers/storage/volumes';\n return `${base}/${relativePath}`;\n }\n\n if (isLinux) {\n const base = isRootless\n ? `${os.homedir()}/.local/share/containers/storage/volumes`\n : '/var/lib/containers/storage/volumes';\n return `${base}/${relativePath}`;\n }\n\n throw new Error('Unsupported platform');\n}\n\nexport async function readFileInVolumeFromCLI(volumeName: string, fileName: string): Promise<string> {\n return test.step('Read file in volume from CLI', async () => {\n try {\n const fullPath = getPodmanVolumePath(volumeName, fileName);\n\n const command = isMac || isWindows ? `podman machine ssh sudo cat ${fullPath}` : `cat ${fullPath}`;\n\n // eslint-disable-next-line sonarjs/os-command\n const output = execSync(command);\n return output.toString();\n } catch (error) {\n throw new Error(`Error reading file: ${fileName} in volume: ${volumeName} from CLI: ${error}`);\n }\n });\n}\n\n/**\n * Verifies that a Podman machine has the specified virtualization provider type.\n * This method checks that the machine card exists and displays the correct connection type.\n *\n * @param resourceConnectionCardPage - The resource connection card page to verify\n * @param virtualizationProvider - The expected virtualization provider type (e.g., PodmanVirtualizationProviders.WSL, PodmanVirtualizationProviders.HyperV...)\n * @returns A Promise that resolves when the verification is complete\n * @throws Will throw an error if the expected virtualization provider is not found or doesn't match\n */\nexport async function verifyVirtualizationProvider(\n resourceConnectionCardPage: ResourceConnectionCardPage,\n virtualizationProvider: PodmanVirtualizationProviders,\n): Promise<void> {\n return test.step(`Verify Podman Provider is ${virtualizationProvider}`, async () => {\n await playExpect\n .poll(async () => await resourceConnectionCardPage.doesResourceElementExist(), { timeout: 15_000 })\n .toBeTruthy();\n // Check against all possible variants to handle version differences\n const connectionTypeText = await resourceConnectionCardPage.connectionType.textContent();\n if (!connectionTypeText) {\n throw new Error('Connection type text is empty');\n }\n const matchesVariant = matchesProviderVariant(virtualizationProvider, connectionTypeText);\n playExpect(matchesVariant).toBeTruthy();\n });\n}\n\n/**\n * Verifies that a Podman machine has the specified machine privileges (rootful or rootless).\n * This method checks that the machine card exists and displays the correct machine privileges.\n *\n * @param resourceConnectionCardPage - The resource connection card page to verify\n * @param machinePrivileges - The expected machine privileges (e.g., PodmanMachinePrivileges.Rootful, PodmanMachinePrivileges.Rootless)\n * @returns A Promise that resolves when the verification is complete\n * @throws Will throw an error if the expected machine privileges are not found or doesn't match\n */\nexport async function verifyMachinePrivileges(\n resourceConnectionCardPage: ResourceConnectionCardPage,\n machinePrivileges: PodmanMachinePrivileges,\n): Promise<void> {\n return test.step(`Verify Podman Machine Privileges are ${machinePrivileges === PodmanMachinePrivileges.Rootful ? 'rootful' : 'rootless'}`, async () => {\n await playExpect\n .poll(async () => await resourceConnectionCardPage.doesResourceElementExist(), { timeout: 15_000 })\n .toBeTruthy();\n await playExpect(resourceConnectionCardPage.machinePrivileges).toContainText(machinePrivileges, {\n ignoreCase: true,\n });\n });\n}\n\n/**\n * Parses a version string into an array of numeric components.\n * Handles versions like \"5.7.0\", \"5.7\", \"6.0\", \"5.4.1\"\n * @param version - Version string to parse\n * @returns Array of numeric version components [major, minor, patch]\n */\nfunction parseVersion(version: string): number[] {\n return version.split('.').map(part => Number.parseInt(part, 10));\n}\n\n/**\n * Compares two version arrays to determine if the first is >= the second.\n * @param current - Current version components array\n * @param reference - Reference version components array\n * @returns true if current >= reference\n */\nfunction compareVersions(current: number[], reference: number[]): boolean {\n console.log(`Current podman CLI version: ${current.join('.')}`);\n console.log(`Reference podman CLI version: ${reference.join('.')}`);\n\n const maxLength = Math.max(current.length, reference.length);\n\n for (let i = 0; i < maxLength; i++) {\n const currentPart = current[i] ?? 0;\n const referencePart = reference[i] ?? 0;\n\n if (currentPart > referencePart) {\n return true;\n }\n if (currentPart < referencePart) {\n return false;\n }\n }\n\n return true; // versions are equal\n}\n\n/**\n * Gets the current Podman CLI version by running `podman -v`.\n * @returns The version string (e.g., \"5.7.0\")\n * @throws Error if the version cannot be determined\n */\nexport function getPodmanCliVersion(): string {\n try {\n // eslint-disable-next-line sonarjs/no-os-command-from-path\n const output = execSync('podman -v').toString().trim();\n // Output format: \"podman version 5.7.0\"\n const versionRegex = /podman version (\\d+(?:\\.\\d+)*)/i;\n const match = versionRegex.exec(output);\n if (!match?.[1]) {\n throw new Error(`Unable to parse Podman version from output: ${output}`);\n }\n return match[1];\n } catch (error) {\n throw new Error(`Failed to get Podman CLI version: ${error}`);\n }\n}\n\n/**\n * Checks if the installed Podman CLI version is equal to or greater than the reference version.\n * @param referenceVersion - The minimum required version (e.g., \"5.7.0\", \"5.7\", \"6.0\")\n * @returns true if the installed version is >= the reference version, false if podman is not available or version cannot be determined\n */\nexport function isPodmanCliVersionAtLeast(referenceVersion: string): boolean {\n try {\n const currentVersion = getPodmanCliVersion();\n const currentVersionArray = parseVersion(currentVersion);\n const referenceVersionArray = parseVersion(referenceVersion);\n\n return compareVersions(currentVersionArray, referenceVersionArray);\n } catch {\n // If podman is not available or version cannot be determined, return false\n return false;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nexport enum ArchitectureType {\n Default = 'default',\n AMD64 = 'amd64',\n ARM64 = 'arm64',\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { ImagesPage } from './images-page';\n\nexport class ImageEditPage extends BasePage {\n readonly name: string;\n readonly cancelButton: Locator;\n readonly saveButton: Locator;\n readonly imageName: Locator;\n readonly imageTag: Locator;\n readonly editDialog: Locator;\n readonly alertDialog: Locator;\n\n constructor(page: Page, name: string) {\n super(page);\n this.editDialog = page.getByRole('dialog', { name: 'Edit Image' });\n this.imageName = this.editDialog.getByLabel('imageName');\n this.cancelButton = this.editDialog.getByRole('button', {\n name: 'Cancel',\n exact: true,\n });\n this.saveButton = this.editDialog.getByRole('button', {\n name: 'Save',\n exact: true,\n });\n this.name = name;\n this.imageTag = this.editDialog.getByLabel('imageTag');\n this.alertDialog = page.getByLabel('Error Message Content');\n }\n\n async renameImage(name: string, tag = ''): Promise<ImagesPage> {\n return test.step('Rename image', async () => {\n if (!name) {\n throw Error('Provide name is invalid!');\n }\n\n await playExpect(this.saveButton).toBeVisible();\n await this.imageName.clear();\n await this.imageName.fill(name);\n\n if (tag) {\n await this.imageTag.clear();\n await this.imageTag.fill(tag);\n }\n\n await playExpect.poll(async () => this.alertDialog.count()).toBe(0);\n\n await playExpect(this.saveButton).toBeEnabled();\n await this.saveButton.click();\n return new ImagesPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport type { DeployPodOptions } from '/@/model/core/types';\n\nimport { BasePage } from './base-page';\n\nexport class DeployToKubernetesPage extends BasePage {\n readonly content: Locator;\n readonly podName: Locator;\n readonly kubernetesContext: Locator;\n readonly deployButton: Locator;\n readonly doneButton: Locator;\n readonly namespaceCombobox: Locator;\n readonly servicesCheckbox: Locator;\n readonly restrictedContextCheckbox: Locator;\n readonly createIngressCheckbox: Locator;\n readonly createOpenShiftRoutesCheckbox: Locator;\n readonly selectPortCombobox: Locator;\n readonly deploymentStatus: Locator;\n\n constructor(page: Page) {\n super(page);\n this.content = this.page.getByRole('region', { name: 'Tab Content' });\n this.podName = this.content.getByRole('textbox', { name: 'Pod Name' });\n this.kubernetesContext = this.content.getByRole('textbox', {\n name: 'Kubernetes Context',\n });\n this.namespaceCombobox = this.content.getByRole('combobox', {\n name: 'Select a Kubernetes Namespace',\n });\n this.deployButton = this.content.getByRole('button', { name: 'Deploy' });\n this.doneButton = this.content.getByRole('button', { name: 'Done' });\n this.servicesCheckbox = this.content.getByRole('checkbox', {\n name: 'Use Services',\n });\n this.restrictedContextCheckbox = this.content.getByRole('checkbox', {\n name: 'Use restricted security context',\n });\n this.createIngressCheckbox = this.content.getByRole('checkbox', {\n name: 'Create Ingress',\n });\n this.createOpenShiftRoutesCheckbox = this.content.getByRole('checkbox', {\n name: 'Use Routes',\n });\n this.selectPortCombobox = this.content.getByRole('combobox', {\n name: 'Select a Port',\n });\n this.deploymentStatus = this.content.getByRole('region', {\n name: 'Pod Deployment Status Info',\n });\n }\n\n public async deployPod(\n name: string,\n {\n useKubernetesServices,\n useRestrictedSecurityContext,\n useKubernetesIngress,\n containerExposedPort,\n isOpenShiftCluster,\n useOpenShiftRoutes,\n }: DeployPodOptions,\n context: string,\n namespace = 'default',\n timeout = 100_000,\n ): Promise<void> {\n return test.step(`Deploy pod ${name}`, async () => {\n await playExpect(this.podName).toBeVisible();\n await this.podName.clear();\n await this.podName.fill(name);\n\n await playExpect(this.servicesCheckbox).toBeEnabled();\n if (useKubernetesServices) {\n await this.servicesCheckbox.check();\n await playExpect(this.servicesCheckbox).toBeChecked();\n } else {\n await this.servicesCheckbox.uncheck();\n await playExpect(this.servicesCheckbox).not.toBeChecked();\n }\n\n await playExpect(this.restrictedContextCheckbox).toBeEnabled();\n if (useRestrictedSecurityContext) {\n await this.restrictedContextCheckbox.check();\n await playExpect(this.restrictedContextCheckbox).toBeChecked();\n } else {\n await this.restrictedContextCheckbox.uncheck();\n await playExpect(this.restrictedContextCheckbox).not.toBeChecked();\n }\n\n if (isOpenShiftCluster) {\n await playExpect(this.createOpenShiftRoutesCheckbox).toBeEnabled();\n if (useOpenShiftRoutes) {\n await this.createOpenShiftRoutesCheckbox.check();\n await playExpect(this.createOpenShiftRoutesCheckbox).toBeChecked();\n } else {\n await this.createOpenShiftRoutesCheckbox.uncheck();\n await playExpect(this.createOpenShiftRoutesCheckbox).not.toBeChecked();\n }\n } else {\n await playExpect(this.createIngressCheckbox).toBeEnabled();\n if (useKubernetesIngress) {\n await this.createIngressCheckbox.check();\n await playExpect(this.createIngressCheckbox).toBeChecked();\n if (containerExposedPort) {\n await this.selectExposedPort(containerExposedPort);\n }\n } else {\n await this.createIngressCheckbox.uncheck();\n await playExpect(this.createIngressCheckbox).not.toBeChecked();\n }\n }\n\n await this.kubernetesContext.scrollIntoViewIfNeeded();\n await playExpect(this.kubernetesContext).toHaveValue(context);\n await playExpect(this.namespaceCombobox).toBeVisible();\n const currentNamespace = await this.namespaceCombobox.inputValue();\n if (currentNamespace !== namespace) {\n const namespaceOptions = await this.namespaceCombobox.locator('option').allInnerTexts();\n if (!namespaceOptions.includes(namespace)) {\n throw new Error(`${namespace} doesn't exist`);\n }\n await this.namespaceCombobox.selectOption({ value: namespace });\n await playExpect(this.namespaceCombobox).toHaveValue(namespace);\n }\n\n await playExpect(this.deployButton).toBeEnabled();\n await this.deployButton.click();\n await playExpect(this.deploymentStatus).toBeVisible({ timeout: 30_000 });\n await this.deploymentStatus.scrollIntoViewIfNeeded();\n await playExpect(this.doneButton).toBeVisible({ timeout: timeout });\n });\n }\n\n private async selectExposedPort(containerExposedPort: string): Promise<void> {\n return test.step(`Select exposed port: ${containerExposedPort}`, async () => {\n await playExpect(this.selectPortCombobox).toBeVisible();\n const exposedPorts = await this.selectPortCombobox.locator('option').allInnerTexts();\n if (!exposedPorts.includes(containerExposedPort)) {\n throw new Error(`Port: ${containerExposedPort} doesn't exist`);\n }\n await this.selectPortCombobox.selectOption({\n value: containerExposedPort,\n });\n await playExpect(this.selectPortCombobox).toHaveValue(containerExposedPort);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { ContainerState } from '/@/model/core/states';\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { ContainersPage } from './containers-page';\nimport { DeployToKubernetesPage } from './deploy-to-kubernetes-page';\nimport { DetailsPage } from './details-page';\n\nexport class ContainerDetailsPage extends DetailsPage {\n readonly stopButton: Locator;\n readonly deleteButton: Locator;\n readonly imageLink: Locator;\n readonly deployButton: Locator;\n readonly startButton: Locator;\n readonly terminalInput: Locator;\n readonly terminalContent: Locator;\n readonly findInLogsInput: Locator;\n readonly searchResults: Locator;\n\n static readonly SUMMARY_TAB = 'Summary';\n static readonly LOGS_TAB = 'Logs';\n static readonly KUBE_TAB = 'Kube';\n static readonly TERMINAL_TAB = 'Terminal';\n static readonly INSPECT_TAB = 'Inspect';\n static readonly Tty_TAB = 'Tty';\n\n constructor(page: Page, name: string) {\n super(page, name);\n this.stopButton = this.controlActions.getByRole('button').and(this.page.getByLabel('Stop Container'));\n this.deleteButton = this.controlActions.getByRole('button').and(this.page.getByLabel('Delete Container'));\n this.imageLink = this.header.getByRole('link', { name: 'Image Details' });\n this.deployButton = this.controlActions.getByRole('button', {\n name: 'Deploy to Kubernetes',\n });\n this.startButton = this.controlActions.getByRole('button', {\n name: 'Start Container',\n exact: true,\n });\n\n this.terminalInput = this.tabContent.getByLabel('Terminal input');\n this.terminalContent = this.tabContent.locator('.xterm-rows');\n this.findInLogsInput = this.tabContent.getByLabel('Find');\n this.searchResults = this.tabContent.locator('div.xterm-selection > div');\n }\n\n async getState(): Promise<string> {\n return test.step('Get container state', async () => {\n const currentState = await this.header.getByRole('status').getAttribute('title');\n for (const state of Object.values(ContainerState)) {\n if (currentState === state) return state;\n }\n\n return ContainerState.Unknown;\n });\n }\n\n async stopContainer(): Promise<void> {\n return test.step('Stop container', async () => {\n await playExpect(this.stopButton).toBeEnabled();\n await this.stopButton.click();\n });\n }\n\n async deleteContainer(): Promise<ContainersPage> {\n return test.step('Delete container', async () => {\n await playExpect(this.deleteButton).toBeEnabled();\n await this.deleteButton.click();\n await handleConfirmationDialog(this.page);\n return new ContainersPage(this.page);\n });\n }\n\n async getContainerPort(): Promise<string> {\n return test.step('Get container port', async () => {\n await this.activateTab(ContainerDetailsPage.SUMMARY_TAB);\n const summaryTable = this.tabContent.getByRole('table');\n const portsRow = summaryTable.locator('tr:has-text(\"Ports\")');\n const portsCell = portsRow.getByRole('cell').nth(1);\n await playExpect(portsCell).toBeVisible();\n return await portsCell.innerText();\n });\n }\n\n async openDeployToKubernetesPage(): Promise<DeployToKubernetesPage> {\n return test.step('Open Deploy to Kubernetes page', async () => {\n await playExpect(this.deployButton).toBeVisible();\n await this.deployButton.click();\n return new DeployToKubernetesPage(this.page);\n });\n }\n\n async executeCommandInTerminal(command: string): Promise<void> {\n await this.activateTab(ContainerDetailsPage.TERMINAL_TAB);\n\n await playExpect(this.terminalInput).toBeVisible();\n await this.page.waitForTimeout(500); // Wait for terminal to be ready\n await this.terminalInput.pressSequentially(command, { delay: 10 });\n await this.terminalInput.press('Enter');\n }\n\n async executeCommandInTty(command: string): Promise<void> {\n return test.step('Execute command in TTY terminal', async () => {\n await this.activateTab(ContainerDetailsPage.Tty_TAB);\n\n await this.terminalInput.pressSequentially(command, { delay: 10 });\n await this.terminalInput.press('Enter');\n });\n }\n\n async findInLogs(text: string): Promise<void> {\n return test.step('Find text in logs', async () => {\n await this.activateTab(ContainerDetailsPage.LOGS_TAB);\n await playExpect(this.findInLogsInput).toBeVisible();\n await this.findInLogsInput.clear();\n await playExpect(this.findInLogsInput).toHaveValue('');\n\n await this.findInLogsInput.fill(text);\n await playExpect(this.findInLogsInput).toHaveValue(text);\n });\n }\n\n async getCountOfSearchResults(): Promise<number> {\n return test.step('Get count of search results', async () => {\n await this.activateTab(ContainerDetailsPage.LOGS_TAB);\n await playExpect(this.findInLogsInput).toBeVisible();\n\n return await this.searchResults.count();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport type { ContainerInteractiveParams } from '/@/model/core/types';\nimport { waitWhile } from '/@/utility/wait';\n\nimport { BasePage } from './base-page';\nimport { ContainerDetailsPage } from './container-details-page';\nimport { ContainersPage } from './containers-page';\n\nexport class RunImagePage extends BasePage {\n readonly name: Locator;\n readonly heading: Locator;\n readonly closeLink: Locator;\n readonly backToImageDetailsLink: Locator;\n readonly imageName: string;\n readonly startContainerButton: Locator;\n readonly errorAlert: Locator;\n readonly containerNameInput: Locator;\n readonly containerEntryPointInput: Locator;\n readonly containerComamndInput: Locator;\n readonly containerAddCustomPortMappingButton: Locator;\n readonly volumeNameInput: Locator;\n readonly volumeContainerPath: Locator;\n\n constructor(page: Page, name: string) {\n super(page);\n this.imageName = name;\n this.name = page.getByLabel('name').and(page.getByText('Run Image'));\n this.heading = page.getByRole('heading', { name: this.imageName });\n this.closeLink = page.getByRole('link', { name: 'Close' });\n this.errorAlert = page.getByRole('alert', {\n name: 'Error Message Content',\n });\n this.backToImageDetailsLink = page.getByRole('link', {\n name: 'Go back to Image Details',\n });\n this.startContainerButton = page.getByLabel('Start Container', {\n exact: true,\n });\n this.containerNameInput = page.getByLabel('Container Name');\n this.containerEntryPointInput = page.getByLabel('Entrypoint');\n this.containerComamndInput = page.getByLabel('Command');\n this.containerAddCustomPortMappingButton = page.getByLabel('Add custom port mapping', { exact: true });\n this.volumeNameInput = page.getByPlaceholder('Path on the host');\n this.volumeContainerPath = page.getByPlaceholder('Path inside the container');\n }\n\n async activateTab(name: string): Promise<void> {\n return test.step(`Activate tab: ${name}`, async () => {\n const tabactive = this.page.getByRole('link', { name: name, exact: true }).and(this.page.getByText(name));\n await tabactive.click();\n });\n }\n\n // If the container has a defined exposed port, the mapping offers only one part of the input box, host port\n // Example of the placeholder: 'Enter value for port 80/tcp' : settable value\n async setHostPortToExposedContainerPort(exposedPort: string, port: string): Promise<void> {\n return test.step('Set host port to exposed container port', async () => {\n await this.activateTab('Basic');\n const portMapping = this.page\n .getByRole('textbox')\n .and(this.page.getByPlaceholder(`Enter value for port ${exposedPort}/tcp`));\n await portMapping.waitFor({ state: 'visible' });\n await portMapping.fill(port);\n });\n }\n\n async startInteractiveContainer(customName = ''): Promise<ContainerDetailsPage> {\n return test.step(`Start interactive container from image: ${this.imageName}`, async () => {\n await this.startContainer(customName, {\n attachTerminal: true,\n interactive: true,\n } as ContainerInteractiveParams);\n const detailsPageLocator = this.page.getByLabel('name').and(this.page.getByText('Container Details'));\n await playExpect(detailsPageLocator).toBeVisible(); // we are sure to get into details page\n const heading = this.page.getByRole('heading');\n const containerName = customName ? customName : await heading.innerText();\n console.log(`Heading and container name: ${await heading.innerText()}`);\n return new ContainerDetailsPage(this.page, containerName);\n });\n }\n\n async startContainer(customName = '', optionalParams?: ContainerInteractiveParams): Promise<ContainersPage> {\n return test.step(`Start container from image: ${this.imageName}`, async () => {\n if (customName !== '') {\n await this.activateTab('Basic');\n await playExpect(this.containerNameInput).toBeVisible();\n await this.containerNameInput.fill(customName);\n await playExpect(this.containerNameInput).toHaveValue(customName);\n }\n\n if (optionalParams?.attachVolumeName !== undefined && optionalParams?.attachVolumePath !== undefined) {\n await this.activateTab('Basic');\n\n await playExpect(this.volumeNameInput).toBeVisible();\n await this.volumeNameInput.pressSequentially(optionalParams.attachVolumeName, { delay: 10 });\n await playExpect(this.volumeNameInput).toHaveValue(optionalParams.attachVolumeName);\n\n await playExpect(this.volumeContainerPath).toBeVisible();\n await this.volumeContainerPath.pressSequentially(optionalParams.attachVolumePath, { delay: 10 });\n await playExpect(this.volumeContainerPath).toHaveValue(optionalParams.attachVolumePath);\n }\n\n if (optionalParams?.attachTerminal !== undefined) {\n // disable the checkbox in advanced tab\n await this.activateTab('Advanced');\n const checkbox = this.page.getByRole('checkbox', {\n name: 'Attach a pseudo terminal',\n });\n if (optionalParams.attachTerminal) {\n await checkbox.check();\n } else {\n await checkbox.uncheck();\n }\n await playExpect(checkbox).toBeChecked({\n checked: optionalParams.attachTerminal,\n });\n }\n\n if (optionalParams?.interactive !== undefined) {\n // disable the checkbox in advanced tab\n await this.activateTab('Advanced');\n const checkbox = this.page.getByRole('checkbox', {\n name: 'Use interactive',\n });\n if (optionalParams.interactive) {\n await checkbox.check();\n } else {\n await checkbox.uncheck();\n }\n await playExpect(checkbox).toBeChecked({\n checked: optionalParams.interactive,\n });\n }\n\n await this.activateTab('Basic');\n await playExpect(this.startContainerButton).toBeEnabled();\n await this.startContainerButton.click();\n // After clicking on the button there seems to be four possible outcomes\n // 1. Opening particular container's details page with tty tab opened\n // 2. Opening Containers page with new container on it\n // 3. staying on the run image page with an error\n // 4. Starting a container without entrypoint or command creates a container, but it stays on Run Image Page without error\n await waitWhile(\n async () => {\n return await this.name.isVisible();\n },\n { sendError: false },\n );\n\n const errorCount = await this.errorAlert.count();\n if (errorCount > 0) {\n const runImagePageActive = await this.name.isVisible();\n const message = runImagePageActive ? 'threw an ' : 'redirected to another page with an ';\n throw Error(`Starting the container ${message} error: ${await this.errorAlert.innerText()}`);\n }\n return new ContainersPage(this.page);\n });\n }\n\n async setCustomPortMapping(customPortMapping: string): Promise<void> {\n return test.step(`Set custom port mapping: ${customPortMapping}`, async () => {\n // add port mapping\n await this.activateTab('Basic');\n await playExpect(this.containerAddCustomPortMappingButton).toBeVisible();\n await this.containerAddCustomPortMappingButton.click();\n const hostPort = this.page.getByLabel('host port');\n const containerPort = this.page.getByLabel('container port');\n await hostPort.fill(customPortMapping.split(':')[0]);\n await containerPort.fill(customPortMapping.split(':')[1]);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { DetailsPage } from './details-page';\nimport { ImageEditPage } from './image-edit-page';\nimport { ImagesPage } from './images-page';\nimport { RunImagePage } from './run-image-page';\n\nexport class ImageDetailsPage extends DetailsPage {\n readonly runImageButton: Locator;\n readonly deleteButton: Locator;\n readonly editButton: Locator;\n readonly summaryTab: Locator;\n readonly historyTab: Locator;\n readonly inspectTab: Locator;\n readonly actionsButton: Locator;\n readonly buildDiskImageButton: Locator;\n readonly saveImagebutton: Locator;\n readonly saveImageInput: Locator;\n readonly confirmSaveImages: Locator;\n readonly browseButton: Locator;\n readonly pushButton: Locator;\n\n constructor(page: Page, name: string) {\n super(page, name);\n this.runImageButton = this.controlActions.getByRole('button', {\n name: 'Run Image',\n });\n this.deleteButton = this.controlActions.getByRole('button', {\n name: 'Delete Image',\n });\n this.editButton = this.controlActions.getByRole('button', {\n name: 'Edit Image',\n });\n this.pushButton = this.controlActions.getByRole('button', {\n name: 'Push Image',\n exact: true,\n });\n this.summaryTab = this.tabs.getByText('Summary');\n this.historyTab = this.tabs.getByText('History');\n this.inspectTab = this.tabs.getByText('Inspect');\n this.actionsButton = page.getByRole('button', { name: 'kebab menu' });\n this.buildDiskImageButton = page.getByTitle('Build Disk Image');\n this.saveImagebutton = this.controlActions.getByRole('button', {\n name: 'Save Image',\n exact: true,\n });\n this.saveImageInput = page.locator('#input-output-directory');\n this.confirmSaveImages = page.getByLabel('Save images', { exact: true });\n this.browseButton = page.getByLabel('Select output folder');\n }\n\n async openRunImage(): Promise<RunImagePage> {\n return test.step('Open run image page', async () => {\n await playExpect(this.runImageButton).toBeEnabled({ timeout: 30_000 });\n await this.runImageButton.click();\n return new RunImagePage(this.page, this.resourceName);\n });\n }\n\n async openEditImage(): Promise<ImageEditPage> {\n return test.step('Open edit image page', async () => {\n await playExpect(this.editButton).toBeEnabled({ timeout: 30_000 });\n await this.editButton.click();\n return new ImageEditPage(this.page, this.resourceName);\n });\n }\n\n async deleteImage(): Promise<ImagesPage> {\n return test.step('Delete image', async () => {\n await playExpect(this.deleteButton).toBeEnabled({ timeout: 30_000 });\n await this.deleteButton.click();\n await handleConfirmationDialog(this.page);\n return new ImagesPage(this.page);\n });\n }\n\n async pushImage(): Promise<void> {\n return test.step('Push image', async () => {\n await playExpect(this.pushButton).toBeEnabled();\n await this.pushButton.click();\n await handleConfirmationDialog(this.page, 'Push image', true, 'Push image', '', 60_000, true);\n });\n }\n\n async saveImage(outputPath: string): Promise<ImagesPage> {\n if (!outputPath) {\n throw Error('Path is incorrect or not provided!');\n }\n // TODO: Will probably require refactoring when https://github.com/containers/podman-desktop/issues/7620 is done\n await playExpect(this.saveImagebutton).toBeEnabled();\n await this.saveImagebutton.click();\n await playExpect(this.saveImageInput).toBeVisible();\n await playExpect(this.confirmSaveImages).toBeVisible();\n\n await this.saveImageInput.evaluate(node => node.removeAttribute('readonly'));\n await this.confirmSaveImages.evaluate(node => node.removeAttribute('disabled'));\n\n await this.saveImageInput.pressSequentially(outputPath, { delay: 10 });\n await this.confirmSaveImages.click();\n\n return new ImagesPage(this.page);\n }\n\n async pushImageToKindCluster(): Promise<void> {\n const kebabMenuButton = this.controlActions.getByRole('button', { name: 'kebab menu', exact: true });\n let pushToKindButton: Locator;\n const pushToKindName = 'Push image to Kind Cluster';\n\n if ((await kebabMenuButton.count()) > 0) {\n await kebabMenuButton.click();\n pushToKindButton = this.controlActions.getByTitle('Drop Down Menu Items').getByTitle(pushToKindName);\n } else {\n pushToKindButton = this.controlActions.getByRole('button', { name: pushToKindName });\n }\n await playExpect(pushToKindButton).toBeVisible();\n await pushToKindButton.click();\n\n await handleConfirmationDialog(this.page, 'Kind', true, 'OK', '', 80_000);\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { ImagesPage } from './images-page';\n\nexport class PullImagePage extends BasePage {\n readonly heading: Locator;\n readonly pullImageButton: Locator;\n readonly closeLink: Locator;\n readonly backToImagesLink: Locator;\n readonly manageRegistriesButton: Locator;\n readonly imageNameInput: Locator;\n readonly tabContent: Locator;\n readonly searchResultsTable: Locator;\n readonly doneButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = page.getByRole('heading', {\n name: 'Pull Image From a Registry',\n });\n this.pullImageButton = page.getByRole('button', { name: 'Pull' });\n this.closeLink = page.getByRole('link', { name: 'Close' });\n this.backToImagesLink = page.getByRole('link', {\n name: 'Go back to Images',\n });\n this.manageRegistriesButton = page.getByRole('button', {\n name: 'Manage registries',\n });\n this.imageNameInput = page.getByLabel('Image to Pull');\n this.tabContent = page.getByRole('region', {\n name: 'Tab Content',\n exact: true,\n });\n this.searchResultsTable = this.tabContent.getByRole('row');\n this.doneButton = page.getByRole('button', { name: 'Done', exact: true });\n }\n\n async pullImage(imageName: string, tag = '', timeout = 60_000): Promise<ImagesPage> {\n return test.step(`Pulling image ${imageName}:${tag}`, async () => {\n const fullImageName = `${imageName}${tag.length === 0 ? '' : ':' + tag}`;\n await this.imageNameInput.fill(fullImageName);\n await playExpect(this.pullImageButton).toBeEnabled();\n await this.pullImageButton.click();\n\n await playExpect(this.doneButton).toBeEnabled({ timeout: timeout });\n await this.doneButton.click();\n return new ImagesPage(this.page);\n });\n }\n\n async getAllSearchResultsFor(\n imageName: string,\n searchForVersion: boolean,\n imageTag = '',\n resultsExpected = true,\n ): Promise<string[]> {\n return test.step(`Get all search results for ${imageName}:${imageTag}`, async () => {\n const searchString = await this.handleFormAndResultSearchString(\n imageName,\n searchForVersion,\n imageTag,\n resultsExpected,\n );\n return await this.getAllSearchResultsInstantly(searchString);\n });\n }\n\n async getFirstSearchResultFor(\n imageName: string,\n searchForVersion: boolean,\n imageTag = '',\n resultsExpected = true,\n ): Promise<string> {\n return test.step(`Get first search result for ${imageName}:${imageTag}`, async () => {\n await this.handleFormAndResultSearchString(imageName, searchForVersion, imageTag, resultsExpected);\n return await this.getFirstSearchResultInstantly();\n });\n }\n\n async refineSearchResults(stringToAppend: string, resultsExpected = true): Promise<string[]> {\n return test.step(`Refine search results by appending: ${stringToAppend}`, async () => {\n await this.imageNameInput.pressSequentially(stringToAppend, {\n delay: 10,\n });\n const searchString = await this.imageNameInput.inputValue();\n\n if (resultsExpected) {\n await playExpect(this.searchResultsTable).toBeVisible({\n timeout: 15_000,\n });\n await playExpect\n .poll(async () => await this.getFirstSearchResultInstantly(), {\n timeout: 10_000,\n })\n .toContain(searchString);\n } else {\n await playExpect(this.searchResultsTable).not.toBeVisible({\n timeout: 15_000,\n });\n }\n\n return await this.getAllSearchResultsInstantly(searchString);\n });\n }\n\n async getAllSearchResultsInstantly(searchString: string): Promise<string[]> {\n return test.step(`Get search results instantly for ${searchString}`, async () => {\n const resultList: string[] = [];\n const resultRows = await this.getAllResultButtonLocators(searchString);\n for (const row of resultRows) {\n const result = await row.innerText();\n resultList.push(result);\n }\n console.log(`Found ${resultList.length} results for ${searchString}`);\n return resultList;\n });\n }\n\n async getFirstSearchResultInstantly(): Promise<string> {\n return test.step('Get first search result from the results table', async () => {\n const resultRow = this.getFirstResultButtonLocator();\n return await resultRow.innerText();\n });\n }\n\n async pullImageFromSearchResults(pattern: string, timeout = 60_000): Promise<ImagesPage> {\n return test.step(`Pull image from search results: ${pattern}`, async () => {\n await this.selectValueFromSearchResults(pattern);\n await playExpect(this.pullImageButton).toBeEnabled();\n await this.pullImageButton.click();\n\n await playExpect(this.doneButton).toBeEnabled({ timeout: timeout });\n await this.doneButton.click();\n return new ImagesPage(this.page);\n });\n }\n\n async selectValueFromSearchResults(pattern: string): Promise<void> {\n return test.step(`Select value from search results: ${pattern}`, async () => {\n const getExactButtonLocator = this.searchResultsTable.getByRole('button', { name: pattern, exact: true }).first();\n\n await getExactButtonLocator.scrollIntoViewIfNeeded();\n await getExactButtonLocator.focus();\n\n await playExpect(getExactButtonLocator).toBeEnabled();\n await getExactButtonLocator.click();\n\n await playExpect(this.imageNameInput).toHaveValue(pattern);\n });\n }\n\n async clearImageSearch(): Promise<void> {\n return test.step('Clear image search', async () => {\n await this.imageNameInput.clear();\n await playExpect(this.imageNameInput).toHaveValue('');\n await playExpect(this.searchResultsTable).not.toBeVisible();\n });\n }\n\n private getAllResultButtonLocators(pattern: string): Promise<Locator[]> {\n return this.searchResultsTable.getByRole('button', { name: pattern }).all();\n }\n\n private getFirstResultButtonLocator(): Locator {\n return this.searchResultsTable.getByRole('button').first();\n }\n\n private async handleFormAndResultSearchString(\n imageName: string,\n searchForVersion: boolean,\n imageTag = '',\n resultsExpected = true,\n ): Promise<string> {\n return test.step(`Handle form and result search string for ${imageName}:${imageTag}`, async () => {\n if (!imageName || imageName.length === 0) {\n throw new Error('Image name is invalid');\n }\n\n let searchString: string;\n\n if (searchForVersion) {\n searchString = `${imageName}:${imageTag}`;\n } else {\n searchString = imageName;\n }\n\n await this.clearImageSearch();\n await this.imageNameInput.fill(searchString);\n\n if (resultsExpected) {\n await playExpect(this.searchResultsTable).toBeVisible({\n timeout: 15_000,\n });\n } else {\n await playExpect(this.searchResultsTable).not.toBeVisible({\n timeout: 15_000,\n });\n }\n return searchString;\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport type { ContainerInteractiveParams } from '/@/model/core/types';\nimport { handleConfirmationDialog } from '/@/utility/operations';\nimport { waitUntil, waitWhile } from '/@/utility/wait';\n\nimport { BuildImagePage } from './build-image-page';\nimport type { ContainersPage } from './containers-page';\nimport { ImageDetailsPage } from './image-details-page';\nimport { MainPage } from './main-page';\nimport { PullImagePage } from './pull-image-page';\n\nexport class ImagesPage extends MainPage {\n readonly pullImageButton: Locator;\n readonly pruneImagesButton: Locator;\n readonly buildImageButton: Locator;\n readonly pruneConfirmationButton: Locator;\n readonly loadImagesFromTarButton: Locator;\n readonly addArchiveButton: Locator;\n readonly confirmLoadImagesButton: Locator;\n readonly deleteAllUnusedImagesCheckbox: Locator;\n readonly deleteAllSelectedButton: Locator;\n\n constructor(page: Page) {\n super(page, 'images');\n this.pullImageButton = this.additionalActions.getByRole('button', { name: 'Pull', exact: true });\n this.pruneImagesButton = this.additionalActions.getByRole('button', { name: 'Prune', exact: true });\n this.buildImageButton = this.additionalActions.getByRole('button', { name: 'Build', exact: true });\n this.pruneConfirmationButton = this.page.getByRole('button', { name: 'All unused images', exact: true });\n this.loadImagesFromTarButton = this.additionalActions.getByLabel('Load Images', { exact: true });\n this.addArchiveButton = this.page.getByRole('button', { name: 'Add archive', exact: true });\n this.confirmLoadImagesButton = this.page.getByRole('button', { name: 'Load Images', exact: true });\n this.deleteAllUnusedImagesCheckbox = this.page.getByRole('checkbox', { name: 'Toggle all', exact: true });\n this.deleteAllSelectedButton = this.bottomAdditionalActions.getByRole('button', { name: 'Delete' });\n }\n\n async openPullImage(): Promise<PullImagePage> {\n return test.step('Open pull image page', async () => {\n await waitWhile(() => this.noContainerEngine(), {\n timeout: 50_000,\n message: 'No Container Engine is available, cannot pull an image',\n });\n await this.pullImageButton.click();\n return new PullImagePage(this.page);\n });\n }\n\n async pullImage(image: string): Promise<ImagesPage> {\n return test.step(`Pull image: ${image}`, async () => {\n const pullImagePage = await this.openPullImage();\n await playExpect(pullImagePage.heading).toBeVisible();\n return await pullImagePage.pullImage(image);\n });\n }\n\n async renameImage(oldname: string, newname: string, newtag = ''): Promise<ImagesPage> {\n return test.step(`Rename ${oldname} to ${newname}`, async () => {\n const imageDetailsPage = await this.openImageDetails(oldname);\n await playExpect(imageDetailsPage.heading).toContainText(oldname);\n const editImagePage = await imageDetailsPage.openEditImage();\n return await editImagePage.renameImage(newname, newtag);\n });\n }\n\n async startContainerWithImage(\n image: string,\n containerName: string,\n containersParams?: ContainerInteractiveParams,\n ): Promise<ContainersPage> {\n return test.step(`Start container with image: ${image}`, async () => {\n const imageDetails = await this.openImageDetails(image);\n const runImage = await imageDetails.openRunImage();\n return await runImage.startContainer(containerName, containersParams);\n });\n }\n\n async openImageDetails(name: string): Promise<ImageDetailsPage> {\n return test.step(`Open image details page for image: ${name}`, async () => {\n const imageRow = await this.getImageRowByName(name);\n if (imageRow === undefined) {\n throw Error(`Image: '${name}' does not exist`);\n }\n const imageRowName = imageRow.getByRole('cell').nth(3);\n await imageRowName.click();\n return new ImageDetailsPage(this.page, name);\n });\n }\n\n async pruneImages(): Promise<ImagesPage> {\n return test.step('Prune all images', async () => {\n await this.pruneImagesButton.click();\n await handleConfirmationDialog(this.page, 'Prune', true, 'All unused images');\n return this;\n });\n }\n\n async pruneUntaggedImages(): Promise<ImagesPage> {\n return test.step('Prune untagged images', async () => {\n await this.pruneImagesButton.click();\n await handleConfirmationDialog(this.page, 'Prune', true, 'All untagged images');\n return this;\n });\n }\n\n async openBuildImage(): Promise<BuildImagePage> {\n return test.step('Open build image page', async () => {\n await this.buildImageButton.click();\n return new BuildImagePage(this.page);\n });\n }\n\n async getImageRowByName(name: string): Promise<Locator | undefined> {\n return this.getRowByName(name);\n }\n\n private async imageExists(name: string): Promise<boolean> {\n return test.step(`Check if image: ${name} exists`, async () => {\n const result = await this.getImageRowByName(name);\n return result !== undefined;\n });\n }\n\n async waitForImageExists(name: string, timeout = 5_000): Promise<boolean> {\n return test.step(`Wait for image: ${name} to exist`, async () => {\n await waitUntil(async () => await this.imageExists(name), { timeout: timeout });\n return true;\n });\n }\n\n async waitForImageDelete(name: string, timeout = 5_000): Promise<boolean> {\n return test.step(`Wait for image: ${name} to be deleted`, async () => {\n await waitWhile(async () => await this.imageExists(name), { timeout: timeout });\n return true;\n });\n }\n\n async getCurrentStatusOfImage(name: string): Promise<string> {\n return test.step(`Get current status of image: ${name}`, async () => {\n let status = '';\n const row = await this.getImageRowByName(name);\n\n if (row === undefined) throw new Error(`Image: '${name}' does not exist`);\n status = status + (await row.getByRole('status').getAttribute('title'));\n return status;\n });\n }\n\n async loadImages(archivePath: string): Promise<ImagesPage> {\n // TODO: Will probably require refactoring when https://github.com/containers/podman-desktop/issues/7620 is done\n\n await playExpect(this.loadImagesFromTarButton).toBeEnabled();\n await this.loadImagesFromTarButton.click();\n await playExpect(this.addArchiveButton).toBeEnabled();\n await this.addArchiveButton.setInputFiles(archivePath);\n await playExpect(this.confirmLoadImagesButton).toBeEnabled();\n await this.confirmLoadImagesButton.click();\n return this;\n }\n\n async markAllUnusedImages(): Promise<boolean> {\n return test.step('Mark all unused images', async () => {\n if (!(await this.deleteAllUnusedImagesCheckbox.isVisible())) {\n console.log('No images available on the page');\n return false;\n }\n\n if (!(await this.deleteAllUnusedImagesCheckbox.isEnabled())) {\n console.log('No unused images available on the page');\n return false;\n }\n\n await playExpect(this.deleteAllUnusedImagesCheckbox).not.toBeChecked();\n await this.deleteAllUnusedImagesCheckbox.locator('..').click();\n await playExpect(this.deleteAllUnusedImagesCheckbox).toBeChecked();\n return true;\n });\n }\n\n async deleteAllUnusedImages(): Promise<void> {\n return test.step('Delete all unused images', async () => {\n if (!(await this.markAllUnusedImages())) {\n console.log('No images available to delete');\n return;\n }\n\n await playExpect(this.deleteAllSelectedButton).toBeEnabled();\n await this.deleteAllSelectedButton.click();\n await handleConfirmationDialog(this.page);\n });\n }\n\n async getCountOfImagesByStatus(status: string): Promise<number> {\n return test.step(`Get count from ${this.title} for images with status: ${status}`, async () => {\n const currentRows = await this.getAllTableRows();\n let count = 0;\n if (currentRows.length < 2) return 0;\n\n for (let rowNum = 1; rowNum < currentRows.length; rowNum++) {\n //skip header\n const statusCount = await currentRows[rowNum].getByRole('status').getByTitle(status, { exact: true }).count();\n if (statusCount > 0) ++count;\n }\n return count;\n });\n }\n\n async toggleImageManifest(manifestName: string): Promise<void> {\n const manifest = await this.getImageRowByName(manifestName);\n if (!manifest) {\n throw new Error(`Manifest with name \"${manifestName}\" not found`);\n }\n\n const extendManifestButton = manifest.getByRole('cell').nth(0).getByRole('button');\n await playExpect(extendManifestButton).toBeEnabled();\n await extendManifestButton.click();\n }\n\n async deleteImageManifest(manifestName: string): Promise<void> {\n const manifest = await this.getImageRowByName(manifestName);\n if (!manifest) {\n throw new Error(`Manifest with name \"${manifestName}\" not found`);\n }\n\n const deleteManifestButton = manifest.getByRole('button', { name: 'Delete Manifest' });\n await playExpect(deleteManifestButton).toBeEnabled();\n await deleteManifestButton.click();\n await handleConfirmationDialog(this.page);\n }\n\n async pushManifest(manifestName: string): Promise<void> {\n return test.step(`Push manifest: ${manifestName}`, async () => {\n const manifest = await this.getImageRowByName(manifestName);\n if (!manifest) {\n throw new Error(`Manifest with name \"${manifestName}\" not found`);\n }\n\n const kebabMenuButton = manifest.getByRole('button', { name: 'kebab menu', exact: true });\n await playExpect(kebabMenuButton).toBeVisible();\n await kebabMenuButton.click();\n\n // Push Manifest button has role='none', so we use getByTitle instead of getByRole\n const pushManifestButton = manifest.getByTitle('Push Manifest');\n await playExpect(pushManifestButton).toBeVisible();\n await pushManifestButton.click();\n\n await handleConfirmationDialog(this.page, 'Push manifest', true, 'Push manifest', '', 120_000, true);\n });\n }\n\n async getAllImageBadges(name: string): Promise<string[]> {\n return test.step(`Get all badges for image: ${name}`, async () => {\n const locators = await this.getAllBadgeLocators(name);\n return await Promise.all(locators.map(async locator => await locator.innerText()));\n });\n }\n\n async checkImageBadge(name: string, badge: string): Promise<boolean> {\n return test.step(`Check if badge: ${badge} exists for image: ${name}`, async () => {\n return (await this.getAllImageBadges(name)).includes(badge);\n });\n }\n\n async getAllBadgeLocators(name: string): Promise<Locator[]> {\n return test.step(`Get all badge locators for image: ${name}`, async () => {\n const imageRow = await this.getImageRowByName(name);\n if (imageRow === undefined) {\n throw Error(`Image: '${name}' does not exist`);\n }\n return imageRow.getByLabel('badge-').all();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { ArchitectureType } from '/@/model/core/platforms';\nimport { archType } from '/@/utility/platform';\n\nimport { BasePage } from './base-page';\nimport { ImagesPage } from './images-page';\n\nexport class BuildImagePage extends BasePage {\n readonly heading: Locator;\n readonly containerFilePathInput: Locator;\n readonly buildContextDirectoryInput: Locator;\n readonly imageNameInput: Locator;\n readonly buildButton: Locator;\n readonly doneButton: Locator;\n readonly cancelBuildButton: Locator;\n readonly containerFilePathButton: Locator;\n readonly platformRegion: Locator;\n readonly arm64Button: Locator;\n readonly amd64Button: Locator;\n readonly arm64checkbox: Locator;\n readonly amd64checkbox: Locator;\n readonly archMoreOptionsButton: Locator;\n readonly archLessOptionsButton: Locator;\n readonly terminalContent: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = page.getByRole('heading', {\n name: 'Build Image from Containerfile',\n });\n this.containerFilePathInput = page.getByPlaceholder('Containerfile to build');\n this.buildContextDirectoryInput = page.getByPlaceholder('Directory to build in');\n this.imageNameInput = page.getByPlaceholder('my-custom-image');\n this.buildButton = page.getByRole('button', { name: 'Build', exact: true });\n this.doneButton = page.getByRole('button', { name: 'Done' });\n this.cancelBuildButton = page.getByRole('button', { name: 'Cancel' });\n this.containerFilePathButton = page.getByRole('button', { name: 'Browse...' }).first();\n this.platformRegion = page.getByRole('region', {\n name: 'Build Platform Options',\n });\n this.arm64Button = this.platformRegion.getByLabel('linux/arm64');\n this.amd64Button = this.platformRegion.getByLabel('linux/amd64');\n this.arm64checkbox = this.platformRegion.getByLabel('ARM® aarch64 systems');\n this.amd64checkbox = this.platformRegion.getByLabel('Intel and AMD x86_64 systems');\n this.archMoreOptionsButton = this.platformRegion.getByRole('button', { name: 'Show more options' });\n this.archLessOptionsButton = this.platformRegion.getByRole('button', { name: 'Show less options' });\n this.terminalContent = page.locator('.xterm-rows');\n }\n\n async buildImage(\n imageName: string,\n containerFilePath: string,\n contextDirectory: string,\n archType: string[] = [ArchitectureType.Default],\n timeout = 120000,\n ): Promise<ImagesPage> {\n return test.step(`Building image ${imageName} from ${containerFilePath} in ${contextDirectory} with ${archType} architecture`, async () => {\n await this.fillBuildImageForm(imageName, containerFilePath, contextDirectory, archType);\n\n await playExpect(this.doneButton).toBeEnabled({ timeout: timeout });\n await this.validateBuildLogs();\n await this.doneButton.scrollIntoViewIfNeeded();\n await this.doneButton.click();\n console.log(`Image ${imageName} has been built successfully!`);\n\n return new ImagesPage(this.page);\n });\n }\n\n async cancelBuild(\n imageName: string,\n containerFilePath: string,\n contextDirectory: string,\n archType: string[] = [ArchitectureType.Default],\n cancelAfterTimeout = 200,\n ): Promise<void> {\n return test.step(`Starting and canceling build for image ${imageName}`, async () => {\n await this.fillBuildImageForm(imageName, containerFilePath, contextDirectory, archType);\n\n await playExpect(this.cancelBuildButton).toBeEnabled();\n await this.cancelBuildButton.scrollIntoViewIfNeeded();\n await this.page.waitForTimeout(cancelAfterTimeout);\n\n await playExpect(this.cancelBuildButton).toBeVisible();\n await this.cancelBuildButton.click();\n\n await playExpect(this.doneButton).toBeEnabled({ timeout: 30_000 });\n });\n }\n\n async uncheckedAllCheckboxes(): Promise<void> {\n return test.step('Uncheck all checkboxes', async () => {\n await this.showAllArchOptions();\n for (const button of await this.platformRegion.getByRole('button').all()) {\n const buttonText = (await button.textContent()) ?? '';\n if (buttonText.trim() === 'New platform' || buttonText.trim() === 'Less Options...') {\n continue;\n }\n const checkbox = button.getByRole('checkbox');\n try {\n await playExpect(checkbox).toBeVisible();\n await playExpect(checkbox).toBeChecked();\n await playExpect(button).toBeEnabled();\n await button.click();\n await playExpect(checkbox).not.toBeChecked();\n } catch {\n console.log(`Checkbox for button \"${buttonText.trim()}\" is already unchecked.`);\n }\n }\n });\n }\n\n private async checkArchCheckbox(archType: string): Promise<void> {\n return test.step(`Check ${archType} checkbox`, async () => {\n const archTypeButton = this.platformRegion.getByLabel('linux/' + archType);\n await playExpect(archTypeButton).toBeEnabled();\n await archTypeButton.click();\n const checkbox = archTypeButton.getByRole('checkbox');\n await playExpect(checkbox).toBeChecked();\n });\n }\n\n async uncheckDefaultCheckbox(): Promise<void> {\n return test.step('Uncheck default checkbox', async () => {\n if (archType === 'arm64') {\n await playExpect(this.arm64checkbox).toBeChecked();\n await this.arm64Button.click();\n await playExpect(this.arm64checkbox).not.toBeChecked();\n } else {\n await playExpect(this.amd64checkbox).toBeChecked();\n await this.amd64Button.click();\n await playExpect(this.amd64checkbox).not.toBeChecked();\n }\n });\n }\n\n private async showAllArchOptions(): Promise<void> {\n if ((await this.archMoreOptionsButton.count()) > 0) {\n await playExpect(this.archMoreOptionsButton).toBeEnabled();\n await this.archMoreOptionsButton.click();\n } else {\n await playExpect(this.archLessOptionsButton).toBeEnabled();\n }\n }\n\n async validateBuildLogs(): Promise<void> {\n const logs = this.page.locator('.xterm-rows');\n await playExpect(logs).toBeVisible();\n const logRows = await logs.locator('div:has(span)').all();\n\n await Promise.all(\n logRows.map(async logRow => {\n await playExpect.poll(async () => logRow.textContent()).not.toContain('Error');\n }),\n );\n }\n\n private async fillBuildImageForm(\n imageName: string,\n containerFilePath: string,\n contextDirectory: string,\n archType: string[] = [ArchitectureType.Default],\n ): Promise<void> {\n if (!containerFilePath) {\n throw Error('Path to containerfile is incorrect or not provided!');\n }\n\n await this.containerFilePathInput.fill(containerFilePath);\n\n if (contextDirectory) await this.buildContextDirectoryInput.fill(contextDirectory);\n if (imageName) {\n await this.imageNameInput.clear();\n await this.imageNameInput.pressSequentially(imageName, { delay: 50 });\n }\n\n if (!archType.includes(ArchitectureType.Default)) {\n await this.uncheckDefaultCheckbox();\n await this.showAllArchOptions();\n\n for (const architecture of archType) {\n await this.checkArchCheckbox(architecture);\n }\n }\n\n await playExpect(this.buildButton).toBeEnabled();\n await this.buildButton.scrollIntoViewIfNeeded();\n await this.buildButton.click();\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport type { PlayYamlOptions } from '/@/model/core/types';\nimport { PodmanKubePlayOptions } from '/@/model/core/types';\n\nimport { BasePage } from './base-page';\nimport { PodsPage } from './pods-page';\n\nexport class PodmanKubePlayPage extends BasePage {\n readonly heading: Locator;\n readonly yamlPathInput: Locator;\n readonly playButton: Locator;\n readonly doneButton: Locator;\n readonly selectYamlButton: Locator;\n readonly createYamlFromScratchButton: Locator;\n readonly customYamlEditor: Locator;\n readonly alertMessage: Locator;\n readonly buildCheckbox: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = page.getByRole('heading', {\n name: 'Create pods from a Kubernetes YAML file',\n });\n this.yamlPathInput = page.getByPlaceholder('Select a .yaml file to play');\n this.selectYamlButton = page.getByRole('button', {\n name: 'Podman Container Engine Runtime',\n });\n this.createYamlFromScratchButton = page.getByRole('button', { name: 'Create file from scratch' });\n this.customYamlEditor = page.locator('#custom-yaml-editor');\n this.playButton = page.getByRole('button', { name: 'Play' });\n this.doneButton = page.getByRole('button', { name: 'Done' });\n this.alertMessage = this.page.getByLabel('Error Message Content');\n this.buildCheckbox = page.getByRole('checkbox', { name: 'Enable build' }).locator('..');\n }\n\n private async enableBuildFlag(): Promise<void> {\n await playExpect(this.buildCheckbox).not.toBeChecked();\n await playExpect(this.buildCheckbox).toBeEnabled();\n await this.buildCheckbox.check();\n await playExpect(this.buildCheckbox).toBeChecked();\n }\n\n private async createFromScratch(jsonResourceDefinition: string): Promise<void> {\n await playExpect(this.createYamlFromScratchButton).toBeEnabled();\n await this.createYamlFromScratchButton.click();\n await playExpect(this.createYamlFromScratchButton).toHaveAttribute('aria-pressed', 'true');\n\n const codeSection = this.customYamlEditor.getByRole('code');\n await playExpect(codeSection).toBeVisible();\n await codeSection.click();\n\n await codeSection.pressSequentially(jsonResourceDefinition, { delay: 5 });\n await playExpect(codeSection).toContainText(jsonResourceDefinition);\n }\n\n private async selectYamlFile(pathToYaml: string): Promise<void> {\n if (!pathToYaml) {\n throw Error('Path to Yaml file is incorrect or not provided!');\n }\n await playExpect(this.selectYamlButton).toBeEnabled();\n await this.selectYamlButton.click();\n await playExpect(this.selectYamlButton).toHaveAttribute('aria-pressed', 'true');\n // TODO: evaluate() is required due to noninteractivity of fields currently, once https://github.com/containers/podman-desktop/issues/5479 is done they will no longer be needed\n await this.yamlPathInput.evaluate(node => node.removeAttribute('readonly'));\n await this.playButton.evaluate(node => node.removeAttribute('disabled'));\n await this.yamlPathInput.fill(pathToYaml);\n }\n\n async playYaml(options: PlayYamlOptions, buildImage = false, timeout = 120_000): Promise<PodsPage> {\n return test.step('Podman Kube Play', async () => {\n const podmanKubePlayOption = options.podmanKubePlayOption;\n switch (podmanKubePlayOption) {\n case PodmanKubePlayOptions.SelectYamlFile:\n await this.selectYamlFile(options.pathToYaml);\n break;\n case PodmanKubePlayOptions.CreateYamlFileFromScratch:\n await this.createFromScratch(options.jsonResourceDefinition);\n break;\n }\n\n if (buildImage) {\n await this.enableBuildFlag();\n }\n\n await this.playButton.click();\n await playExpect(this.doneButton.or(this.alertMessage).first()).toBeVisible({ timeout: timeout });\n\n if (await this.alertMessage.isVisible()) {\n const errorMessage = await this.alertMessage.textContent();\n throw Error(`Error while playing Kubernetes YAML: ${errorMessage}`);\n }\n\n await playExpect(this.doneButton).toBeEnabled();\n await this.doneButton.click();\n return new PodsPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { PodState } from '/@/model/core/states';\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { DetailsPage } from './details-page';\nimport { PodsPage } from './pods-page';\n\nexport class PodDetailsPage extends DetailsPage {\n readonly startButton: Locator;\n readonly stopButton: Locator;\n readonly restartButton: Locator;\n readonly deleteButton: Locator;\n readonly findInLogsInput: Locator;\n readonly searchResults: Locator;\n\n static readonly SUMMARY_TAB = 'Summary';\n static readonly LOGS_TAB = 'Logs';\n static readonly INSPECT_TAB = 'Inspect';\n static readonly KUBE_TAB = 'Kube';\n\n constructor(page: Page, name: string) {\n super(page, name);\n this.startButton = this.controlActions.getByRole('button').and(this.page.getByLabel('Start Pod', { exact: true }));\n this.stopButton = this.controlActions.getByRole('button').and(this.page.getByLabel('Stop Pod', { exact: true }));\n this.restartButton = this.controlActions\n .getByRole('button')\n .and(this.page.getByLabel('Restart Pod', { exact: true }));\n this.deleteButton = this.controlActions\n .getByRole('button')\n .and(this.page.getByLabel('Delete Pod', { exact: true }));\n this.findInLogsInput = this.tabContent.getByLabel('Find');\n this.searchResults = this.tabContent.locator('div.xterm-selection > div');\n }\n\n async getState(): Promise<string> {\n return test.step('Get Pod State', async () => {\n const currentState = await this.header.getByRole('status').getAttribute('title');\n for (const state of Object.values(PodState)) {\n if (currentState === state) return state;\n }\n\n return PodState.Unknown;\n });\n }\n\n async startPod(): Promise<void> {\n return test.step('Start Pod', async () => {\n await playExpect(this.startButton).toBeEnabled({ timeout: 10_000 });\n await this.startButton.click();\n });\n }\n\n async stopPod(): Promise<void> {\n return test.step('Stop Pod', async () => {\n await playExpect(this.stopButton).toBeEnabled({ timeout: 10_000 });\n await this.stopButton.click();\n });\n }\n\n async restartPod(): Promise<void> {\n return test.step('Restart Pod', async () => {\n await playExpect(this.restartButton).toBeEnabled({ timeout: 20_000 });\n await this.restartButton.click();\n });\n }\n\n async deletePod(): Promise<PodsPage> {\n return test.step('Delete Pod', async () => {\n await playExpect(this.deleteButton).toBeEnabled({ timeout: 10_000 });\n await this.deleteButton.click();\n await handleConfirmationDialog(this.page);\n return new PodsPage(this.page);\n });\n }\n\n async findInLogs(text: string): Promise<void> {\n return test.step('Find text in logs', async () => {\n await this.activateTab(PodDetailsPage.LOGS_TAB);\n await playExpect(this.findInLogsInput).toBeVisible();\n await this.findInLogsInput.clear();\n await playExpect(this.findInLogsInput).toHaveValue('');\n\n await this.findInLogsInput.fill(text);\n await playExpect(this.findInLogsInput).toHaveValue(text);\n });\n }\n\n async getCountOfSearchResults(): Promise<number> {\n return test.step('Get count of search results', async () => {\n await this.activateTab(PodDetailsPage.LOGS_TAB);\n await playExpect(this.findInLogsInput).toBeVisible();\n\n return await this.searchResults.count();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { MainPage } from './main-page';\nimport { PodmanKubePlayPage } from './podman-kube-play-page';\nimport { PodDetailsPage } from './pods-details-page';\n\nexport class PodsPage extends MainPage {\n readonly podmanKubePlayButton: Locator;\n readonly prunePodsButton: Locator;\n readonly pruneConfirmationButton: Locator;\n\n constructor(page: Page) {\n super(page, 'pods');\n this.podmanKubePlayButton = this.page.getByRole('button', {\n name: 'Podman Kube Play',\n });\n this.prunePodsButton = this.page.getByRole('button', { name: 'Prune' });\n this.pruneConfirmationButton = this.page.getByRole('button', {\n name: 'Yes',\n });\n }\n\n async openPodDetails(name: string): Promise<PodDetailsPage> {\n return test.step(`Open Pod: ${name} details`, async () => {\n const podRow = await this.getPodRowByName(name);\n if (podRow === undefined) {\n throw Error(`Pod: ${name} does not exist`);\n }\n const openPodDetailsButton = podRow.getByRole('button').getByText(name, { exact: true });\n await playExpect(openPodDetailsButton).toBeEnabled();\n await openPodDetailsButton.click();\n return new PodDetailsPage(this.page, name);\n });\n }\n\n async getPodRowByName(name: string): Promise<Locator | undefined> {\n return this.getRowByName(name);\n }\n\n async podExists(name: string): Promise<boolean> {\n return (await this.getPodRowByName(name)) !== undefined;\n }\n\n async openPodmanKubePlay(): Promise<PodmanKubePlayPage> {\n return test.step('Open Podman Kube Play', async () => {\n await playExpect(this.podmanKubePlayButton).toBeEnabled();\n await this.podmanKubePlayButton.click();\n return new PodmanKubePlayPage(this.page);\n });\n }\n\n async prunePods(): Promise<PodsPage> {\n return test.step('Prune Pods', async () => {\n await this.prunePodsButton.click();\n await handleConfirmationDialog(this.page, 'Prune');\n return this;\n });\n }\n\n async selectPod(names: string[]): Promise<void> {\n return test.step(`Select Pod: ${names}`, async () => {\n for (const containerName of names) {\n const row = await this.getPodRowByName(containerName);\n if (row === undefined) {\n throw Error('Pod cannot be selected');\n }\n await row.getByRole('cell').nth(1).click();\n }\n });\n }\n\n async getPodActionsMenu(name: string): Promise<Locator> {\n const row = await this.getPodRowByName(name);\n if (row === undefined) {\n throw Error('Cannot select actions menu, pod does not exist');\n }\n return row.getByRole('button', { name: 'kebab menu', exact: true });\n }\n\n public async deployedPodExists(podName: string, environment = 'Podman'): Promise<boolean> {\n return test.step(`Check if deployed pod exists: ${podName}`, async () => {\n const deployedContainerRow = await this.getPodRowByName(podName);\n if (deployedContainerRow) {\n const env = await deployedContainerRow.getByRole('cell').nth(4).textContent();\n return env?.trim() === environment;\n }\n return false;\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { type Locator, type Page, test } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { PodsPage } from './pods-page';\n\nexport class CreatePodsPage extends BasePage {\n readonly heading: Locator;\n readonly closeLink: Locator;\n readonly podNameBox: Locator;\n readonly closeButton: Locator;\n readonly createPodButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = this.page.getByRole('heading', {\n name: 'Copy containers to a pod',\n });\n this.closeLink = this.page.getByRole('link', { name: 'Close' });\n this.podNameBox = this.page.getByRole('textbox', { name: 'Pod name' });\n this.closeButton = this.page.getByRole('button', { name: 'Close' });\n this.createPodButton = this.page.getByRole('button', {\n name: 'Create Pod',\n });\n }\n\n async createPod(podName: string): Promise<PodsPage> {\n return test.step(`Create pod ${podName}`, async () => {\n await this.podNameBox.fill(podName);\n await this.createPodButton.click();\n return new PodsPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { ContainersPage } from './containers-page';\nimport { RunImagePage } from './run-image-page';\n\nexport class SelectImagePage extends BasePage {\n readonly heading: Locator;\n readonly imageNameInput: Locator;\n readonly cancelButton: Locator;\n readonly runImageButton: Locator;\n readonly pullImageAndRunButton: Locator;\n readonly manageRegistriesButton: Locator;\n readonly errorMessage: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = page.getByRole('heading', {\n name: 'Select an image',\n exact: true,\n });\n this.imageNameInput = page.getByPlaceholder('Select or enter an image to run');\n this.cancelButton = page.getByRole('button', { name: 'Cancel' });\n this.runImageButton = page.getByRole('button', { name: 'Run Image' });\n this.pullImageAndRunButton = page.getByRole('button', { name: 'Pull Image and Run' });\n this.manageRegistriesButton = page.getByRole('button', { name: 'Manage registries' });\n this.errorMessage = page.getByRole('alert', { name: 'Error Message Content' });\n }\n\n async selectImage(imageName: string): Promise<SelectImagePage> {\n return test.step(`Select image: ${imageName}`, async () => {\n await playExpect(this.imageNameInput).toBeVisible();\n await this.imageNameInput.fill(imageName);\n await playExpect(this.imageNameInput).toHaveValue(imageName);\n return this;\n });\n }\n\n async cancel(): Promise<ContainersPage> {\n return test.step('Cancel and return to Containers page', async () => {\n await playExpect(this.cancelButton).toBeEnabled();\n await this.cancelButton.click();\n return new ContainersPage(this.page);\n });\n }\n\n async runImage(imageName: string): Promise<RunImagePage> {\n return test.step('Run image', async () => {\n await this.selectImage(imageName);\n // The UI conditionally shows either \"Pull Image and Run\" or \"Run Image\" button\n // depending on whether the image exists locally\n const actionButton = this.pullImageAndRunButton.or(this.runImageButton);\n await playExpect(actionButton).toBeEnabled({ timeout: 10_000 });\n await actionButton.click();\n return new RunImagePage(this.page, imageName);\n });\n }\n\n async openManageRegistries(): Promise<void> {\n return test.step('Open Manage registries', async () => {\n await playExpect(this.manageRegistriesButton).toBeEnabled();\n await this.manageRegistriesButton.click();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { ContainerState } from '/@/model/core/states';\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { BuildImagePage } from './build-image-page';\nimport { ContainerDetailsPage } from './container-details-page';\nimport { CreatePodsPage } from './create-pod-page';\nimport { MainPage } from './main-page';\nimport { SelectImagePage } from './select-image-page';\n\nexport class ContainersPage extends MainPage {\n readonly pruneContainersButton: Locator;\n readonly createContainerButton: Locator;\n readonly pruneConfirmationButton: Locator;\n readonly runAllContainersButton: Locator;\n readonly createDialog: Locator;\n readonly createDialogCloseButton: Locator;\n readonly createDialogContainerOrDockerfileButton: Locator;\n readonly createDialogExistingImageButton: Locator;\n\n constructor(page: Page) {\n super(page, 'containers');\n this.pruneContainersButton = this.additionalActions.getByRole('button', {\n name: 'Prune',\n });\n this.createContainerButton = this.additionalActions.getByRole('button', {\n name: 'Create',\n });\n this.pruneConfirmationButton = this.page.getByRole('button', {\n name: 'Yes',\n });\n this.runAllContainersButton = this.page.getByLabel('Run selected containers and pods');\n this.createDialog = this.page.getByRole('dialog', {\n name: 'Create a new container',\n exact: true,\n });\n this.createDialogCloseButton = this.createDialog.getByLabel('Close');\n this.createDialogContainerOrDockerfileButton = this.createDialog.getByRole('button', {\n name: 'Containerfile or Dockerfile',\n });\n this.createDialogExistingImageButton = this.createDialog.getByRole('button', {\n name: 'Existing image',\n });\n }\n\n async openContainersDetails(name: string): Promise<ContainerDetailsPage> {\n return test.step(`Open Container: ${name} details`, async () => {\n const containerRow = await this.getContainerRowByName(name);\n if (containerRow === undefined) {\n throw Error(`Container: '${name}' does not exist`);\n }\n const containerRowName = containerRow.getByRole('cell').nth(3);\n await containerRowName.click();\n return new ContainerDetailsPage(this.page, name);\n });\n }\n\n async startContainer(containerName: string): Promise<ContainersPage> {\n return test.step(`Start Container: ${containerName}`, async () => {\n const containerRow = await this.getContainerRowByName(containerName);\n if (containerRow === undefined) {\n throw Error(`Container: '${containerName}' does not exist`);\n }\n const containerRowStartButton = containerRow.getByRole('button', {\n name: 'Start Container',\n });\n await playExpect(containerRowStartButton).toBeVisible();\n await containerRowStartButton.click();\n return this;\n });\n }\n\n async stopContainer(containerName: string): Promise<ContainersPage> {\n return test.step(`Stop Container: ${containerName}`, async () => {\n const containerRow = await this.getContainerRowByName(containerName);\n if (containerRow === undefined) {\n throw Error(`Container: '${containerName}' does not exist`);\n }\n const containerRowStopButton = containerRow.getByRole('button', {\n name: 'Stop Container',\n });\n await playExpect(containerRowStopButton).toBeVisible();\n await containerRowStopButton.click();\n return this;\n });\n }\n\n async deleteContainer(containerName: string): Promise<ContainersPage> {\n return test.step(`Delete Container: ${containerName}`, async () => {\n const containerRow = await this.getContainerRowByName(containerName);\n if (containerRow === undefined) {\n throw Error(`Container: '${containerName}' does not exist`);\n }\n const containerRowDeleteButton = containerRow.getByRole('button', {\n name: 'Delete Container',\n });\n await playExpect(containerRowDeleteButton).toBeVisible();\n await playExpect(containerRowDeleteButton).toBeEnabled();\n await containerRowDeleteButton.click();\n await handleConfirmationDialog(this.page);\n return new ContainersPage(this.page);\n });\n }\n\n async stopContainerFromDetails(container: string): Promise<ContainerDetailsPage> {\n return test.step(`Stop Container ${container} from details page`, async () => {\n const containerDetailsPage = await this.openContainersDetails(container);\n await playExpect(containerDetailsPage.heading).toBeVisible();\n await playExpect(containerDetailsPage.heading).toContainText(container);\n playExpect(await containerDetailsPage.getState()).toContain(ContainerState.Running);\n await containerDetailsPage.stopContainer();\n return containerDetailsPage;\n });\n }\n\n async getContainerRowByName(name: string): Promise<Locator | undefined> {\n return this.getRowByName(name);\n }\n\n async containerExists(name: string): Promise<boolean> {\n return (await this.getContainerRowByName(name)) !== undefined;\n }\n\n async openCreatePodPage(names: string[]): Promise<CreatePodsPage> {\n return test.step(`Open Create Pod page for containers: ${names}`, async () => {\n for (const containerName of names) {\n const row = await this.getContainerRowByName(containerName);\n if (row === undefined) {\n throw Error('Container cannot be podified');\n }\n await row.getByRole('cell').nth(1).click();\n }\n await this.page.getByRole('button', { name: 'Create Pod' }).click();\n return new CreatePodsPage(this.page);\n });\n }\n\n async pruneContainers(): Promise<ContainersPage> {\n return test.step('Prune Containers', async () => {\n await this.pruneContainersButton.click();\n await handleConfirmationDialog(this.page, 'Prune');\n return this;\n });\n }\n\n async getContainerImage(name: string): Promise<string> {\n const container = await this.getContainerRowByName(name);\n const image = await container?.getByRole('cell').nth(5).textContent();\n if (image) {\n return image;\n }\n return '';\n }\n\n async startAllContainers(): Promise<ContainersPage> {\n return test.step('Start all containers', async () => {\n await this.checkAllRows();\n await this.runAllContainersButton.click();\n return this;\n });\n }\n\n async openCreateDialog(): Promise<ContainersPage> {\n return test.step('Open Create dialog', async () => {\n await playExpect(this.createContainerButton).toBeEnabled();\n await this.createContainerButton.click();\n await playExpect(this.createDialog).toBeVisible();\n return this;\n });\n }\n\n async closeCreateDialog(): Promise<ContainersPage> {\n return test.step('Close Create dialog', async () => {\n await playExpect(this.createDialogCloseButton).toBeVisible();\n await this.createDialogCloseButton.click();\n await playExpect(this.createDialog).not.toBeVisible();\n return this;\n });\n }\n\n async openBuildImageFromDialog(): Promise<BuildImagePage> {\n return test.step('Open Build Image page from Create dialog', async () => {\n await this.openCreateDialog();\n await playExpect(this.createDialogContainerOrDockerfileButton).toBeEnabled({ timeout: 10_000 });\n await this.createDialogContainerOrDockerfileButton.click();\n await playExpect(this.createDialog).not.toBeVisible({ timeout: 10_000 });\n return new BuildImagePage(this.page);\n });\n }\n\n async openSelectImageFromDialog(): Promise<SelectImagePage> {\n return test.step('Open Select Image page from Create dialog', async () => {\n await this.openCreateDialog();\n await playExpect(this.createDialogExistingImageButton).toBeEnabled({ timeout: 10_000 });\n await this.createDialogExistingImageButton.click();\n await playExpect(this.createDialog).not.toBeVisible({ timeout: 10_000 });\n return new SelectImagePage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport class DashboardPage extends BasePage {\n readonly mainPage: Locator;\n readonly header: Locator;\n readonly content: Locator;\n readonly heading: Locator;\n readonly notificationsBox: Locator;\n readonly featuredExtensions: Locator;\n // dev sandbox\n readonly devSandboxProvider: Locator;\n readonly devSandboxBox: Locator;\n readonly devSandboxStatusLabel: Locator;\n // openshift local\n readonly openshiftLocalProvider: Locator;\n readonly openshiftLocalBox: Locator;\n readonly openshiftLocalStatusLabel: Locator;\n readonly transitioningState: Locator;\n\n // podman/machine\n readonly podmanProvider: Locator;\n readonly podmanStatusLabel: Locator;\n readonly podmanInitilizeAndStartButton: Locator;\n\n // contants\n readonly ACTUAL_STATE = 'Actual State';\n readonly CONNECTION_STATUS_LABEL = 'Connection Status Label';\n\n constructor(page: Page) {\n super(page);\n this.mainPage = page.getByRole('region', { name: 'Dashboard' });\n this.header = this.mainPage.getByRole('region', { name: 'header' });\n this.content = this.mainPage.getByRole('region', { name: 'content' });\n this.heading = page.getByRole('heading', { name: 'Dashboard' });\n\n this.notificationsBox = this.content.getByRole('region', { name: 'Notifications Box' });\n this.featuredExtensions = page.getByRole('region', { name: 'FeaturedExtensions' });\n\n // Dev Sandbox locators\n this.devSandboxProvider = page.getByRole('region', { name: 'Developer Sandbox Provider' });\n this.devSandboxBox = this.featuredExtensions.getByLabel('Developer Sandbox');\n this.devSandboxStatusLabel = this.devSandboxProvider.getByLabel(this.CONNECTION_STATUS_LABEL);\n\n // OpenShift Local locators\n this.openshiftLocalProvider = page.getByRole('region', { name: 'OpenShift Local Provider' });\n this.openshiftLocalBox = this.featuredExtensions.getByLabel('OpenShift Local');\n this.openshiftLocalStatusLabel = this.openshiftLocalProvider.getByLabel(this.CONNECTION_STATUS_LABEL);\n\n // Podman/Machine Provider locators\n this.podmanProvider = page.getByRole('region', { name: 'Podman Provider' });\n this.podmanInitilizeAndStartButton = this.podmanProvider.getByRole('button', { name: 'Initialize and start ' });\n this.transitioningState = this.podmanProvider.getByLabel('Transitioning State');\n this.podmanStatusLabel = this.podmanProvider.getByLabel(this.CONNECTION_STATUS_LABEL);\n }\n\n public getPodmanStatusLocator(): Locator {\n return this.content.getByRole('region', { name: 'Podman Provider' });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { ExtensionsPage } from './extensions-page';\n\nexport class ExtensionDetailsPage extends BasePage {\n readonly header: Locator;\n readonly tabs: Locator;\n readonly tabContent: Locator;\n readonly enableButton: Locator;\n readonly disableButton: Locator;\n readonly removeExtensionButton: Locator;\n readonly status: Locator;\n readonly heading: Locator;\n readonly errorStackTrace: Locator;\n\n constructor(\n page: Page,\n public readonly extensionName: string,\n ) {\n super(page);\n this.header = page.getByRole('region', { name: 'Header' });\n this.tabs = page.getByRole('region', { name: 'Tabs' });\n this.tabContent = page.getByRole('region', { name: 'Tab Content' });\n this.heading = this.header.getByRole('heading', { name: extensionName });\n this.enableButton = this.header.getByRole('button', { name: 'Start' });\n this.disableButton = this.header.getByRole('button', { name: 'Stop' });\n this.removeExtensionButton = this.header.getByRole('button', {\n name: 'Delete',\n });\n this.status = this.header.getByLabel('Extension Status Label');\n this.errorStackTrace = this.tabContent.getByRole('group', {\n name: 'Stack Trace',\n exact: true,\n });\n }\n\n async disableExtension(): Promise<this> {\n return test.step(`Disable extension: ${this.extensionName}`, async () => {\n if ((await this.status.innerText()) === 'DISABLED') return this;\n\n await this.disableButton.click();\n await playExpect(this.status).toHaveText('DISABLED', { timeout: 30000 });\n return this;\n });\n }\n\n async enableExtension(): Promise<this> {\n return test.step(`Enable extension: ${this.extensionName}`, async () => {\n if ((await this.status.innerText()) === 'ACTIVE') return this;\n\n await this.enableButton.click();\n await playExpect(this.status).toHaveText('ACTIVE', { timeout: 30000 });\n return this;\n });\n }\n\n async removeExtension(disableBeforeRemove = true): Promise<ExtensionsPage> {\n return test.step(`Remove extension: ${this.extensionName}`, async () => {\n if (disableBeforeRemove) {\n await this.disableExtension();\n }\n\n await playExpect(this.removeExtensionButton).toBeVisible();\n await this.removeExtensionButton.click();\n await playExpect(this.removeExtensionButton).not.toBeVisible({ timeout: 30_000 });\n return new ExtensionsPage(this.page);\n });\n }\n\n async activateTab(tabName: string): Promise<this> {\n return test.step(`Activate tab: ${tabName}`, async () => {\n const tabItem = this.tabs.getByRole('button', {\n name: tabName,\n exact: true,\n });\n await playExpect(tabItem).toBeVisible();\n await tabItem.click();\n return this;\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { ExtensionDetailsPage } from './extension-details-page';\nimport { ExtensionsPage } from './extensions-page';\n\nexport class ExtensionCardPage extends BasePage {\n readonly parent: Locator;\n readonly card: Locator;\n readonly leftActions: Locator;\n readonly rightActions: Locator;\n readonly detailsLink: Locator;\n readonly extensionName: string;\n readonly extensionLabel: string;\n readonly extensionActions: Locator;\n readonly onboardingButton: Locator;\n readonly editButton: Locator;\n readonly status: Locator;\n readonly enableButton: Locator;\n readonly disableButton: Locator;\n readonly removeButton: Locator;\n\n constructor(page: Page, extensionName: string, extensionLabel: string) {\n super(page);\n this.parent = this.page.getByRole('region', { name: 'content' });\n this.extensionName = extensionName;\n this.extensionLabel = extensionLabel;\n this.card = this.parent.getByRole('region', {\n name: this.extensionLabel,\n exact: true,\n });\n this.leftActions = this.card.getByRole('region', { name: 'left actions' });\n this.rightActions = this.card.getByRole('region', {\n name: 'right actions',\n });\n this.detailsLink = this.rightActions.getByRole('button', {\n name: `${this.extensionName} extension details`,\n exact: true,\n });\n this.extensionActions = this.leftActions.getByRole('group', {\n name: 'Extension Actions',\n });\n this.onboardingButton = this.leftActions.getByRole('button', {\n name: 'Onboarding bootc',\n });\n this.editButton = this.leftActions.getByRole('button', {\n name: `Edit properties of ${extensionName} extension`,\n });\n this.status = this.leftActions.getByLabel('Extension Status Label');\n this.enableButton = this.extensionActions.getByRole('button', {\n name: 'Start',\n });\n this.disableButton = this.extensionActions.getByRole('button', {\n name: 'Stop',\n });\n this.removeButton = this.extensionActions.getByRole('button', {\n name: 'Delete',\n });\n }\n\n public async openExtensionDetails(heading: string): Promise<ExtensionDetailsPage> {\n await playExpect(this.card).toBeVisible();\n await this.card.scrollIntoViewIfNeeded();\n await playExpect(this.detailsLink).toBeVisible();\n await this.detailsLink.click();\n return new ExtensionDetailsPage(this.page, heading);\n }\n\n async disableExtension(): Promise<this> {\n return test.step(`Disable extension: ${this.extensionName}`, async () => {\n if ((await this.status.innerText()) === 'DISABLED') return this;\n\n await this.disableButton.click();\n await playExpect(this.status).toHaveText('DISABLED');\n return this;\n });\n }\n\n async enableExtension(): Promise<this> {\n return test.step(`Enable extension: ${this.extensionName}`, async () => {\n if ((await this.status.innerText()) === 'ACTIVE') return this;\n\n await this.enableButton.click();\n await playExpect(this.status).toHaveText('ACTIVE');\n return this;\n });\n }\n\n async removeExtension(): Promise<ExtensionsPage> {\n return test.step(`Remove extension: ${this.extensionName}`, async () => {\n await this.disableExtension();\n await this.removeButton.click();\n return new ExtensionsPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { ExtensionCardPage } from './extension-card-page';\nimport type { ExtensionDetailsPage } from './extension-details-page';\n\nexport class ExtensionsPage {\n readonly page: Page;\n readonly heading: Locator;\n readonly header: Locator;\n readonly content: Locator;\n readonly additionalActions: Locator;\n readonly installedTab: Locator;\n readonly catalogTab: Locator;\n readonly installExtensionFromOCIImageButton: Locator;\n\n constructor(page: Page) {\n this.page = page;\n this.header = page.getByRole('region', { name: 'header' });\n this.content = page.getByRole('region', { name: 'content' });\n this.heading = this.header.getByRole('heading', { name: 'extensions' });\n this.additionalActions = this.header.getByRole('group', {\n name: 'additionalActions',\n });\n this.installedTab = this.page.getByRole('button', { name: 'Installed' });\n this.catalogTab = this.page.getByRole('button', { name: 'Catalog', exact: true });\n this.installExtensionFromOCIImageButton = this.additionalActions.getByLabel('Install custom');\n }\n\n public async installExtensionFromOCIImage(extension: string, timeout = 100_000): Promise<ExtensionsPage> {\n return test.step(`Install extension from OCI image: ${extension}`, async () => {\n // open button to install extension from OCI image\n await playExpect(this.installExtensionFromOCIImageButton).toBeEnabled();\n await this.installExtensionFromOCIImageButton.click();\n\n const dialog = this.page.getByRole('dialog', {\n name: 'Install Custom Extension',\n exact: true,\n });\n await playExpect(dialog).toBeVisible();\n const imageInput = dialog.getByRole('textbox', {\n name: 'Image name to install custom extension',\n });\n // check visibility of the input\n await playExpect(imageInput).toBeVisible();\n\n await imageInput.fill(extension);\n\n const installButton = dialog.getByRole('button', {\n name: 'Install',\n exact: true,\n });\n await playExpect(installButton).toBeEnabled();\n\n await installButton.click();\n\n const doneButton = dialog.getByRole('button', {\n name: 'Done',\n exact: true,\n });\n await playExpect(doneButton).toBeEnabled({ timeout: timeout });\n await doneButton.click();\n\n return this;\n });\n }\n\n public async openInstalledTab(): Promise<void> {\n await playExpect(this.installedTab).toBeVisible({ timeout: 10_000 });\n await this.installedTab.click({ force: true });\n }\n\n public async openCatalogTab(): Promise<void> {\n await this.catalogTab.click();\n }\n\n public async openExtensionDetails(name: string, label: string, heading: string): Promise<ExtensionDetailsPage> {\n const extensionCard = await this.getInstalledExtension(name, label);\n return await extensionCard.openExtensionDetails(heading);\n }\n\n public async getInstalledExtension(name: string, label: string): Promise<ExtensionCardPage> {\n await this.openInstalledTab();\n const extensionCard = new ExtensionCardPage(this.page, name, label);\n await playExpect(extensionCard.card).toBeVisible();\n return extensionCard;\n }\n\n public async extensionIsInstalled(label: string): Promise<boolean> {\n await this.openInstalledTab();\n const extension = this.content.getByRole('region', { name: label, exact: true });\n return (await extension.count()) > 0;\n }\n\n public async getInstalledExtensionVersion(name: string, label: string): Promise<string | undefined> {\n const extensionCard = await this.getInstalledExtension(name, label);\n const version = extensionCard.rightActions.getByLabel('Version');\n if ((await version.count()) === 0) {\n return undefined;\n }\n\n try {\n return await version.innerText();\n } catch (error) {\n console.log(`Could not get ${label} extension version:`, error);\n return undefined;\n }\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { KubernetesResources } from '/@/model/core/types';\n\nimport { MainPage } from './main-page';\n\nexport class KubernetesDashboardPage extends MainPage {\n readonly namespaceLocator: Locator;\n readonly namespaceDropdownButton: Locator;\n readonly currentNamespace: Locator;\n\n readonly nodesMetricsButton: Locator;\n readonly podsMetricsButton: Locator;\n readonly deploymentsMetricsButton: Locator;\n readonly servicesMetricsButton: Locator;\n readonly ingressesMetricsButton: Locator;\n readonly pvcsMetricsButton: Locator;\n readonly configMapsMetricsButton: Locator;\n readonly jobsMetricsButton: Locator;\n readonly cronJobsMetricsButton: Locator;\n\n constructor(page: Page) {\n super(page, 'Dashboard');\n this.namespaceLocator = this.page.getByLabel('Kubernetes Namespace', { exact: true });\n this.namespaceDropdownButton = this.namespaceLocator.getByRole('button', { name: 'Namespace' });\n this.currentNamespace = this.namespaceLocator.getByLabel('hidden input', { exact: true });\n\n this.nodesMetricsButton = this.metricsLocatorByName(KubernetesResources.Nodes);\n this.podsMetricsButton = this.metricsLocatorByName(KubernetesResources.Pods);\n this.deploymentsMetricsButton = this.metricsLocatorByName(KubernetesResources.Deployments);\n this.servicesMetricsButton = this.metricsLocatorByName(KubernetesResources.Services);\n this.ingressesMetricsButton = this.metricsLocatorByName(KubernetesResources.IngeressesRoutes);\n this.pvcsMetricsButton = this.metricsLocatorByName(KubernetesResources.PVCs);\n this.configMapsMetricsButton = this.metricsLocatorByName(KubernetesResources.ConfigMapsSecrets);\n this.jobsMetricsButton = this.metricsLocatorByName(KubernetesResources.Jobs);\n this.cronJobsMetricsButton = this.metricsLocatorByName(KubernetesResources.Cronjobs);\n }\n\n async changeNamespace(name: string): Promise<void> {\n await playExpect(this.currentNamespace).not.toHaveValue(name, { timeout: 10_000 });\n await this.selectNamespaceByName(name);\n await playExpect(this.currentNamespace).toHaveValue(name, { timeout: 10_000 });\n }\n\n async selectNamespaceByName(name: string): Promise<void> {\n await playExpect(this.namespaceDropdownButton).toBeVisible();\n await this.namespaceDropdownButton.click();\n\n const namespaceLocator = this.namespaceLocatorByName(name);\n await playExpect(namespaceLocator).toBeVisible({ timeout: 10_000 });\n await namespaceLocator.click();\n }\n\n async getCurrentTotalCountForResource(name: KubernetesResources): Promise<number> {\n return this.getCountByType(name);\n }\n\n async getCurrentActiveCountForResource(name: KubernetesResources): Promise<number> {\n return this.getCountByType(name, 'active');\n }\n\n private namespaceLocatorByName(name: string): Locator {\n return this.namespaceLocator.getByRole('button', { name, exact: true });\n }\n\n private metricsLocatorByName(name: KubernetesResources): Locator {\n return this.page.getByRole('button').filter({ hasText: name });\n }\n\n private async getCountByType(name: KubernetesResources, type = ''): Promise<number> {\n const currentResource = this.metricsLocatorByName(name);\n const label = type ? `${name} ${type} count` : `${name} count`;\n const countLocator = currentResource.getByLabel(label, { exact: true });\n\n if ((await countLocator.count()) === 0) {\n throw new Error(`No ${label} locator found for resource: ${name}`);\n }\n\n const countText = await countLocator.textContent();\n return countText ? Number.parseInt(countText, 10) : 0;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport { KubernetesResourceState } from '/@/model/core/states';\nimport { handleConfirmationDialog } from '/@/utility/operations';\nimport { isMac } from '/@/utility/platform';\n\nimport { DetailsPage } from './details-page';\n\nexport class KubernetesResourceDetailsPage extends DetailsPage {\n readonly applyChangesButton: Locator;\n readonly revertChagesButton: Locator;\n readonly deleteButton: Locator;\n readonly editorWidget: Locator;\n readonly toggleButton: Locator;\n readonly findTextArea: Locator;\n readonly replaceTextArea: Locator;\n readonly replaceButton: Locator;\n\n static readonly SUMMARY_TAB = 'Summary';\n static readonly INSPECT_TAB = 'Inspect';\n static readonly KUBE_TAB = 'Kube';\n\n constructor(page: Page, title: string) {\n super(page, title);\n this.applyChangesButton = this.tabContent.getByRole('button', { name: 'Apply changes to cluster' });\n this.revertChagesButton = this.tabContent.getByRole('button', { name: 'Revert Changes' });\n this.deleteButton = this.controlActions.getByRole('button', { name: 'Delete', exact: false });\n this.editorWidget = this.page.getByRole('dialog', { name: 'Find / Replace' });\n this.toggleButton = this.editorWidget.getByRole('button', { name: 'Toggle Replace' });\n this.findTextArea = this.editorWidget.getByPlaceholder('Find');\n this.replaceTextArea = this.editorWidget.getByPlaceholder('Replace');\n this.replaceButton = this.editorWidget.getByRole('button', { name: 'Replace All' });\n }\n\n async getState(): Promise<string> {\n return test.step('Get resource state', async () => {\n const currentState = await this.header.getByRole('status').getAttribute('title');\n return currentState ?? KubernetesResourceState.Unknown;\n });\n }\n\n public async editKubernetsYamlFile(textToBeChanged: string, newText: string): Promise<void> {\n return test.step('Edit Kubernetes YAML file', async () => {\n await this.activateTab(KubernetesResourceDetailsPage.KUBE_TAB);\n const presentation = this.tabContent.getByRole('presentation');\n await playExpect(presentation).toBeVisible();\n await presentation.click();\n if (isMac) {\n await this.page.keyboard.press('Meta+F');\n } else {\n await this.page.keyboard.press('Control+F');\n }\n await playExpect(this.editorWidget).toBeVisible();\n await playExpect(this.findTextArea).toBeVisible();\n await this.findTextArea.fill(textToBeChanged);\n await playExpect(this.toggleButton).toBeVisible();\n await this.toggleButton.click();\n await playExpect(this.replaceTextArea).toBeVisible();\n await this.replaceTextArea.fill(newText);\n await playExpect(this.replaceButton).toBeVisible();\n await this.replaceButton.click();\n await playExpect(this.revertChagesButton).toBeEnabled();\n await playExpect(this.applyChangesButton).toBeEnabled();\n await this.applyChangesButton.click();\n await handleConfirmationDialog(this.page, 'Kubernetes', true, 'OK');\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport { KubernetesResourceAttributes, KubernetesResources } from '/@/model/core/types';\n\nimport { KubernetesResourceDetailsPage } from './kubernetes-resource-details-page';\nimport { MainPage } from './main-page';\n\nexport class KubernetesResourcePage extends MainPage {\n readonly applyYamlButton: Locator;\n\n constructor(page: Page, name: string) {\n super(page, name);\n this.applyYamlButton = this.additionalActions.getByRole('button', {\n name: 'Apply YAML',\n });\n }\n\n async fetchKubernetesResource(resourceName: string, timeout = 15_000): Promise<Locator> {\n try {\n await playExpect.poll(async () => this.getRowByName(resourceName, false), { timeout: timeout }).toBeTruthy();\n } catch {\n throw Error(`Resource: ${resourceName} does not exist`);\n }\n\n return (await this.getRowByName(resourceName, false)) as Locator;\n }\n\n async geAttributeByRow(row: Locator, attributeName: string, resourceType: KubernetesResources): Promise<Locator> {\n const attributes = KubernetesResourceAttributes[resourceType];\n const attrIndex = attributes.indexOf(attributeName) + 1;\n return row.getByRole('cell').nth(attrIndex);\n }\n\n async openResourceDetails(\n resourceName: string,\n resourceType: KubernetesResources,\n timeout?: number,\n ): Promise<KubernetesResourceDetailsPage> {\n return test.step(`Open ${resourceType}: ${resourceName} details`, async () => {\n const resourceRow = await this.fetchKubernetesResource(resourceName, timeout);\n\n let resourceRowName: Locator;\n if (resourceType === KubernetesResources.Nodes) {\n resourceRowName = resourceRow.getByRole('cell').nth(2);\n } else {\n resourceRowName = resourceRow.getByRole('cell').nth(3);\n }\n\n await playExpect(resourceRowName).toBeEnabled();\n await resourceRowName.click();\n\n return new KubernetesResourceDetailsPage(this.page, resourceName);\n });\n }\n\n async deleteKubernetesResource(resourceName: string): Promise<void> {\n return test.step(`Delete ${resourceName}`, async () => {\n const resourceRow = await this.fetchKubernetesResource(resourceName);\n const deleteButton = resourceRow.getByRole('button', {\n name: 'Delete',\n exact: false,\n });\n await playExpect(deleteButton).toBeVisible();\n await deleteButton.click();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport type { KubernetesResources } from '/@/model/core/types';\n\nimport { KubernetesDashboardPage } from './kubernetes-dashboard-page';\nimport { KubernetesResourcePage } from './kubernetes-resource-page';\n\nexport class KubernetesBar {\n readonly page: Page;\n readonly kubernetesNavBar: Locator;\n readonly title: Locator;\n\n constructor(page: Page) {\n this.page = page;\n this.kubernetesNavBar = page.getByRole('navigation', { name: 'Kubernetes Navigation Bar' });\n this.title = this.kubernetesNavBar.getByText('Kubernetes');\n }\n\n public async openTabPage(kubernetesResource: KubernetesResources): Promise<KubernetesResourcePage> {\n const resource = this.kubernetesNavBar.getByRole('link', { name: kubernetesResource, exact: true });\n await resource.click();\n\n switch (kubernetesResource) {\n case 'Persistent Volume Claims':\n return new KubernetesResourcePage(this.page, 'PVCs');\n case 'ConfigMaps & Secrets':\n return new KubernetesResourcePage(this.page, 'Configmaps and Secrets');\n case 'Ingresses & Routes':\n return new KubernetesResourcePage(this.page, 'ingresses and routes');\n default:\n return new KubernetesResourcePage(this.page, kubernetesResource);\n }\n }\n\n public async openKubernetesDashboardPage(): Promise<KubernetesDashboardPage> {\n const dashboardLink = this.kubernetesNavBar.getByRole('link', { name: 'Dashboard', exact: true });\n await dashboardLink.click();\n return new KubernetesDashboardPage(this.page);\n }\n\n public getSettingsNavBarTabLocator(name: string): Locator {\n return this.kubernetesNavBar.getByLabel(name);\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog, handleEditNetworkDialog } from '/@/utility/operations';\n\nimport { DetailsPage } from './details-page';\nimport { NetworksPage } from './networks-page';\n\nexport class NetworkDetailsPage extends DetailsPage {\n readonly updateButton: Locator;\n readonly deleteButton: Locator;\n\n static readonly SUMMARY_TAB = 'Summary';\n static readonly INSPECT_TAB = 'Inspect';\n\n constructor(page: Page, name: string) {\n super(page, name);\n this.updateButton = this.controlActions.getByRole('button', {\n name: 'Update Network',\n });\n this.deleteButton = this.controlActions.getByRole('button', {\n name: 'Delete Network',\n });\n }\n\n async updateNetwork(options?: {\n dnsServersToAdd?: string;\n dnsServersToRemove?: string;\n action?: 'Cancel' | 'Update';\n }): Promise<NetworkDetailsPage> {\n return test.step('Update network from details page', async () => {\n await playExpect(this.updateButton).toBeEnabled();\n await this.updateButton.click();\n await handleEditNetworkDialog(this.page, this.resourceName, options);\n return this;\n });\n }\n\n async deleteNetwork(): Promise<NetworksPage> {\n return test.step('Delete network from details page', async () => {\n await playExpect(this.deleteButton).toBeEnabled();\n await this.deleteButton.click();\n await handleConfirmationDialog(this.page);\n return new NetworksPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { NetworkDetailsPage } from './network-details-page';\nimport { NetworksPage } from './networks-page';\n\nexport class CreateNetworkPage extends BasePage {\n readonly heading: Locator;\n readonly networkNameBox: Locator;\n readonly subnetBox: Locator;\n readonly createButton: Locator;\n readonly cancelButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = this.page.getByRole('heading', { name: 'Create a network' });\n this.networkNameBox = this.page.getByRole('textbox', { name: 'Name' });\n this.subnetBox = this.page.getByRole('textbox', { name: 'Subnet' });\n this.createButton = this.page.getByRole('button', { name: 'Create' });\n this.cancelButton = this.page.getByRole('button', { name: 'Cancel' });\n }\n\n async createNetwork(name: string, subnet: string): Promise<NetworkDetailsPage> {\n return test.step(`Create network ${name} with subnet ${subnet}`, async () => {\n await playExpect(this.networkNameBox).toBeVisible();\n await this.networkNameBox.clear();\n await playExpect(this.networkNameBox).toHaveValue('');\n await this.networkNameBox.fill(name);\n await playExpect(this.networkNameBox).toHaveValue(name);\n\n await playExpect(this.subnetBox).toBeVisible();\n await this.subnetBox.clear();\n await playExpect(this.subnetBox).toHaveValue('');\n await this.subnetBox.fill(subnet);\n await playExpect(this.subnetBox).toHaveValue(subnet);\n\n await playExpect(this.createButton).toBeEnabled();\n await this.createButton.click();\n return new NetworkDetailsPage(this.page, name);\n });\n }\n\n async cancel(): Promise<NetworksPage> {\n return test.step('Cancel network creation', async () => {\n await playExpect(this.cancelButton).toBeEnabled();\n await this.cancelButton.click();\n return new NetworksPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog, handleEditNetworkDialog } from '/@/utility/operations';\n\nimport { CreateNetworkPage } from './create-network-page';\nimport { MainPage } from './main-page';\nimport { NetworkDetailsPage } from './network-details-page';\n\nexport class NetworksPage extends MainPage {\n readonly createNetworkButton: Locator;\n readonly deleteSelectedButton: Locator;\n\n constructor(page: Page) {\n super(page, 'networks');\n this.createNetworkButton = this.additionalActions.getByRole('button', { name: 'Create' });\n this.deleteSelectedButton = this.bottomAdditionalActions.getByRole('button', { name: 'Delete' });\n }\n\n async getNetworkRowByName(name: string): Promise<Locator | undefined> {\n return this.getRowByName(name);\n }\n\n async networkExists(name: string): Promise<boolean> {\n return test.step(`Check if network: ${name} exists`, async () => {\n const result = await this.getNetworkRowByName(name);\n return result !== undefined;\n });\n }\n\n async countNetworksFromTable(): Promise<number> {\n return this.countRowsFromTable();\n }\n\n async deleteNetwork(networkName: string): Promise<NetworksPage> {\n return test.step(`Delete network: ${networkName}`, async () => {\n const networkDeleteButton = await this.getDeleteNetworkRowButton(networkName);\n await playExpect(networkDeleteButton).toBeEnabled();\n await networkDeleteButton.click();\n await handleConfirmationDialog(this.page);\n return this;\n });\n }\n\n async updateNetwork(\n networkName: string,\n options?: {\n dnsServersToAdd?: string;\n dnsServersToRemove?: string;\n action?: 'Cancel' | 'Update';\n },\n ): Promise<NetworksPage> {\n return test.step(`Update network: ${networkName}`, async () => {\n const networkUpdateButton = await this.getUpdateNetworkRowButton(networkName);\n await playExpect(networkUpdateButton).toBeEnabled();\n await networkUpdateButton.click();\n await handleEditNetworkDialog(this.page, networkName, options);\n return this;\n });\n }\n\n async deleteSelectedNetworks(): Promise<NetworksPage> {\n return test.step('Delete selected networks', async () => {\n await playExpect(this.deleteSelectedButton).toBeEnabled();\n await this.deleteSelectedButton.click();\n await handleConfirmationDialog(this.page);\n return this;\n });\n }\n\n async createNetwork(name: string, subnet: string): Promise<NetworkDetailsPage> {\n return test.step(`Create network: ${name}`, async () => {\n await playExpect(this.createNetworkButton).toBeEnabled();\n await this.createNetworkButton.click();\n const createNetworkPage = new CreateNetworkPage(this.page);\n await playExpect(createNetworkPage.heading).toBeVisible();\n return createNetworkPage.createNetwork(name, subnet);\n });\n }\n\n async openNetworkDetails(networkName: string): Promise<NetworkDetailsPage> {\n return test.step('Open Network Details Page', async () => {\n const networkRow = await this.getNetworkRowByName(networkName);\n if (networkRow === undefined) {\n throw Error(`Network: ${networkName} does not exist`);\n }\n const networkRowNameCell = networkRow.getByRole('cell').nth(3);\n await playExpect(networkRowNameCell).toBeEnabled();\n await networkRowNameCell.click();\n\n return new NetworkDetailsPage(this.page, networkName);\n });\n }\n\n private async getNetworkRowButton(networkName: string, buttonName: string): Promise<Locator> {\n const networkRow = await this.getNetworkRowByName(networkName);\n if (networkRow === undefined) {\n throw Error(`Network: ${networkName} does not exist`);\n }\n return networkRow.getByRole('button', { name: buttonName });\n }\n\n private async getDeleteNetworkRowButton(networkName: string): Promise<Locator> {\n return this.getNetworkRowButton(networkName, 'Delete Network');\n }\n private async getUpdateNetworkRowButton(networkName: string): Promise<Locator> {\n return this.getNetworkRowButton(networkName, 'Update Network');\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport { ContainersPage } from '/@/model/pages/containers-page';\nimport { DashboardPage } from '/@/model/pages/dashboard-page';\nimport { ExtensionsPage } from '/@/model/pages/extensions-page';\nimport { ImagesPage } from '/@/model/pages/images-page';\nimport { KubernetesBar } from '/@/model/pages/kubernetes-bar';\nimport { NetworksPage } from '/@/model/pages/networks-page';\nimport { PodsPage } from '/@/model/pages/pods-page';\nimport { SettingsBar } from '/@/model/pages/settings-bar';\nimport { VolumesPage } from '/@/model/pages/volumes-page';\n\nexport class NavigationBar {\n readonly page: Page;\n readonly navigationLocator: Locator;\n readonly imagesLink: Locator;\n readonly containersLink: Locator;\n readonly volumesLink: Locator;\n readonly podsLink: Locator;\n readonly dashboardLink: Locator;\n readonly settingsLink: Locator;\n readonly extensionsLink: Locator;\n readonly kubernetesLink: Locator;\n readonly networksLink: Locator;\n\n constructor(page: Page) {\n this.page = page;\n this.navigationLocator = this.page.getByRole('navigation', {\n name: 'AppNavigation',\n });\n this.imagesLink = this.page.getByRole('link', { name: 'Images' });\n this.containersLink = this.page.getByRole('link', { name: 'Containers' }).nth(0);\n this.podsLink = this.page.getByRole('link', { name: 'Pods', exact: true }).nth(0);\n this.volumesLink = this.page.getByRole('link', { name: 'Volumes' });\n this.dashboardLink = this.page.getByRole('link', { name: 'Dashboard' });\n this.settingsLink = this.page.getByRole('link', { name: 'Settings', exact: true });\n this.extensionsLink = this.navigationLocator.getByRole('link', {\n name: 'Extensions',\n exact: true,\n });\n this.kubernetesLink = this.navigationLocator.getByRole('link', {\n name: 'Kubernetes',\n });\n this.networksLink = this.navigationLocator.getByRole('link', {\n name: 'Networks',\n });\n }\n\n async openDashboard(): Promise<DashboardPage> {\n return test.step('Open Dashboard page', async () => {\n await playExpect(this.dashboardLink).toBeVisible({ timeout: 10_000 });\n await this.dashboardLink.click({ force: true });\n return new DashboardPage(this.page);\n });\n }\n\n async openImages(): Promise<ImagesPage> {\n return test.step('Open Images page', async () => {\n await playExpect(this.imagesLink).toBeVisible({ timeout: 10_000 });\n await this.imagesLink.click({ force: true });\n return new ImagesPage(this.page);\n });\n }\n\n async openContainers(): Promise<ContainersPage> {\n return test.step('Open Containers page', async () => {\n await playExpect(this.containersLink).toBeVisible({ timeout: 10_000 });\n await this.containersLink.click({ force: true });\n return new ContainersPage(this.page);\n });\n }\n\n async openPods(): Promise<PodsPage> {\n return test.step('Open Pods page', async () => {\n await playExpect(this.podsLink).toBeVisible({ timeout: 10_000 });\n await this.podsLink.click({ force: true });\n return new PodsPage(this.page);\n });\n }\n\n async openSettings(): Promise<SettingsBar> {\n return test.step('Open Settings Page ', async () => {\n const settingsBar = new SettingsBar(this.page);\n if (!(await settingsBar.settingsNavBar.isVisible())) {\n await playExpect(this.settingsLink).toBeVisible({ timeout: 10_000 });\n await this.settingsLink.click({ force: true });\n }\n return settingsBar;\n });\n }\n\n async openVolumes(): Promise<VolumesPage> {\n return test.step('Open Volumes page', async () => {\n await playExpect(this.volumesLink).toBeVisible({ timeout: 10_000 });\n await this.volumesLink.click({ force: true });\n return new VolumesPage(this.page);\n });\n }\n\n async openKubernetes(): Promise<KubernetesBar> {\n return test.step('Open Kubernetes Page ', async () => {\n const kubernetesBar = new KubernetesBar(this.page);\n if (!(await kubernetesBar.kubernetesNavBar.isVisible())) {\n await playExpect(this.kubernetesLink).toBeVisible({ timeout: 10_000 });\n await this.kubernetesLink.click({ force: true });\n }\n return kubernetesBar;\n });\n }\n\n async openExtensions(): Promise<ExtensionsPage> {\n return test.step('Open Extensions page', async () => {\n await playExpect(this.extensionsLink).toBeVisible({ timeout: 10_000 });\n await this.extensionsLink.click({ force: true });\n return new ExtensionsPage(this.page);\n });\n }\n\n async openNetworks(): Promise<NetworksPage> {\n return test.step('Open Networks page', async () => {\n await playExpect(this.networksLink).toBeVisible({ timeout: 10_000 });\n await this.networksLink.click({ force: true });\n return new NetworksPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { NavigationBar } from '/@/model/workbench/navigation';\nimport { createPodmanMachineFromCLI, resetPodmanMachinesFromCLI } from '/@/utility/operations';\n\nexport async function wait(\n waitFunction: () => Promise<boolean>,\n until: boolean,\n timeout: number,\n diff: number,\n sendError: boolean,\n errorMessage: string,\n): Promise<void> {\n let time = timeout;\n while (time > 0) {\n const waitFuncResult = await waitFunction();\n if (waitFuncResult === until) {\n return;\n }\n time = time - diff;\n await delay(diff);\n }\n const message =\n errorMessage.length === 0\n ? `Timeout (${timeout} ms) was reach while waiting for condition (${waitFunction.name}) to become '${String(\n until,\n )}'`\n : errorMessage;\n if (sendError) {\n throw Error(message);\n }\n}\n\n/**\n * Waiting function that tests the condition (callback) to become true until timeout is reached,\n * error is thrown if not fulfilled\n * @param waitFunction a callback returning Promise<boolean>\n * @param timeout timeout in ms\n * @param diff a diff (number) in ms defining the delay between each cycle\n *\n * Example: await waitUntil(() => dialogIsOpen(), 1000, 250, 'Dialog window was not openend as expected in 1 s');\n */\nexport async function waitUntil(\n waitFunction: () => Promise<boolean>,\n {\n timeout = 5_000,\n diff = 500,\n sendError = true,\n message = '',\n }: {\n timeout?: number;\n diff?: number;\n sendError?: boolean;\n message?: string;\n } = {},\n): Promise<void> {\n await wait(waitFunction, true, timeout, diff, sendError, message);\n}\n\n/**\n * Waiting function that tests the condition (callback) to become false until timeout is reached,\n * error is thrown if not fulfilled\n * @param waitFunction a callback returning Promise<boolean>\n * @param timeout timeout in ms\n * @param diff a diff (number) in ms defining the delay between each cycle\n *\n * Example: await waitWhile(() => dialogIsOpen(), 1000, 250, 'Dialog window was not closed as expected in 1 s');\n */\nexport async function waitWhile(\n waitFunction: () => Promise<boolean>,\n {\n timeout = 5_000,\n diff = 500,\n sendError = true,\n message = '',\n }: {\n timeout?: number;\n diff?: number;\n sendError?: boolean;\n message?: string;\n } = {},\n): Promise<void> {\n await wait(waitFunction, false, timeout, diff, sendError, message);\n}\n\n/**\n * Standard delay function\n * @param ms number of ms to sleep for\n * @returns promise void\n */\nexport async function delay(ms: number): Promise<void> {\n return new Promise(resolve => {\n setTimeout(resolve, ms);\n });\n}\n\nexport async function waitForPodmanMachineStartup(page: Page, timeout = 30_000): Promise<void> {\n return test.step('Wait for Podman machine to be running', async () => {\n await createPodmanMachineFromCLI();\n\n const dashboardPage = await new NavigationBar(page).openDashboard();\n await playExpect(dashboardPage.heading).toBeVisible();\n await playExpect(dashboardPage.podmanStatusLabel).toBeVisible({ timeout });\n\n try {\n // sometimes the podman machine is stuck in STARTING state, so we try to reset it once\n await playExpect(dashboardPage.podmanStatusLabel).not.toHaveText('STARTING', { timeout });\n } catch (error) {\n console.error('Podman machine stuck in STARTING state, trying to restart it', error);\n await resetPodmanMachinesFromCLI();\n await createPodmanMachineFromCLI();\n }\n\n await playExpect(dashboardPage.podmanStatusLabel).toHaveText('RUNNING', { timeout });\n });\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nexport class RunnerOptions {\n public readonly _profile: string;\n public readonly _customFolder: string;\n public readonly _customOutputFolder: string;\n public readonly _openDevTools: string;\n public readonly _autoUpdate: boolean;\n public readonly _autoCheckUpdates: boolean;\n public readonly _extensionsDisabled: string[];\n public readonly _aiLabModelUploadDisabled: boolean;\n public readonly _binaryPath: string | undefined;\n public readonly _saveTracesOnPass: boolean;\n public readonly _saveVideosOnPass: boolean;\n public readonly _customSettings: { [key: string]: unknown } = {};\n\n constructor({\n profile = '',\n customFolder = 'podman-desktop',\n customOutputFolder = 'tests/playwright/output/',\n openDevTools = 'none',\n autoUpdate = true,\n autoCheckUpdates = true,\n extensionsDisabled = [],\n aiLabModelUploadDisabled = false,\n binaryPath = undefined,\n saveTracesOnPass = false,\n saveVideosOnPass = false,\n customSettings = {},\n }: {\n profile?: string;\n customFolder?: string;\n customOutputFolder?: string;\n openDevTools?: string;\n autoUpdate?: boolean;\n autoCheckUpdates?: boolean;\n extensionsDisabled?: string[];\n aiLabModelUploadDisabled?: boolean;\n binaryPath?: string;\n saveTracesOnPass?: boolean;\n saveVideosOnPass?: boolean;\n customSettings?: { [key: string]: unknown };\n } = {}) {\n this._profile = profile;\n this._customFolder = customFolder;\n this._customOutputFolder = customOutputFolder;\n this._openDevTools = openDevTools;\n this._autoUpdate = autoUpdate;\n this._autoCheckUpdates = autoCheckUpdates;\n this._extensionsDisabled = extensionsDisabled;\n this._aiLabModelUploadDisabled = aiLabModelUploadDisabled;\n this._binaryPath = binaryPath;\n this._saveTracesOnPass = saveTracesOnPass;\n this._saveVideosOnPass = saveVideosOnPass;\n this._customSettings = customSettings;\n }\n\n public createSettingsJson(): string {\n console.log(`Binary path: ${this._binaryPath}`);\n\n if (this._binaryPath) {\n return JSON.stringify({\n 'preferences.OpenDevTools': this._openDevTools,\n 'extensions.autoUpdate': this._autoUpdate,\n 'extensions.autoCheckUpdates': this._autoCheckUpdates,\n 'extensions.disabled': this._extensionsDisabled,\n 'ai-lab.modelUploadDisabled': this._aiLabModelUploadDisabled,\n 'podman.binary.path': this._binaryPath,\n ...this._customSettings,\n });\n }\n\n return JSON.stringify({\n 'preferences.OpenDevTools': this._openDevTools,\n 'extensions.autoUpdate': this._autoUpdate,\n 'extensions.autoCheckUpdates': this._autoCheckUpdates,\n 'extensions.disabled': this._extensionsDisabled,\n 'ai-lab.modelUploadDisabled': this._aiLabModelUploadDisabled,\n ...this._customSettings,\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { existsSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';\nimport { dirname, join, resolve } from 'node:path';\n\nimport type { ElectronApplication, JSHandle, Page } from '@playwright/test';\nimport { _electron as electron, test } from '@playwright/test';\nimport type { BrowserWindow } from 'electron';\n\nimport { isLinux } from '/@/utility/platform';\nimport { waitWhile } from '/@/utility/wait';\n\nimport { RunnerOptions } from './runner-options';\n\ntype WindowState = {\n isVisible: boolean;\n isDevToolsOpened: boolean;\n isCrashed: boolean;\n};\n\nexport class Runner {\n private _options: object;\n private _running: boolean;\n private _app: ElectronApplication | undefined;\n private _page: Page | undefined;\n private readonly _profile: string;\n private readonly _customFolder;\n private readonly _testOutput: string;\n private _videoAndTraceName: string | undefined;\n private _runnerOptions: RunnerOptions;\n private _saveTracesOnPass: boolean;\n private _saveVideosOnPass: boolean;\n\n private static _instance: Runner | undefined;\n\n static async getInstance({\n runnerOptions = new RunnerOptions(),\n }: {\n runnerOptions?: RunnerOptions;\n } = {}): Promise<Runner> {\n if (!Runner._instance) {\n Runner._instance = new Runner({ runnerOptions });\n await Runner._instance.start();\n }\n return Runner._instance;\n }\n\n private constructor({\n runnerOptions = new RunnerOptions(),\n }: {\n runnerOptions?: RunnerOptions;\n } = {}) {\n this._running = false;\n this._runnerOptions = runnerOptions;\n this._profile = this._runnerOptions._profile;\n this._saveTracesOnPass = this._runnerOptions._saveTracesOnPass;\n this._saveVideosOnPass = this._runnerOptions._saveVideosOnPass;\n this._testOutput = join(this._runnerOptions._customOutputFolder, this._profile);\n this._customFolder = join(this._testOutput, this._runnerOptions._customFolder);\n this._videoAndTraceName = undefined;\n\n // Options setting always needs to be last action in constructor in order to apply settings correctly\n this._options = this.defaultOptions();\n }\n\n public async start(): Promise<Page> {\n if (this.isRunning()) {\n console.log('Podman Desktop is already running');\n return this.getPage();\n }\n\n try {\n // start the app with given properties\n this._running = true;\n console.log('Starting Podman Desktop');\n console.log('Electron app launch options: ');\n Object.keys(this._options).forEach(key => {\n console.log(`${key}: ${(this._options as { [k: string]: string })[key]}`);\n });\n this._app = await electron.launch({\n ...this._options,\n });\n // setup state\n this._page = await this.getElectronApp().firstWindow();\n const exe = this.getElectronApp().evaluate(async ({ app }) => {\n return app.getPath('exe');\n });\n const filePath = await exe;\n console.log(`The Executable Electron app. file: ${filePath}`);\n\n // Evaluate that the main window is visible\n // at the same time, the function also makes sure that event 'ready-to-show' was triggered\n // keeping this call meeses up communication between playwright and electron app on linux\n // did not have time to investigate why is this occasionally happening\n // const windowState = await this.getBrowserWindowState();\n } catch (err) {\n console.log(`Caught exception in startup: ${err}`);\n throw Error(`Podman Desktop could not be started correctly with error: ${err}`);\n }\n\n // Direct Electron console to Node terminal.\n this.getPage().on('console', console.log);\n\n // Start playwright tracing\n await this.startTracing();\n\n // also get stderr from the node process\n this._app.process().stderr?.on('data', data => {\n console.log(`STDERR: ${data}`);\n });\n\n return this._page;\n }\n\n public getPage(): Page {\n if (this._page) {\n return this._page;\n }\n\n throw Error('Application was not started yet');\n }\n\n public getElectronApp(): ElectronApplication {\n if (this._app) {\n return this._app;\n }\n\n throw Error('Application was not started yet');\n }\n\n public async getBrowserWindow(): Promise<JSHandle<BrowserWindow>> {\n return await this.getElectronApp().browserWindow(this.getPage());\n }\n\n public async screenshot(filename: string): Promise<void> {\n await this.getPage().screenshot({ path: join(this._testOutput, 'screenshots', filename) });\n }\n\n public async startTracing(): Promise<void> {\n await this.getPage().context().tracing.start({ screenshots: true, snapshots: true, sources: true });\n }\n\n public async stopTracing(): Promise<void> {\n let name = '';\n if (this._videoAndTraceName) name = this._videoAndTraceName;\n\n name = name + '_trace.zip';\n await this.getPage()\n .context()\n .tracing.stop({ path: join(this._testOutput, 'traces', name) });\n }\n\n public async getBrowserWindowState(): Promise<WindowState> {\n return await (await this.getBrowserWindow()).evaluate((mainWindow): Promise<WindowState> => {\n const getState = (): { isVisible: boolean; isDevToolsOpened: boolean; isCrashed: boolean } => {\n return {\n isVisible: mainWindow.isVisible(),\n isDevToolsOpened: mainWindow.webContents.isDevToolsOpened(),\n isCrashed: mainWindow.webContents.isCrashed(),\n };\n };\n\n return new Promise(resolve => {\n /**\n * The main window is created hidden, and is shown only when it is ready.\n * See {@link ../packages/main/src/mainWindow.ts} function\n */\n if (mainWindow.isVisible()) {\n resolve(getState());\n } else\n mainWindow.once('ready-to-show', () => {\n resolve(getState());\n });\n });\n });\n }\n\n async saveVideoAs(path: string): Promise<void> {\n const video = this.getPage().video();\n if (video) {\n await video.saveAs(path);\n await video.delete();\n } else {\n console.log('Video file associated was not found');\n }\n }\n\n public async close(timeout = 30_000): Promise<void> {\n // Stop playwright tracing\n await this.stopTracing();\n\n if (!this.isRunning()) {\n throw Error('Podman Desktop is not running');\n }\n\n if (this.getElectronApp()) {\n const pid = this.getElectronApp()?.process()?.pid;\n console.log(`Closing Podman Desktop with a timeout of ${timeout} ms`);\n try {\n await Promise.race([\n waitWhile(async () => this.isRunning(), { timeout: timeout, diff: 100 }),\n this.getElectronApp().close(),\n ]);\n } catch (err: unknown) {\n console.log(`Caught exception in closing: ${err}`);\n console.log('Trying to kill the electron app process');\n if (pid) {\n console.log(`Killing the electron app process with PID: ${pid}`);\n try {\n process.kill(pid as number);\n } catch (error: unknown) {\n console.log(`Exception thrown when killing the process: ${error}`);\n }\n }\n }\n }\n this._running = false;\n Runner._instance = undefined;\n\n if (this._videoAndTraceName) {\n const videoPath = join(this._testOutput, 'videos', `${this._videoAndTraceName}.webm`);\n const elapsed = await this.trackTime(async () => await this.saveVideoAs(videoPath));\n console.log(`Saving a video file took: ${elapsed} ms`);\n console.log(`Video file saved as: ${videoPath}`);\n }\n await this.removeTracesOnFinished();\n }\n\n async removeTracesOnFinished(): Promise<void> {\n const rawTracesPath = join(this._testOutput, 'traces', 'raw');\n\n if (existsSync(rawTracesPath)) {\n console.log(`Removing raw traces folder: ${rawTracesPath}`);\n rmSync(rawTracesPath, { recursive: true, force: true, maxRetries: 5 });\n }\n\n try {\n const testStatus = test.info().status;\n console.log(`Test finished with status:${testStatus}`);\n if (testStatus !== 'passed' && testStatus !== 'skipped') return;\n } catch (err) {\n console.log(`Caught exception in removing traces: ${err}`);\n return;\n }\n\n if (!process.env.KEEP_TRACES_ON_PASS && !this._saveTracesOnPass) {\n const tracesPath = join(this._testOutput, 'traces', `${this._videoAndTraceName}_trace.zip`);\n if (existsSync(tracesPath)) {\n console.log(`Removing traces folder: ${tracesPath}`);\n rmSync(tracesPath, { recursive: true, force: true, maxRetries: 5 });\n }\n }\n\n if (!process.env.KEEP_VIDEOS_ON_PASS && !this._saveVideosOnPass) {\n const videoPath = join(this._testOutput, 'videos', `${this._videoAndTraceName}.webm`);\n if (existsSync(videoPath)) {\n console.log(`Removing video folder: ${videoPath}`);\n rmSync(videoPath, { recursive: true, force: true, maxRetries: 5 });\n }\n }\n }\n\n protected async trackTime(fn: () => Promise<void>): Promise<number> {\n const start = performance.now();\n return await fn\n .call(() => {\n /* no actual logic */\n })\n .then(() => {\n return performance.now() - start;\n });\n }\n\n private defaultOptions(): object {\n const pdArgs = process.env.PODMAN_DESKTOP_ARGS;\n const pdBinary = process.env.PODMAN_DESKTOP_BINARY;\n if (pdArgs && pdBinary) {\n throw new Error(\n 'PODMAN_DESKTOP_ARGS and PODMAN_DESKTOP_BINARY are both set, cannot run tests in development and production mode at the same time...',\n );\n }\n const directory = join(this._testOutput, 'videos');\n const tracesDir = join(this._testOutput, 'traces', 'raw');\n console.log(`video will be written to: ${directory}`);\n const env = this.setupPodmanDesktopCustomFolder();\n const recordVideo = {\n dir: directory,\n size: {\n width: 1050,\n height: 700,\n },\n };\n const args = pdArgs ? [pdArgs] : ['.'];\n // executablePath defaults to this package's installation location: node_modules/.bin/electron\n const executablePath = pdArgs ? join(pdArgs, 'node_modules', '.bin', 'electron') : (pdBinary ?? undefined);\n const timeout = 45000;\n return {\n args,\n executablePath,\n env,\n recordVideo,\n timeout,\n tracesDir,\n };\n }\n\n private setupPodmanDesktopCustomFolder(): object {\n const env: { [key: string]: string } = process.env as { [key: string]: string };\n const dir = join(this._customFolder);\n console.log(`podman desktop custom config will be written to: ${dir}`);\n env.PODMAN_DESKTOP_HOME_DIR = dir;\n\n // required to get dashboard opened, https://github.com/podman-desktop/podman-desktop/issues/15220\n if (isLinux) {\n env.XDG_SESSION_TYPE = 'x11';\n }\n\n // add a custom config file by disabling OpenDevTools\n const settingsFile = resolve(dir, 'configuration', 'settings.json');\n\n // create parent folder if missing\n const parentDir = dirname(settingsFile);\n if (!existsSync(parentDir)) {\n mkdirSync(parentDir, { recursive: true });\n }\n\n const settingsContent = this._runnerOptions.createSettingsJson();\n\n // write the file\n console.log(`disabling OpenDevTools in configuration file ${settingsFile}`);\n writeFileSync(settingsFile, settingsContent);\n\n return env;\n }\n\n public isRunning(): boolean {\n return this._running;\n }\n\n public setOptions(value: object): void {\n this._options = value;\n }\n\n public setVideoAndTraceName(name: string): void {\n this._videoAndTraceName = name;\n\n if (test.info().retry > 0) {\n this._videoAndTraceName += `_retry-${test.info().retry}`;\n }\n }\n\n public getTestOutput(): string {\n return this._testOutput;\n }\n\n public get options(): object {\n return this._options;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nexport function setupRegistry(): string[] {\n const urlDefault = 'ghcr.io';\n const registryUrl = process.env.REGISTRY_URL ?? urlDefault;\n const ciDefault = process.env.CI ? 'podmandesktop-ci' : '';\n const registryUsername = process.env.REGISTRY_USERNAME ?? ciDefault;\n const tokenDef = process.env.PODMANDESKTOP_CI_BOT_TOKEN ?? '';\n const pwsdDefault = process.env.CI ? tokenDef : '';\n const registryPswdSecret = process.env.REGISTRY_PASSWD ?? pwsdDefault;\n return [registryUrl, registryUsername, registryPswdSecret];\n}\n\nexport function canTestRegistry(): boolean {\n const [registry, username, passwd] = setupRegistry();\n return !!registry && !!username && !!passwd;\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { join } from 'node:path';\n\nimport type { Browser, Locator, Page } from '@playwright/test';\nimport { chromium, expect as playExpect } from '@playwright/test';\n\nimport { waitUntil } from './wait';\n\nexport type ConfirmInputValue = {\n inputLocator: Locator;\n inputValue: string;\n confirmLocator: Locator;\n};\n\nexport async function findPageWithTitleInBrowser(browser: Browser, expectedTitle: string): Promise<Page | undefined> {\n await waitUntil(async () => browser.contexts().length > 0, {\n timeout: 10_000,\n message: 'Waiting for browser contexts to be available',\n sendError: false,\n });\n const pages = browser.contexts().flatMap(context => context.pages());\n const pagesTitles = await Promise.all(pages.map(async page => ({ page, title: await page.title() })));\n\n const chromePage = pagesTitles.find(p => p.title.includes(expectedTitle))?.page;\n if (!chromePage) {\n console.error(`No page found with title: ${expectedTitle}`);\n }\n return chromePage;\n}\n\nexport async function performBrowserLogin(\n page: Page,\n title: string | RegExp,\n usernameAction: ConfirmInputValue,\n passwordAction: ConfirmInputValue,\n postLoginAction: (myPage: Page) => Promise<void>,\n options: {\n screenshotsPath: string | undefined;\n } = { screenshotsPath: '' },\n): Promise<void> {\n console.log('Performing browser login...');\n const path = options.screenshotsPath;\n if (path) {\n await page.screenshot({ path: join(path, 'screenshots', 'initial_page.png'), type: 'png', fullPage: true });\n }\n // title\n await playExpect(page).toHaveTitle(title);\n // username\n await playExpect(usernameAction.inputLocator).toBeVisible();\n await usernameAction.inputLocator.fill(usernameAction.inputValue);\n await playExpect(usernameAction.confirmLocator).toBeEnabled();\n await usernameAction.confirmLocator.click();\n if (path) {\n await page.screenshot({ path: join(path, 'screenshots', 'after_username_page.png'), type: 'png', fullPage: true });\n }\n // password\n await playExpect(passwordAction.inputLocator).toBeVisible();\n await passwordAction.inputLocator.fill(passwordAction.inputValue);\n await playExpect(passwordAction.confirmLocator).toBeEnabled();\n await passwordAction.confirmLocator.click();\n if (path) {\n await page.screenshot({ path: join(path, 'screenshots', 'after_password_page.png'), type: 'png', fullPage: true });\n }\n // custom doing...\n await postLoginAction(page);\n}\n\nexport async function startChromium(port: string, tracesPath: string, args: string[] = []): Promise<Browser> {\n console.log('Starting a web server on port 9222');\n const browserLaunch = await chromium.launch({\n headless: false,\n args: [`--remote-debugging-port=${port}`, ...args],\n tracesDir: tracesPath,\n slowMo: 200,\n });\n\n // hard wait\n await waitUntil(async () => browserLaunch?.isConnected(), {\n timeout: 10_000,\n message: 'Waiting for browser to be connected',\n sendError: false,\n });\n // Connect to the same Chrome instance via CDP\n // possible option is to use chromium.connectOverCDP(`http://localhost:${port}`);\n if (!browserLaunch) {\n throw new Error('Browser object was not initialized properly');\n }\n console.log(`Browser is launched. Executable path: ${browserLaunch.browserType().executablePath()}`);\n return browserLaunch;\n}\n\n// to be deprecated, use getEntryFromConsoleLogs instead\nexport async function getEntryFromLogs(\n page: Page,\n filter: RegExp,\n regex: RegExp,\n lineContains = '',\n): Promise<string | undefined> {\n return await getEntryFromConsoleLogs(page, filter, regex, lineContains, 10_000);\n}\n\n// get a page's console log entry filtered by a regexp filter argument and matched by a regex\nexport async function getEntryFromConsoleLogs(\n page: Page,\n filter: RegExp,\n regex: RegExp,\n checkString: string,\n timeout = 10_000,\n): Promise<string | undefined> {\n const consoleLogPromise = page.waitForEvent('console', {\n predicate: msg => {\n return msg.type() === 'log' && filter.test(msg.text());\n },\n timeout: timeout,\n });\n const consoleMsg = await consoleLogPromise;\n const logLine = consoleMsg.text();\n if (checkString) {\n playExpect(logLine).toContain(checkString);\n }\n const parsedString = regex.exec(logLine);\n const urlMatch = parsedString ? parsedString[1] : undefined;\n console.log(`Matched string: ${urlMatch}`);\n return urlMatch;\n}\n\n// Accept/Refuse the cooking in the iframe element\nexport async function handleCookies(\n page: Page,\n iframTitle: string,\n buttonName: string,\n timeout: number,\n): Promise<void> {\n const iframe = page.frameLocator(`iframe[title=\"${iframTitle}\"]`);\n const button = iframe.getByRole('button', { name: buttonName });\n const buttonVisible = await checkLocatorExistence(button, timeout);\n if (buttonVisible) {\n await playExpect(button).toBeVisible();\n await button.click();\n console.log(`Clicked on the button: ${buttonName}`);\n } else {\n console.log(`${buttonName} button is not visible, skipping confirmation...`);\n }\n}\n\n// function is dedicated to verify if some locator exists, depending on external circumstances\nexport async function checkLocatorExistence(locator: Locator, timeout = 5000): Promise<boolean> {\n try {\n await playExpect(locator).toBeVisible({ timeout: timeout });\n } catch (error: unknown) {\n console.log(`Locator not found: ${error}`);\n return false;\n }\n return true;\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport abstract class CreateClusterBasePage extends BasePage {\n readonly header: Locator;\n readonly content: Locator;\n readonly clusterPropertiesInformation: Locator;\n readonly clusterCreationButton: Locator;\n readonly goBackButton: Locator;\n readonly logsButton: Locator;\n readonly errorMessage: Locator;\n\n constructor(page: Page) {\n super(page);\n this.header = this.page.getByRole('region', { name: 'Header' });\n this.content = this.page.getByRole('region', { name: 'Tab Content' });\n this.clusterPropertiesInformation = this.content.getByRole('form', {\n name: 'Properties Information',\n });\n this.clusterCreationButton = this.clusterPropertiesInformation.getByRole('button', { name: 'Create', exact: true });\n this.logsButton = this.content.getByRole('button', { name: 'Show Logs' });\n this.goBackButton = this.page.getByRole('button', {\n name: 'Go back to resources',\n });\n this.errorMessage = this.content.getByRole('alert', {\n name: 'Error Message Content',\n });\n }\n\n async createCluster(timeout: number = 300_000): Promise<void> {\n return test.step('Create cluster', async () => {\n try {\n await playExpect(this.clusterCreationButton).toBeEnabled();\n await this.clusterCreationButton.click();\n await this.logsButton.scrollIntoViewIfNeeded();\n await this.logsButton.click();\n await playExpect(this.goBackButton).toBeVisible({ timeout: timeout });\n await this.goBackButton.click();\n } catch (error) {\n let errorText = '';\n if (await this.errorMessage.count()) errorText = (await this.errorMessage.textContent()) ?? '';\n\n if (error instanceof Error) {\n throw new Error(`Failed to create cluster: ${error.message} with dialog error: ${errorText}`);\n }\n\n throw new Error(`Failed to create cluster: ${error} with dialog error: ${errorText}`);\n }\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport type { KindClusterOptions } from '/@/model/core/types';\nimport { fillTextbox } from '/@/utility/operations';\n\nimport { CreateClusterBasePage } from './cluster-creation-base-page';\n\nexport class CreateKindClusterPage extends CreateClusterBasePage {\n readonly clusterNameField: Locator;\n readonly controllerCheckbox: Locator;\n readonly providerType: Locator;\n readonly httpPort: Locator;\n readonly httpsPort: Locator;\n readonly containerImage: Locator;\n readonly configFileInput: Locator;\n readonly warning: Locator;\n\n constructor(page: Page) {\n super(page);\n this.clusterNameField = this.clusterPropertiesInformation.getByRole('textbox', { name: 'Name', exact: true });\n // Locator for the parent element of the ingress controller checkbox, used to change its value\n this.controllerCheckbox = this.clusterPropertiesInformation\n .getByRole('checkbox', {\n name: 'Setup an ingress controller',\n })\n .locator('..');\n this.providerType = this.clusterPropertiesInformation.getByLabel('Provider Type');\n this.httpPort = this.clusterPropertiesInformation.getByLabel('HTTP Port');\n this.httpsPort = this.clusterPropertiesInformation.getByLabel('HTTPS Port');\n this.containerImage = this.clusterPropertiesInformation.getByPlaceholder('Leave empty for using latest.');\n this.configFileInput = this.clusterPropertiesInformation.getByRole('textbox', {\n name: 'Custom path to Kind config file (Default is blank)',\n exact: true,\n });\n this.warning = this.page.getByRole('alert', { name: 'warning' });\n }\n\n private async validateKindClusterDefaultSettings(): Promise<void> {\n return test.step('Validate kind cluster default settings', async () => {\n await playExpect(this.configFileInput).toBeEmpty();\n await playExpect(this.clusterNameField).toHaveValue('kind-cluster');\n await playExpect(this.providerType).toHaveText('podman');\n await playExpect(this.httpPort).toHaveValue('9090');\n await playExpect(this.httpsPort).toHaveValue('9443');\n await playExpect(this.controllerCheckbox).toBeChecked();\n await playExpect(this.containerImage).toBeEmpty();\n });\n }\n\n public async createKindCluster(\n clusterName = 'kind-cluster',\n { configFilePath, providerType, httpPort, httpsPort, useIngressController, containerImage }: KindClusterOptions = {\n useIngressController: true,\n },\n timeout?: number,\n ): Promise<void> {\n return test.step('Create kind cluster', async () => {\n await this.validateKindClusterDefaultSettings();\n\n // Use the default cluster name if a custom config file is used; the default cluster name should be ignored in this case.\n if (configFilePath) {\n await this.configFileInput.evaluate(node => node.removeAttribute('readonly'));\n await this.configFileInput.fill(configFilePath);\n await playExpect(this.warning).toBeVisible();\n await playExpect(this.warning).toContainText(\n 'By specifying a config file, all other options will be ignored except for ingress controller deployment.',\n );\n } else {\n await fillTextbox(this.clusterNameField, clusterName);\n }\n\n if (providerType && providerType !== 'podman') {\n await this.providerType.click();\n const providerTypeButton = this.clusterPropertiesInformation.getByRole('button', {\n name: providerType,\n exact: true,\n });\n await playExpect(providerTypeButton).toBeEnabled();\n await providerTypeButton.click();\n await playExpect(this.providerType).toHaveText(providerType);\n }\n\n if (httpPort) {\n await fillTextbox(this.httpPort, httpPort);\n await playExpect(this.httpPort).toHaveText(httpPort);\n }\n if (httpsPort) {\n await fillTextbox(this.httpsPort, httpsPort);\n await playExpect(this.httpsPort).toHaveText(httpsPort);\n }\n\n await playExpect(this.controllerCheckbox).toBeEnabled();\n if (!useIngressController) {\n await this.controllerCheckbox.uncheck();\n await playExpect(this.controllerCheckbox).not.toBeChecked();\n } else {\n await this.controllerCheckbox.check();\n await playExpect(this.controllerCheckbox).toBeChecked();\n }\n\n if (containerImage) {\n await fillTextbox(this.containerImage, containerImage);\n await playExpect(this.containerImage).toHaveText(containerImage);\n }\n await this.createCluster(timeout);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport type { ResourceElementActions } from '/@/model/core/operations';\nimport { DetailsPage } from '/@/model/pages/details-page';\n\nexport class ResourceDetailsPage extends DetailsPage {\n readonly resourceStatus: Locator;\n\n constructor(page: Page, title: string) {\n super(page, title);\n this.resourceStatus = this.header.getByLabel('Connection Status Label');\n }\n\n public async performConnectionActionDetails(operation: ResourceElementActions, timeout = 25_000): Promise<void> {\n return test.step(`Perform connection action '${operation}' on resource element '${this.resourceName}' from details page`, async () => {\n const button = this.controlActions.getByRole('button', {\n name: operation,\n exact: true,\n });\n await playExpect(button).toBeEnabled({ timeout: timeout });\n await button.click();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { BasePage } from './base-page';\n\nexport class TasksPage extends BasePage {\n readonly tasksManagerWindow: Locator;\n readonly header: Locator;\n readonly heading: Locator;\n readonly clearAllButton: Locator;\n readonly closeButton: Locator;\n readonly tasksSearchBar: Locator;\n readonly tasksSearchInput: Locator;\n readonly tasksSearchClearButton: Locator;\n readonly allTasksButton: Locator;\n readonly inProgressTasksButton: Locator;\n readonly successTasksButton: Locator;\n readonly failureTasksButton: Locator;\n readonly cancelledTasksButton: Locator;\n readonly content: Locator;\n readonly noTasksPlaceholder: Locator;\n readonly taskListHeader: Locator;\n readonly selectAllTasksCheckbox: Locator;\n readonly sortByName: Locator;\n readonly sortByProgress: Locator;\n readonly sortByAge: Locator;\n readonly taskList: Locator;\n\n constructor(page: Page) {\n super(page);\n this.tasksManagerWindow = page.getByRole('region', { name: 'Tasks' });\n this.header = this.tasksManagerWindow.getByRole('region', { name: 'header' });\n this.heading = this.header.getByText('Tasks');\n this.clearAllButton = this.header.getByRole('button', { name: 'Clear all' });\n this.closeButton = this.header.getByRole('button', { name: 'Close' });\n this.tasksSearchBar = this.tasksManagerWindow.getByRole('region', { name: 'search' });\n this.tasksSearchInput = this.tasksSearchBar.getByLabel('search Tasks');\n this.tasksSearchClearButton = this.tasksSearchBar.getByRole('button', { name: 'clear' });\n this.allTasksButton = this.tasksManagerWindow.getByRole('button', { name: 'All' });\n this.inProgressTasksButton = this.tasksManagerWindow.getByRole('button', { name: 'In-Progress' });\n this.successTasksButton = this.tasksManagerWindow.getByRole('button', { name: 'Success' });\n this.failureTasksButton = this.tasksManagerWindow.getByRole('button', { name: 'Failure' });\n this.cancelledTasksButton = this.tasksManagerWindow.getByRole('button', { name: 'Cancelled' });\n this.content = this.tasksManagerWindow.getByRole('region', { name: 'content' });\n this.noTasksPlaceholder = this.content.getByRole('table', { name: 'No active tasks' });\n this.taskListHeader = this.content.getByRole('rowgroup').nth(0);\n this.selectAllTasksCheckbox = this.taskListHeader.getByRole('checkbox', { name: 'Toggle all' });\n this.sortByName = this.taskListHeader.getByRole('columnheader', { name: 'Name' });\n this.sortByProgress = this.taskListHeader.getByRole('columnheader', { name: 'Progress' });\n this.sortByAge = this.taskListHeader.getByRole('columnheader', { name: 'Age' });\n this.taskList = this.content.getByRole('rowgroup').nth(1);\n }\n\n async showAllTasks(): Promise<void> {\n await playExpect(this.tasksManagerWindow).toBeVisible();\n await playExpect(this.allTasksButton).toBeVisible();\n await this.allTasksButton.click();\n await playExpect(this.taskList).toBeVisible();\n }\n\n async cancelLatestTask(): Promise<void> {\n const cancelButton = this.taskList.getByRole('button', { name: 'Cancel task' }).first();\n await playExpect(cancelButton).toBeEnabled();\n await cancelButton.click();\n await handleConfirmationDialog(this.page);\n await handleConfirmationDialog(this.page, 'Long task example', true, 'OK');\n }\n\n async getStatusForLatestTask(): Promise<string> {\n return (await this.taskList.getByRole('status').first().textContent()) ?? '';\n }\n\n async clearAllTasks(): Promise<void> {\n await playExpect(this.clearAllButton).toBeEnabled({ timeout: 10_000 });\n await this.clearAllButton.click();\n }\n\n async awaitTaskCompletion(taskName: string, status: string = 'completed', timeout: number = 60_000): Promise<void> {\n const taskRow = this.getTaskRowByName(taskName);\n const taskStatus = taskRow.getByRole('status');\n\n await playExpect(taskRow).toBeVisible();\n await playExpect(taskStatus).toBeVisible();\n await playExpect(taskStatus).toContainText(status, { timeout: timeout });\n }\n\n async navigateToTask(taskName: string): Promise<void> {\n const taskRow = this.getTaskRowByName(taskName);\n const taskLink = taskRow.getByRole('button', { name: 'View action' });\n\n await playExpect(taskRow).toBeVisible();\n await playExpect(taskLink).toBeVisible();\n await taskLink.click();\n }\n\n async removeTaskFromList(taskName: string): Promise<void> {\n const taskRow = this.getTaskRowByName(taskName);\n const deleteTaskButton = taskRow.getByRole('button', { name: 'Archive/delete completed task' });\n\n await playExpect(taskRow).toBeVisible();\n await playExpect(deleteTaskButton).toBeVisible();\n await deleteTaskButton.click();\n await playExpect(taskRow).not.toBeVisible();\n }\n\n private getTaskRowByName(taskName: string): Locator {\n return this.taskList.getByRole('row', { name: taskName });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport { BasePage } from '/@/model/pages/base-page';\nimport { TasksPage } from '/@/model/pages/tasks-page';\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nexport class StatusBar extends BasePage {\n readonly content: Locator;\n readonly kindInstallationButton: Locator;\n readonly kubernetesContext: Locator;\n readonly versionButton: Locator;\n readonly updateButtonTitle: Locator;\n readonly shareYourFeedbackButton: Locator;\n readonly troubleshootingButton: Locator;\n readonly tasksButton: Locator;\n readonly helpButton: Locator;\n readonly pinProvidersButton: Locator;\n readonly pinMenu: Locator;\n\n constructor(page: Page) {\n super(page);\n this.content = page.getByRole('contentinfo', { name: 'Status Bar' });\n this.kindInstallationButton = this.content.getByTitle(\n 'Kind not found on your system, click to download and install it',\n );\n this.kubernetesContext = this.content.getByTitle('Current Kubernetes Context');\n this.versionButton = this.content.getByRole('button', { name: /^v\\d+\\.\\d+\\.\\d+(-\\w+)?$/ });\n this.updateButtonTitle = this.content.getByRole('button').and(this.content.getByTitle('Update available'));\n this.shareYourFeedbackButton = this.content.getByRole('button').and(this.content.getByTitle('Share your feedback'));\n this.troubleshootingButton = this.content.getByRole('button').and(this.content.getByTitle('Troubleshooting'));\n this.tasksButton = this.content.getByRole('button').and(this.content.getByTitle('Tasks'));\n this.helpButton = this.content.getByRole('button').and(this.content.getByTitle('Help'));\n this.pinProvidersButton = this.content.getByRole('button', { name: 'Pin' });\n this.pinMenu = this.page.getByTitle('Pin Menu');\n }\n\n public async installKindCLI(): Promise<void> {\n await playExpect(this.kindInstallationButton).toBeVisible();\n await this.kindInstallationButton.click();\n await handleConfirmationDialog(this.page, 'Kind');\n await handleConfirmationDialog(this.page, 'Kind');\n await handleConfirmationDialog(this.page, 'Kind', true, 'OK');\n }\n\n public async validateKubernetesContext(context: string): Promise<void> {\n await playExpect(this.kubernetesContext).toBeVisible();\n await playExpect(this.kubernetesContext).toHaveText(context);\n }\n\n public async kindInstallationButtonIsVisible(): Promise<boolean> {\n return (await this.kindInstallationButton.count()) > 0;\n }\n\n public async openTasksPage(): Promise<TasksPage> {\n await playExpect(this.tasksButton).toBeVisible();\n await this.tasksButton.click();\n return new TasksPage(this.page);\n }\n\n public async getProviderButton(providerName: string): Promise<Locator> {\n await playExpect(this.pinProvidersButton, 'status bar providers must be turned on').toBeVisible();\n return this.content.getByRole('button', { name: providerName, exact: true });\n }\n\n public async pinProvider(providerName: string, pin: boolean): Promise<void> {\n const barProviderButton = await this.getProviderButton(providerName);\n if ((await barProviderButton.isVisible()) === pin) {\n return;\n }\n\n const pinMenuProviderButton = this.pinMenu.getByRole('button', { name: providerName });\n await playExpect(this.pinMenu).not.toBeVisible({ timeout: 5000 });\n\n await playExpect(this.pinProvidersButton).toBeVisible();\n await this.pinProvidersButton.click();\n await playExpect(this.pinMenu).toBeVisible({ timeout: 5000 });\n await playExpect(pinMenuProviderButton).toBeVisible();\n\n await pinMenuProviderButton.click();\n await playExpect.poll(async () => await barProviderButton.isVisible()).toEqual(pin);\n\n //close the menu\n await this.pinProvidersButton.click();\n await playExpect(this.pinMenu).not.toBeVisible({ timeout: 5000 });\n }\n\n public async isProviderResourceRunning(providerName: string, resourceName: string): Promise<boolean> {\n const barProviderButton = await this.getProviderButton(providerName);\n await playExpect(barProviderButton).toBeVisible();\n const providerArea = barProviderButton.locator('..').locator('..');\n const providerTooltip = providerArea.getByLabel('tooltip');\n\n await barProviderButton.hover();\n await playExpect(providerTooltip).toBeVisible();\n return (await providerTooltip.innerText()).includes('Running\\n: ' + resourceName);\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { ResourceElementActions } from '/@/model/core/operations';\nimport { ContainerState, ResourceElementState } from '/@/model/core/states';\nimport type { KindClusterOptions } from '/@/model/core/types';\nimport { CreateKindClusterPage } from '/@/model/pages/create-kind-cluster-page';\nimport { ResourceConnectionCardPage } from '/@/model/pages/resource-connection-card-page';\nimport { ResourceDetailsPage } from '/@/model/pages/resource-details-page';\nimport { ResourcesPage } from '/@/model/pages/resources-page';\nimport { VolumesPage } from '/@/model/pages/volumes-page';\nimport { NavigationBar } from '/@/model/workbench/navigation';\nimport { StatusBar } from '/@/model/workbench/status-bar';\nimport { getVolumeNameForContainer } from '/@/utility/operations';\n\nexport async function createKindCluster(\n page: Page,\n clusterName: string,\n timeout = 300_000,\n { configFilePath, providerType, httpPort, httpsPort, useIngressController, containerImage }: KindClusterOptions = {},\n): Promise<void> {\n return test.step(`Create Kind cluster with settings: configFilePath=${configFilePath}, \n providerType=${providerType}, httpPort=${httpPort},\n httpsPort=${httpsPort}, ingressController=${useIngressController}`, async () => {\n const navigationBar = new NavigationBar(page);\n const statusBar = new StatusBar(page);\n const kindResourceCard = new ResourceConnectionCardPage(page, 'kind', clusterName);\n const createKindClusterPage = new CreateKindClusterPage(page);\n\n const settingsPage = await navigationBar.openSettings();\n const resourcesPage = await settingsPage.openTabPage(ResourcesPage);\n await playExpect(resourcesPage.heading).toBeVisible({ timeout: 10_000 });\n await playExpect.poll(async () => resourcesPage.resourceCardIsVisible('kind')).toBeTruthy();\n await playExpect(kindResourceCard.createButton).toBeVisible();\n\n if (await kindResourceCard.doesResourceElementExist()) {\n if ((await kindResourceCard.resourceElementConnectionStatus.textContent()) !== ResourceElementState.Running) {\n console.log(`Kind cluster [${clusterName}] already present, but not running. Delete the cluster...`);\n await deleteCluster(page);\n } else {\n console.log(`Kind cluster [${clusterName}] already present, skipping creation.`);\n return;\n }\n }\n\n await kindResourceCard.createButton.click();\n await createKindClusterPage.createKindCluster(\n clusterName,\n {\n configFilePath: configFilePath,\n providerType: providerType,\n httpPort: httpPort,\n httpsPort: httpsPort,\n useIngressController: useIngressController,\n containerImage: containerImage,\n },\n timeout,\n );\n await playExpect(kindResourceCard.resourceElement).toBeVisible();\n await playExpect(kindResourceCard.resourceElementConnectionStatus).toHaveText(ResourceElementState.Running, {\n timeout: 15_000,\n });\n await statusBar.validateKubernetesContext(`kind-${clusterName}`);\n });\n}\n\nexport async function deleteCluster(\n page: Page,\n resourceName = 'kind',\n containerName = 'kind-cluster-control-plane',\n clusterName = 'kind-cluster',\n timeout = 50_000,\n): Promise<void> {\n return test.step(`Delete ${resourceName} cluster`, async () => {\n const volumeName = await getVolumeNameForContainer(page, containerName);\n const navigationBar = new NavigationBar(page);\n const resourceCard = new ResourceConnectionCardPage(page, resourceName, clusterName);\n\n await navigationBar.openSettings();\n const resourcesPage = new ResourcesPage(page);\n await playExpect(resourcesPage.heading).toBeVisible({ timeout: 10_000 });\n if (!(await resourceCard.doesResourceElementExist())) {\n console.log(`Kind cluster [${clusterName}] not present, skipping deletion.`);\n return;\n }\n\n await resourceCard.performConnectionAction(ResourceElementActions.Stop);\n await playExpect(resourceCard.resourceElementConnectionStatus).toHaveText(ResourceElementState.Off, {\n timeout: timeout,\n });\n await resourceCard.performConnectionAction(ResourceElementActions.Delete);\n await playExpect(resourceCard.markdownContent).toBeVisible({\n timeout: timeout,\n });\n await validateClusterResourcesDeletion(page, clusterName, containerName, volumeName);\n });\n}\n\nexport async function checkClusterResources(page: Page, containerName: string): Promise<void> {\n return test.step(`Check container '${containerName}' and volume cluster resources.`, async () => {\n const navigationBar = new NavigationBar(page);\n const containersPage = await navigationBar.openContainers();\n await playExpect.poll(async () => containersPage.containerExists(containerName)).toBeTruthy();\n const containerDetailsPage = await containersPage.openContainersDetails(containerName);\n await playExpect.poll(async () => await containerDetailsPage.getState()).toEqual(ContainerState.Running);\n\n const volumesPage = new VolumesPage(page);\n const volumeName = await getVolumeNameForContainer(page, containerName);\n if (!volumeName) {\n throw new Error(`Volume name for container \"${containerName}\" is not defined.`);\n }\n const volumeDetailsPage = await volumesPage.openVolumeDetails(volumeName);\n await playExpect.poll(async () => await volumeDetailsPage.isUsed()).toBeTruthy();\n });\n}\n\nexport async function resourceConnectionAction(\n page: Page,\n resourceCard: ResourceConnectionCardPage,\n resourceConnectionAction: ResourceElementActions,\n expectedResourceState: ResourceElementState,\n timeout = 30_000,\n): Promise<void> {\n return test.step(`Performs \"${resourceConnectionAction}\" action, expects \"${expectedResourceState}\" state.`, async () => {\n const navigationBar = new NavigationBar(page);\n await navigationBar.openSettings();\n await resourceCard.performConnectionAction(resourceConnectionAction);\n if (resourceConnectionAction === ResourceElementActions.Restart) {\n const stopButton = resourceCard.resourceElementConnectionActions.getByRole('button', {\n name: ResourceElementActions.Stop,\n exact: true,\n });\n await playExpect(stopButton).toBeEnabled({ timeout: timeout });\n }\n await playExpect(resourceCard.resourceElementConnectionStatus).toHaveText(expectedResourceState, {\n timeout: timeout,\n });\n });\n}\n\nexport async function resourceConnectionActionDetails(\n page: Page,\n resourceCard: ResourceConnectionCardPage,\n resourceName: string,\n resourceConnectionAction: ResourceElementActions,\n expectedResourceState: ResourceElementState,\n timeout = 30_000,\n): Promise<void> {\n return test.step(`Performs a connection action '${resourceConnectionAction}' on the resource from the details page, verifies the expected resource state '${expectedResourceState}'`, async () => {\n const navigationBar = new NavigationBar(page);\n const resourceDetailsPage = new ResourceDetailsPage(page, resourceName);\n\n try {\n await playExpect(resourceDetailsPage.heading).toBeVisible();\n } catch {\n const settingsBar = await navigationBar.openSettings();\n const resourcesPage = await settingsBar.openTabPage(ResourcesPage);\n await playExpect(resourcesPage.heading).toBeVisible({ timeout: 10_000 });\n await playExpect(resourceCard.resourceElementDetailsButton).toBeEnabled();\n await resourceCard.resourceElementDetailsButton.click();\n }\n\n await resourceDetailsPage.performConnectionActionDetails(resourceConnectionAction);\n if (resourceConnectionAction === ResourceElementActions.Restart) {\n const stopButton = resourceDetailsPage.controlActions.getByRole('button', {\n name: ResourceElementActions.Stop,\n exact: true,\n });\n await playExpect(stopButton).toBeEnabled({ timeout: timeout });\n }\n await playExpect(resourceDetailsPage.resourceStatus).toHaveText(expectedResourceState, {\n timeout: timeout,\n });\n });\n}\n\nexport async function deleteClusterFromDetails(\n page: Page,\n resourceName = 'kind',\n containerName = 'kind-cluster-control-plane',\n clusterName = 'kind-cluster',\n timeout = 30_000,\n): Promise<void> {\n return test.step(`Deletes the '${clusterName}' cluster from the details page`, async () => {\n const navigationBar = new NavigationBar(page);\n const volumeName = await getVolumeNameForContainer(page, containerName);\n\n const settingsBar = await navigationBar.openSettings();\n const resourcesPage = await settingsBar.openTabPage(ResourcesPage);\n const resourceCard = new ResourceConnectionCardPage(page, resourceName, clusterName);\n await playExpect(resourcesPage.heading).toBeVisible({ timeout: 10_000 });\n if (!(await resourceCard.doesResourceElementExist())) {\n console.log(`Cluster [${clusterName}] not present, skipping deletion.`);\n return;\n }\n await playExpect(resourceCard.resourceElementDetailsButton).toBeEnabled();\n await resourceCard.resourceElementDetailsButton.click();\n\n const resourceDetails = new ResourceDetailsPage(page, clusterName);\n await playExpect(resourceDetails.heading).toBeVisible();\n await resourceDetails.performConnectionActionDetails(ResourceElementActions.Stop);\n await playExpect(resourceDetails.resourceStatus).toHaveText(ResourceElementState.Off, {\n timeout: timeout,\n });\n await resourceDetails.performConnectionActionDetails(ResourceElementActions.Delete);\n\n await validateClusterResourcesDeletion(page, clusterName, containerName, volumeName);\n });\n}\n\nexport async function validateClusterResourcesDeletion(\n page: Page,\n clusterName: string,\n containerName: string,\n volumeName: string,\n timeout = 20_000,\n): Promise<void> {\n return test.step(`Validates that resources associated with the deleted '${clusterName}' cluster are removed`, async () => {\n const navigationBar = new NavigationBar(page);\n const containersPage = await navigationBar.openContainers();\n\n await playExpect(containersPage.heading).toBeVisible();\n await playExpect\n .poll(async () => containersPage.containerExists(containerName), {\n timeout: timeout,\n })\n .toBeFalsy();\n\n const volumePage = await navigationBar.openVolumes();\n await playExpect(volumePage.heading).toBeVisible();\n await playExpect\n .poll(async () => await volumePage.waitForVolumeDelete(volumeName), {\n timeout: timeout,\n })\n .toBeTruthy();\n });\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { waitWhile } from '/@/utility/wait';\n\nimport { BasePage } from './base-page';\nimport { DashboardPage } from './dashboard-page';\n\nexport class WelcomePage extends BasePage {\n readonly welcomeMessage: Locator;\n readonly telemetryConsent: Locator;\n readonly skipOnBoarding: Locator;\n readonly checkLoader: Locator;\n readonly startOnboarding: Locator;\n readonly onboardingMessageStatus: Locator;\n readonly nextStepButton: Locator;\n readonly cancelSetupButton: Locator;\n readonly otherVersionButton: Locator;\n readonly dropDownDialog: Locator;\n readonly latestVersionFromDropDown: Locator;\n readonly confirmationPopUp: Locator;\n readonly okButtonPopup: Locator;\n readonly markdownContentLocator: Locator;\n\n constructor(page: Page) {\n super(page);\n this.welcomeMessage = page.getByText('Welcome to Podman Desktop');\n this.telemetryConsent = page.getByLabel('Enable telemetry');\n this.skipOnBoarding = page.getByRole('button', {\n name: 'Skip',\n exact: true,\n });\n this.checkLoader = this.page.getByRole('heading', {\n name: 'Initializing...',\n });\n this.startOnboarding = page.getByRole('button', {\n name: 'Start onboarding',\n exact: true,\n });\n this.onboardingMessageStatus = this.page.getByLabel('Onboarding Status Message');\n this.nextStepButton = this.page.getByRole('button', { name: 'Next Step' });\n this.cancelSetupButton = this.page.getByRole('button', { name: 'Cancel Setup' });\n this.markdownContentLocator = this.page.getByLabel('markdown-content');\n this.otherVersionButton = this.markdownContentLocator.getByText('Want to download a different version?');\n this.dropDownDialog = this.page.getByLabel('drop-down-dialog');\n this.latestVersionFromDropDown = this.dropDownDialog.getByRole('button').first();\n this.confirmationPopUp = page.getByRole('dialog', { name: 'Skip Setup Popup' });\n this.okButtonPopup = this.confirmationPopUp.getByRole('button', { name: 'OK' });\n }\n\n async turnOffTelemetry(): Promise<void> {\n return test.step('Turn off Telemetry', async () => {\n // Extensions load sequentially (faster speed but can block ui)\n await playExpect(this.startOnboarding).toBeEnabled({ timeout: 45_000 });\n\n if (await this.telemetryConsent.isChecked()) {\n await playExpect(this.telemetryConsent).toBeChecked();\n await this.telemetryConsent.uncheck({ force: true });\n }\n\n await playExpect(this.telemetryConsent).not.toBeChecked();\n });\n }\n\n async closeWelcomePage(): Promise<DashboardPage> {\n return test.step('Close Welcome Page', async () => {\n await playExpect(this.skipOnBoarding).toBeEnabled();\n await this.skipOnBoarding.click({ force: true });\n try {\n await waitWhile(async () => await this.skipOnBoarding.isVisible(), { timeout: 5_000, diff: 250 });\n } catch (err) {\n console.log('Skip Onboarding button is still visible, retrying to press the button');\n await this.skipOnBoarding.click({ force: true });\n }\n return new DashboardPage(this.page);\n });\n }\n\n /**\n * Waits for application to initialize, turn off telemetry and closes welcome page\n */\n async handleWelcomePage(skipIfNotPresent: boolean): Promise<void> {\n return test.step('Handle Welcome Page', async () => {\n if (skipIfNotPresent) {\n try {\n await this.skipOnBoarding.waitFor({ state: 'visible' });\n } catch (err) {\n if ((err as Error).name !== 'TimeoutError') {\n throw err;\n }\n return;\n }\n }\n\n await this.turnOffTelemetry();\n await this.closeWelcomePage();\n await playExpect(this.welcomeMessage).toHaveCount(0);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Page } from '@playwright/test';\nimport { test as base } from '@playwright/test';\n\nimport { WelcomePage } from '/@/model/pages/welcome-page';\nimport { NavigationBar } from '/@/model/workbench/navigation';\nimport { StatusBar } from '/@/model/workbench/status-bar';\nimport { Runner } from '/@/runner/podman-desktop-runner';\nimport { RunnerOptions } from '/@/runner/runner-options';\n\nexport type TestFixtures = {\n runner: Runner;\n navigationBar: NavigationBar;\n welcomePage: WelcomePage;\n page: Page;\n statusBar: StatusBar;\n};\n\nexport type FixtureOptions = {\n runnerOptions: RunnerOptions;\n};\n\nexport const test = base.extend<TestFixtures & FixtureOptions>({\n runnerOptions: [new RunnerOptions(), { option: true }],\n runner: async ({ runnerOptions }, use) => {\n const runner = await Runner.getInstance({ runnerOptions });\n await use(runner);\n },\n page: async ({ runner }, use) => {\n await use(runner.getPage());\n },\n navigationBar: async ({ page }, use) => {\n const navigationBar = new NavigationBar(page);\n await use(navigationBar);\n },\n welcomePage: async ({ page }, use) => {\n const welcomePage = new WelcomePage(page);\n await use(welcomePage);\n },\n statusBar: async ({ page }, use) => {\n const statusBar = new StatusBar(page);\n await use(statusBar);\n },\n});\nexport { expect } from '@playwright/test';\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { execSync } from 'node:child_process';\n\nimport type { Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport type { KubernetesResourceState } from '/@/model/core/states';\nimport { KubernetesResources } from '/@/model/core/types';\nimport { ContainerDetailsPage } from '/@/model/pages/container-details-page';\nimport { NavigationBar } from '/@/model/workbench/navigation';\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nexport async function deployContainerToCluster(\n page: Page,\n containerName: string,\n kubernetesContext: string,\n deployedPodName: string,\n): Promise<void> {\n return test.step(`Deploy '${containerName}' and verify pod '${deployedPodName}' appears in the Kubernetes environment`, async () => {\n const containerDetailsPage = new ContainerDetailsPage(page, containerName);\n const navigationBar = new NavigationBar(page);\n\n await playExpect(containerDetailsPage.heading).toBeVisible();\n const deployToKubernetesPage = await containerDetailsPage.openDeployToKubernetesPage();\n await deployToKubernetesPage.deployPod(containerName, { useKubernetesServices: true }, kubernetesContext);\n\n const kubernetesBar = await navigationBar.openKubernetes();\n const kubernetesPodsPage = await kubernetesBar.openTabPage(KubernetesResources.Pods);\n await playExpect\n .poll(async () => kubernetesPodsPage.getRowByName(deployedPodName), { timeout: 15_000 })\n .toBeTruthy();\n });\n}\n\nexport async function createKubernetesResource(\n page: Page,\n resourceType: KubernetesResources,\n resourceName: string,\n resourceYamlPath: string,\n): Promise<void> {\n return test.step(`Create ${resourceType} kubernetes resource: ${resourceName}`, async () => {\n const navigationBar = new NavigationBar(page);\n\n // workaround for missing option to deploy kube yaml into cluster via UI\n // test kubectl is present\n try {\n // eslint-disable-next-line sonarjs/no-os-command-from-path\n const version = execSync('kubectl version').toString();\n console.log(`Kubectl version stdout: ${version}`);\n } catch (error) {\n throw new Error(`Kubectl is not installed: ${error}`);\n }\n try {\n // eslint-disable-next-line sonarjs/os-command\n const kubectlApply = execSync(`kubectl apply -f ${resourceYamlPath}`).toString();\n console.log(`Kube yaml ${resourceYamlPath} applied successfully via cli: ${kubectlApply}`);\n } catch (error) {\n throw new Error(`Error encountered when trying to apply kube yaml: ${error}`);\n }\n const kubernetesBar = await navigationBar.openKubernetes();\n const kubernetesResourcePage = await kubernetesBar.openTabPage(resourceType);\n await playExpect(kubernetesResourcePage.heading).toBeVisible();\n await playExpect.poll(async () => kubernetesResourcePage.getRowByName(resourceName)).toBeTruthy();\n });\n}\n\nexport async function deleteKubernetesResource(\n page: Page,\n resourceType: KubernetesResources,\n resourceName: string,\n timeout = 30_000,\n): Promise<void> {\n return test.step(`Delete ${resourceType} kubernetes resource: ${resourceName}`, async () => {\n const navigationBar = new NavigationBar(page);\n\n const kubernetesBar = await navigationBar.openKubernetes();\n const kubernetesResourcePage = await kubernetesBar.openTabPage(resourceType);\n await kubernetesResourcePage.deleteKubernetesResource(resourceName);\n await handleConfirmationDialog(page);\n await playExpect\n .poll(async () => await kubernetesResourcePage.getRowByName(resourceName), { timeout: timeout })\n .not.toBeTruthy();\n });\n}\n\nexport async function checkDeploymentReplicasInfo(\n page: Page,\n resourceType: KubernetesResources,\n resourceName: string,\n expectedReplicaCount: number,\n): Promise<void> {\n const navigationBar = new NavigationBar(page);\n const kubernetesBar = await navigationBar.openKubernetes();\n\n const kubernetesResourcePage = await kubernetesBar.openTabPage(resourceType);\n const kubernetesResourceDetails = await kubernetesResourcePage.openResourceDetails(resourceName, resourceType);\n await playExpect(kubernetesResourceDetails.heading).toBeVisible();\n const summaryTab = await kubernetesResourceDetails.activateTab('Summary');\n await playExpect(summaryTab.tabContent).toContainText(\n `Desired: ${expectedReplicaCount}, Updated: ${expectedReplicaCount}, Total: ${expectedReplicaCount}, Available: ${expectedReplicaCount}, Unavailable: N/A`,\n );\n}\n\nexport async function checkKubernetesResourceState(\n page: Page,\n resourceType: KubernetesResources,\n resourceName: string,\n expectedResourceState: KubernetesResourceState,\n timeout = 90_000,\n): Promise<void> {\n return test.step(`Check ${resourceType} kubernetes resource state, should be ${expectedResourceState}`, async () => {\n const navigationBar = new NavigationBar(page);\n const kubernetesBar = await navigationBar.openKubernetes();\n\n const kubernetesResourcePage = await kubernetesBar.openTabPage(resourceType);\n const kubernetesResourceDetails = await kubernetesResourcePage.openResourceDetails(\n resourceName,\n resourceType,\n timeout,\n );\n await playExpect(kubernetesResourceDetails.heading).toBeVisible();\n await playExpect\n .poll(async () => kubernetesResourceDetails.getState(), { timeout: timeout })\n .toBe(expectedResourceState);\n });\n}\n\nexport async function editDeploymentYamlFile(\n page: Page,\n resourceType: KubernetesResources,\n deploymentName: string,\n currentReplicaCount = 3,\n updatedReplicaCount = 5,\n): Promise<void> {\n return test.step('Change deployment kubernetes cluster resource', async () => {\n const navigationBar = new NavigationBar(page);\n const kubernetesBar = await navigationBar.openKubernetes();\n await playExpect\n .poll(async () => await countKubernetesPodReplicas(page, deploymentName), {\n timeout: 60_000,\n })\n .toBe(currentReplicaCount);\n\n const deploymentsPage = await kubernetesBar.openTabPage(resourceType);\n await playExpect(deploymentsPage.heading).toBeVisible();\n const deploymentDetails = await deploymentsPage.openResourceDetails(deploymentName, resourceType);\n await playExpect(deploymentDetails.heading).toBeVisible();\n await deploymentDetails.editKubernetsYamlFile(\n `replicas: ${currentReplicaCount}`,\n `replicas: ${updatedReplicaCount}`,\n );\n\n await playExpect\n .poll(async () => await countKubernetesPodReplicas(page, deploymentName), {\n timeout: 60_000,\n })\n .toBe(updatedReplicaCount);\n });\n}\n\nexport async function countKubernetesPodReplicas(page: Page, expectedPodName: string): Promise<number> {\n return test.step(`Count pod replicas: ${expectedPodName}`, async () => {\n const navigationBar = new NavigationBar(page);\n const kubernetesBar = await navigationBar.openKubernetes();\n const kubernetesPodsPage = await kubernetesBar.openTabPage(KubernetesResources.Pods);\n\n let counter = 0;\n const rows = await kubernetesPodsPage.getAllTableRows();\n for (let i = rows.length - 1; i > 0; i--) {\n const podName = await rows[i].getByRole('cell').nth(3).getByRole('button').textContent();\n if (podName?.includes(expectedPodName)) {\n counter += 1;\n }\n }\n return counter;\n });\n}\n\nexport async function configurePortForwarding(\n page: Page,\n resourceType: KubernetesResources,\n resourceName: string,\n): Promise<void> {\n return test.step(`Configure port forwarding for ${resourceName} ${resourceType} k8s resource`, async () => {\n const navigationBar = new NavigationBar(page);\n\n const kubernetesBar = await navigationBar.openKubernetes();\n const kubernetesResourcePage = await kubernetesBar.openTabPage(resourceType);\n const kubernetesResourceDetailsPage = await kubernetesResourcePage.openResourceDetails(resourceName, resourceType);\n await kubernetesResourceDetailsPage.activateTab('Summary');\n const forwardButton = page.getByRole('button', { name: 'Forward...' });\n await playExpect(forwardButton).toBeVisible();\n await forwardButton.click();\n\n const openInBrowserButton = page.getByRole('button', { name: 'Open', exact: true });\n const removeConfigurationButton = page.getByRole('button', { name: 'Remove' });\n await playExpect(openInBrowserButton).toBeVisible({ timeout: 10_000 });\n await playExpect(removeConfigurationButton).toBeVisible();\n });\n}\n\nexport async function verifyPortForwardingConfiguration(\n page: Page,\n configurationName: string,\n localPort: number,\n remotePort: number,\n): Promise<void> {\n return test.step(`Verify port forwarding for ${configurationName} configuration: local port ${localPort}, remote port ${remotePort}`, async () => {\n const navigationBar = new NavigationBar(page);\n const kubernetesBar = await navigationBar.openKubernetes();\n const portForwardingPage = await kubernetesBar.openTabPage(KubernetesResources.PortForwarding);\n await playExpect(portForwardingPage.heading).toBeVisible();\n const configurationRow = await portForwardingPage.fetchKubernetesResource(configurationName);\n\n const localPortCell = await portForwardingPage.geAttributeByRow(\n configurationRow,\n 'Local Port',\n KubernetesResources.PortForwarding,\n );\n const remotePortCell = await portForwardingPage.geAttributeByRow(\n configurationRow,\n 'Remote Port',\n KubernetesResources.PortForwarding,\n );\n playExpect(Number(await localPortCell.textContent())).toBe(localPort);\n playExpect(Number(await remotePortCell.textContent())).toBe(remotePort);\n });\n}\n\nexport async function verifyLocalPortResponse(forwardAddress: string, responseMessage: string): Promise<void> {\n return test.step('Verify local port response', async () => {\n playExpect.poll(\n async () => {\n const response: Response = await fetch(forwardAddress, { cache: 'no-store' });\n const blob: Blob = await response.blob();\n const text: string = await blob.text();\n playExpect(text).toContain(responseMessage);\n },\n { timeout: 20_000, intervals: [1_000, 3_000, 5_000, 15_000] },\n );\n });\n}\n\nexport async function monitorPodStatusInClusterContainer(\n page: Page,\n containerName: string,\n command: string,\n timeout = 160_000,\n): Promise<void> {\n const navigationBar = new NavigationBar(page);\n const containersPage = await navigationBar.openContainers();\n await playExpect(containersPage.heading).toBeVisible();\n await playExpect.poll(async () => containersPage.getContainerRowByName(containerName)).toBeTruthy();\n const containerDetailsPage = await containersPage.openContainersDetails(containerName);\n\n await playExpect\n .poll(\n async () => {\n await containerDetailsPage.executeCommandInTerminal(command);\n const result = await checkContourPodsInTerminal(page, containerName);\n await containerDetailsPage.executeCommandInTerminal('clear');\n return result;\n },\n { timeout: timeout },\n )\n .toBeTruthy();\n}\n\nasync function checkContourPodsInTerminal(page: Page, containerName: string): Promise<boolean> {\n const containerDetailsPage = new ContainerDetailsPage(page, containerName);\n await containerDetailsPage.activateTab('Terminal');\n await playExpect(containerDetailsPage.terminalContent).toBeVisible();\n await page.waitForTimeout(2_000);\n\n try {\n await playExpect(containerDetailsPage.terminalContent).toContainText(/contour-\\S+\\s+1\\/1\\s+Running\\s+\\d+\\s+\\S+/);\n await playExpect(containerDetailsPage.terminalContent).toContainText(\n /contour-certgen-\\S+\\s+0\\/1\\s+Completed\\s+\\d+\\s+\\S+/,\n );\n await playExpect(containerDetailsPage.terminalContent).toContainText(/envoy-\\S+\\s+2\\/2\\s+Running\\s+\\d+\\s+\\S+/);\n return true;\n } catch {\n return false;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { PodmanVirtualizationProviders } from '/@/model/core/types';\nimport { isMac, isWindows } from '/@/utility/platform';\n\nexport const envProvider = process.env.CONTAINERS_MACHINE_PROVIDER;\n\nconst PROVIDER_MAP: Record<string, PodmanVirtualizationProviders> = {\n wsl: PodmanVirtualizationProviders.WSL,\n hyperv: PodmanVirtualizationProviders.HyperV,\n applehv: PodmanVirtualizationProviders.AppleHV,\n libkrun: PodmanVirtualizationProviders.LibKrun,\n qemu: PodmanVirtualizationProviders.Qemu,\n};\n\nexport function getVirtualizationProvider(): PodmanVirtualizationProviders | undefined {\n return envProvider ? PROVIDER_MAP[envProvider?.toLowerCase()] : undefined;\n}\n\nexport function getDefaultVirtualizationProvider(): PodmanVirtualizationProviders {\n if (isWindows) {\n return PodmanVirtualizationProviders.WSL;\n }\n\n if (isMac) {\n return PodmanVirtualizationProviders.LibKrun;\n }\n\n return PodmanVirtualizationProviders.Native;\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\n// Extension locators definition\nexport interface ExtensionType {\n extensionName: string;\n extensionFullName: string;\n extensionLabel: string;\n extensionFullLabel: string;\n}\n\n// Catalog/External extensions\nexport const minikubeExtension: ExtensionType = {\n extensionName: 'minikube',\n extensionFullName: 'minikube extension',\n extensionLabel: 'minikube',\n extensionFullLabel: 'podman-desktop.minikube',\n};\n\nexport const podmanAILabExtension: ExtensionType = {\n extensionName: 'Podman AI Lab',\n extensionFullName: 'Podman AI Lab extension',\n extensionLabel: 'ai-lab',\n extensionFullLabel: 'redhat.ai-lab',\n};\n\nexport const extensionsPackExtension: ExtensionType = {\n extensionName: 'Red Hat Extension Pack',\n extensionFullName: 'Red Hat Extension Pack extension',\n extensionLabel: 'redhat-pack',\n extensionFullLabel: 'redhat.redhat-pack',\n};\n\nexport const bootcExtension: ExtensionType = {\n extensionName: 'Bootable Container',\n extensionFullName: 'Bootable Container extension',\n extensionLabel: 'bootc',\n extensionFullLabel: 'redhat.bootc',\n};\n\nexport const developerSandboxExtension: ExtensionType = {\n extensionName: 'Developer Sandbox',\n extensionFullName: 'Developer Sandbox extension',\n extensionLabel: 'redhat-sandbox',\n extensionFullLabel: 'redhat.redhat-sandbox',\n};\n\nexport const imageLayersExplorerExtension: ExtensionType = {\n extensionName: 'Image Layers Explorer',\n extensionFullName: 'Image Layers Explorer extension',\n extensionLabel: 'layers-explorer',\n extensionFullLabel: 'podman-desktop.layers-explorer',\n};\n\nexport const podmanQuadletExtension: ExtensionType = {\n extensionName: 'Podman Quadlet',\n extensionFullName: 'Podman Quadlet extension',\n extensionLabel: 'quadlet',\n extensionFullLabel: 'podman-desktop.quadlet',\n};\n\nexport const ssoExtension: ExtensionType = {\n extensionName: 'Red Hat Authentication',\n extensionFullName: 'Red Hat Authentication extension',\n extensionLabel: 'redhat-authentication',\n extensionFullLabel: 'redhat.redhat-authentication',\n};\n\nexport const openshiftCheckerExtension: ExtensionType = {\n extensionName: 'Red Hat OpenShift Checker',\n extensionFullName: 'Red Hat OpenShift Checker extension',\n extensionLabel: 'openshift-checker',\n extensionFullLabel: 'redhat.openshift-checker',\n};\n\nexport const openshiftLocalExtension: ExtensionType = {\n extensionName: 'Red Hat OpenShift Local',\n extensionFullName: 'Red Hat OpenShift Local extension',\n extensionLabel: 'openshift-local',\n extensionFullLabel: 'redhat.openshift-local',\n};\n\n// external contributor\nexport const headlampExtension: ExtensionType = {\n extensionName: 'Headlamp',\n extensionFullName: 'Headlamp extension',\n extensionLabel: 'Headlamp',\n extensionFullLabel: 'Headlamp',\n};\n\n// Built-in extensions\nexport const composeExtension: ExtensionType = {\n extensionName: 'Compose',\n extensionFullName: 'Compose extension',\n extensionLabel: 'compose',\n extensionFullLabel: 'podman-desktop.compose',\n};\n\nexport const dockerExtension: ExtensionType = {\n extensionName: 'Docker',\n extensionFullName: 'Docker extension',\n extensionLabel: 'docker',\n extensionFullLabel: 'podman-desktop.docker',\n};\n\nexport const kindExtension: ExtensionType = {\n extensionName: 'Kind',\n extensionFullName: 'Kind extension',\n extensionLabel: 'kind',\n extensionFullLabel: 'podman-desktop.kind',\n};\n\nexport const kubeContextExtension: ExtensionType = {\n extensionName: 'Kube Context',\n extensionFullName: 'Kube Context extension',\n extensionLabel: 'kube-context',\n extensionFullLabel: 'podman-desktop.kube-context',\n};\n\nexport const kubectlCLIExtension: ExtensionType = {\n extensionName: 'kubectl CLI',\n extensionFullName: 'kubectl CLI extension',\n extensionLabel: 'podman-desktop.kubectl-cli',\n extensionFullLabel: 'podman-desktop.kubectl-cli',\n};\n\nexport const limaExtension: ExtensionType = {\n extensionName: 'Lima',\n extensionFullName: 'Lima extension',\n extensionLabel: 'lima',\n extensionFullLabel: 'podman-desktop.lima',\n};\n\nexport const podmanExtension: ExtensionType = {\n extensionName: 'Podman',\n extensionFullName: 'Podman extension',\n extensionLabel: 'podman',\n extensionFullLabel: 'podman-desktop.podman',\n};\n\nexport const registriesExtension: ExtensionType = {\n extensionName: 'Registries',\n extensionFullName: 'Registries extension',\n extensionLabel: 'registries',\n extensionFullLabel: 'podman-desktop.registries',\n};\n\nexport const openshiftDockerExtension: ExtensionType = {\n extensionName: 'OpenShift',\n extensionFullName: 'OpenShift extension',\n extensionLabel: 'OpenShift',\n extensionFullLabel: 'OpenShift',\n};\n\nexport const extensionsBuiltInList = [\n composeExtension,\n dockerExtension,\n kindExtension,\n kubeContextExtension,\n kubectlCLIExtension,\n podmanAILabExtension,\n registriesExtension,\n];\nexport const extensionsExternalList = [\n minikubeExtension,\n podmanAILabExtension,\n extensionsPackExtension,\n bootcExtension,\n developerSandboxExtension,\n imageLayersExplorerExtension,\n podmanQuadletExtension,\n ssoExtension,\n openshiftCheckerExtension,\n openshiftLocalExtension,\n];\nexport const extensionsInstallationSmokeList = [\n bootcExtension,\n podmanQuadletExtension,\n openshiftDockerExtension,\n imageLayersExplorerExtension,\n];\nexport const extensionsAllExternalList = [...extensionsExternalList, headlampExtension];\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { SettingsPage } from './settings-page';\n\nexport class AuthenticationPage extends SettingsPage {\n readonly main: Locator;\n readonly header: Locator;\n readonly heading: Locator;\n readonly content: Locator;\n readonly providersList: Locator;\n\n constructor(page: Page) {\n super(page, 'Authentication');\n this.main = page.getByRole('region', { name: 'Authentication' });\n this.header = this.main.getByRole('region', { name: 'Header' });\n this.heading = this.header.getByRole('heading', { name: 'Title', exact: true });\n this.content = this.main.getByRole('region', { name: 'Content' });\n this.providersList = this.content.getByRole('list');\n }\n\n public getProvider(providerName: string): Locator {\n return this.providersList.getByRole('listitem', { name: providerName });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport class CommandPalette extends BasePage {\n readonly commandPaletteInputField: Locator;\n constructor(page: Page) {\n super(page);\n this.commandPaletteInputField = this.page.getByLabel('Command palette command input', { exact: true });\n }\n\n async executeCommand(command: string): Promise<void> {\n if (!command) {\n throw new Error('Command is required');\n }\n\n if (!(await this.commandPaletteInputField.isVisible())) {\n await this.page.keyboard.press('F1');\n }\n\n await playExpect(this.commandPaletteInputField).toBeVisible();\n await this.commandPaletteInputField.pressSequentially(command, { delay: 25 });\n await this.commandPaletteInputField.press('Enter');\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport class OnboardingPage extends BasePage {\n readonly mainPage: Locator;\n readonly header: Locator;\n readonly skipSetupButton: Locator;\n readonly onboardingComponent: Locator;\n readonly onboardingStatusMessage: Locator;\n readonly nextInfoMessage: Locator;\n readonly nextStepButton: Locator;\n readonly cancelSetupButtion: Locator;\n\n constructor(page: Page) {\n super(page);\n this.mainPage = page.getByRole('region', { name: 'Onboarding Body' });\n this.header = this.mainPage.getByRole('heading', { name: 'Header' });\n this.skipSetupButton = this.header.getByRole('button', { name: 'Skip this entire setup' });\n this.onboardingComponent = this.mainPage.getByLabel('Onboarding Component');\n this.onboardingStatusMessage = this.mainPage.getByLabel('Onboarding Status Message');\n this.nextInfoMessage = this.mainPage.getByLabel('Next Info Message');\n this.nextStepButton = this.mainPage.getByRole('button', { name: 'Next Step' });\n this.cancelSetupButtion = this.mainPage.getByRole('button', { name: 'Cancel Setup' });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from 'playwright';\n\nimport { OnboardingPage } from '/@/model/pages/onboarding-page';\n\nexport class ComposeOnboardingPage extends OnboardingPage {\n readonly heading: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = this.page.getByRole('heading', { name: 'Compose Setup Header' });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from 'playwright';\n\nimport { ComposeOnboardingPage } from './compose-onboarding-page';\n\nexport class ComposeFailedPage extends ComposeOnboardingPage {\n readonly tryAgainButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.tryAgainButton = this.mainPage.getByRole('button', { name: 'Try again' });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from 'playwright';\n\nimport { ComposeOnboardingPage } from './compose-onboarding-page';\n\nexport class ComposeLocalInstallPage extends ComposeOnboardingPage {\n readonly wideDownloadAvailableMessage: Locator;\n\n constructor(page: Page) {\n super(page);\n this.wideDownloadAvailableMessage = this.mainPage.getByText(\n 'The next step will install Compose system-wide. You will be prompted for system',\n );\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from 'playwright';\n\nimport { ComposeOnboardingPage } from './compose-onboarding-page';\n\nexport class ComposeVersionPage extends ComposeOnboardingPage {\n readonly versionStatusMessage: Locator;\n\n constructor(page: Page) {\n super(page);\n this.versionStatusMessage = this.mainPage.getByText(\n /Compose will be downloaded in the next step \\(Version v[0-9.]+\\). Want to download/,\n { exact: true },\n );\n }\n\n async getVersion(): Promise<string> {\n const versionInfoText = await this.versionStatusMessage.textContent();\n let composeVersion = '';\n\n const matches = versionInfoText?.match(/v\\d+(\\.\\d+)+/);\n if (matches) {\n composeVersion = matches[0];\n }\n return composeVersion;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from 'playwright';\n\nimport { ComposeOnboardingPage } from './compose-onboarding-page';\n\nexport class ComposeWideInstallPage extends ComposeOnboardingPage {\n readonly composeCommandMessage: Locator;\n\n constructor(page: Page) {\n super(page);\n this.composeCommandMessage = this.mainPage.getByText('$ podman compose up', { exact: true });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\n/**\n * Reusable dropdown component for consistent dropdown interactions across the test suite.\n * Handles the standard dropdown pattern used in Podman Desktop UI based on the Dropdown.svelte component.\n *\n * This component encapsulates the proper interaction patterns for dropdowns that follow the structure:\n * - Container with aria-label\n * - Button for triggering dropdown open/close\n * - Hidden input that holds the actual selected value\n * - Options list that appears when opened\n */\nexport class DropdownComponent {\n private readonly page: Page;\n private readonly containerLocator: Locator;\n private readonly triggerButton: Locator;\n private readonly hiddenInput: Locator;\n private readonly ariaLabel: string;\n\n /**\n * Creates a new DropdownComponent instance\n * @param page - The Playwright page object\n * @param ariaLabel - The aria-label used to identify the dropdown container\n */\n constructor(page: Page, ariaLabel: string) {\n this.page = page;\n this.ariaLabel = ariaLabel;\n\n // Find the dropdown container by its aria-label\n this.containerLocator = page.getByLabel(ariaLabel, { exact: true });\n\n // The trigger button is inside the container - first button element\n this.triggerButton = this.containerLocator.getByRole('button').first();\n\n // The hidden input holds the actual value\n this.hiddenInput = this.containerLocator.getByLabel('hidden input', { exact: true });\n }\n\n /**\n * Get the currently selected value from the dropdown's hidden input\n * @returns The current value stored in the hidden input\n */\n async getCurrentValue(): Promise<string> {\n return await this.hiddenInput.inputValue();\n }\n\n /**\n * Get the currently displayed text (what the user sees on the trigger button)\n * @returns The display text shown on the dropdown trigger\n */\n async getCurrentDisplayText(): Promise<string> {\n return await this.triggerButton.innerText();\n }\n\n /**\n * Select an option from the dropdown\n * @param optionValue - The value to select (used for verification)\n * @param optionText - The text to match when finding the option button (defaults to optionValue)\n * @param exact - Whether to use exact text matching (defaults to false for case-insensitive matching)\n */\n async selectOption(optionValue: string, optionText?: string, exact = false): Promise<void> {\n const displayText = optionText ?? optionValue;\n\n return test.step(`Select dropdown option: ${displayText}`, async () => {\n // Ensure dropdown container is visible\n await playExpect(this.containerLocator).toBeVisible({ timeout: 10_000 });\n await playExpect(this.triggerButton).toBeVisible({ timeout: 10_000 });\n\n // Get current value to check if change is needed\n const currentValue = await this.getCurrentValue();\n\n if (currentValue !== optionValue) {\n // Click to open the dropdown\n await this.triggerButton.scrollIntoViewIfNeeded();\n await this.triggerButton.click();\n\n // Wait until at least one option (beyond the trigger) is visible\n await playExpect(this.containerLocator.getByRole('button').nth(1)).toBeVisible();\n\n // Find and click the option button\n // Options appear as buttons within the container when dropdown is open\n const optionButton = this.containerLocator.getByRole('button', {\n name: displayText,\n exact: exact,\n });\n\n await playExpect(optionButton).toBeVisible({ timeout: 10_000 });\n await optionButton.click();\n\n // Verify the selection was applied (case-insensitive due to windows options)\n await playExpect\n .poll(\n async () => {\n const actualValue = await this.hiddenInput.inputValue();\n return actualValue.toLowerCase();\n },\n { timeout: 5_000 },\n )\n .toBe(optionValue.toLowerCase());\n }\n });\n }\n\n /**\n * Check if the dropdown is currently open using ARIA semantics with fallback\n * @returns True if the dropdown options are visible\n */\n async isOpen(): Promise<boolean> {\n const expanded = await this.triggerButton.getAttribute('aria-expanded');\n if (expanded !== null) return expanded === 'true';\n // Fallback: when open, there should be more than one button (trigger + options)\n return (await this.containerLocator.getByRole('button').count()) > 1;\n }\n\n /**\n * Get all available options from the dropdown\n * Note: This will open and close the dropdown to retrieve options\n * @returns Array of option texts available in the dropdown\n */\n async getAvailableOptions(): Promise<string[]> {\n return test.step('Get available dropdown options', async () => {\n // Open dropdown if not already open\n const wasOpen = await this.isOpen();\n if (!wasOpen) {\n await this.triggerButton.click();\n await playExpect(this.containerLocator.getByRole('button').nth(1)).toBeVisible();\n }\n\n // Get all button texts (excluding the trigger button)\n const allButtons = this.containerLocator.getByRole('button');\n const buttonTexts = await allButtons.allInnerTexts();\n\n // Exclude the trigger button (first entry)\n const [, ...options] = buttonTexts;\n\n // Close dropdown if we opened it\n if (!wasOpen) {\n await this.triggerButton.click();\n }\n\n return options;\n });\n }\n\n /**\n * Verify the dropdown is in the expected state\n * @param expectedValue - The expected value in the hidden input\n * @param expectedDisplayText - Optional expected display text on the trigger button\n */\n async verifyState(expectedValue: string, expectedDisplayText?: string): Promise<void> {\n return test.step(`Verify dropdown state: ${expectedValue}`, async () => {\n // Verify the hidden input value (case-insensitive due to windows options)\n await playExpect\n .poll(\n async () => {\n const actualValue = await this.hiddenInput.inputValue();\n return actualValue.toLowerCase();\n },\n { timeout: 5_000 },\n )\n .toBe(expectedValue.toLowerCase());\n\n if (expectedDisplayText) {\n await playExpect(this.triggerButton).toContainText(expectedDisplayText, {\n ignoreCase: true,\n timeout: 5_000,\n });\n }\n });\n }\n\n /**\n * Wait for the dropdown to be ready for interaction\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForReady(timeout = 10_000): Promise<void> {\n return test.step(`Wait for dropdown to be ready: ${this.ariaLabel}`, async () => {\n await playExpect(this.containerLocator).toBeVisible({ timeout });\n await playExpect(this.triggerButton).toBeVisible({ timeout });\n await playExpect(this.hiddenInput).toBeAttached({ timeout });\n });\n }\n\n /**\n * Get the dropdown container locator for advanced operations\n * @returns The container locator for this dropdown\n */\n getContainer(): Locator {\n return this.containerLocator;\n }\n\n /**\n * Get the trigger button locator for advanced operations\n * @returns The trigger button locator for this dropdown\n */\n getTriggerButton(): Locator {\n return this.triggerButton;\n }\n\n /**\n * Get the hidden input locator for advanced operations\n * @returns The hidden input locator for this dropdown\n */\n getHiddenInput(): Locator {\n return this.hiddenInput;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { DropdownComponent } from '/@/model/components/dropdown-component';\nimport type { PodmanVirtualizationProviders } from '/@/model/core/types';\nimport { matchesProviderVariant, PodmanVirtualizationProviderVariants } from '/@/model/core/types';\nimport { BasePage } from '/@/model/pages/base-page';\nimport { isWindows } from '/@/utility/platform';\nimport { getDefaultVirtualizationProvider } from '/@/utility/provider';\n\nexport class MachineCreationForm extends BasePage {\n readonly podmanMachineConfiguration: Locator;\n readonly podmanMachineName: Locator;\n readonly imagePathBox: Locator;\n readonly browseImagesButton: Locator;\n readonly podmanMachineCPUs: Locator;\n readonly podmanMachineMemory: Locator;\n readonly podmanMachineDiskSize: Locator;\n readonly rootPriviledgesCheckbox: Locator;\n readonly userModeNetworkingCheckbox: Locator;\n readonly providerTypeDropdown: DropdownComponent;\n readonly startNowCheckbox: Locator;\n readonly createMachineButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.podmanMachineConfiguration = this.page.getByRole('form', {\n name: 'Properties Information',\n });\n this.podmanMachineName = this.podmanMachineConfiguration.getByRole('textbox', { name: 'Name' });\n this.imagePathBox = this.podmanMachineConfiguration.getByRole('textbox', {\n name: 'Image Path (Optional) ',\n });\n this.browseImagesButton = this.podmanMachineConfiguration.getByRole('button', {\n name: 'button-Image Path (Optional)',\n });\n this.podmanMachineCPUs = this.podmanMachineConfiguration.getByRole('slider', { name: 'CPU(s)' });\n this.podmanMachineMemory = this.podmanMachineConfiguration.getByRole('slider', { name: 'Memory' });\n this.podmanMachineDiskSize = this.podmanMachineConfiguration.getByRole('slider', { name: 'Disk size' });\n this.rootPriviledgesCheckbox = this.podmanMachineConfiguration.getByRole('checkbox', {\n name: 'Machine with root privileges',\n });\n this.userModeNetworkingCheckbox = this.podmanMachineConfiguration.getByRole('checkbox', {\n name: 'User mode networking',\n });\n this.providerTypeDropdown = new DropdownComponent(page, 'Provider Type');\n\n this.startNowCheckbox = this.podmanMachineConfiguration.getByRole('checkbox', { name: 'Start the machine now' });\n this.createMachineButton = this.podmanMachineConfiguration.getByRole('button', { name: 'Create' });\n }\n\n async setupAndCreateMachine(\n machineName: string,\n {\n isRootful = true,\n enableUserNet = false,\n startNow = true,\n virtualizationProvider,\n }: {\n isRootful?: boolean;\n enableUserNet?: boolean;\n startNow?: boolean;\n virtualizationProvider?: PodmanVirtualizationProviders;\n } = {},\n ): Promise<void> {\n return test.step(`Create Podman Machine '${machineName}' with settings: ${isRootful ? 'rootful' : 'rootless'}, ${enableUserNet ? 'usernet enabled' : 'usernet disabled'}, ${startNow ? 'startnow enabled' : 'startnow disabled'}${virtualizationProvider ? ', and ' + virtualizationProvider : ''}`, async () => {\n await playExpect(this.podmanMachineConfiguration).toBeVisible({\n timeout: 10_000,\n });\n await this.podmanMachineName.clear();\n await playExpect(this.podmanMachineName).toHaveValue('');\n\n await this.podmanMachineName.fill(machineName);\n await playExpect(this.podmanMachineName).toHaveValue(machineName);\n\n await this.ensureCheckboxState(isRootful, this.rootPriviledgesCheckbox);\n if (isWindows) {\n await this.ensureCheckboxState(enableUserNet, this.userModeNetworkingCheckbox);\n }\n if (virtualizationProvider) {\n await this.specifyVirtualizationProvider(virtualizationProvider);\n }\n await this.ensureCheckboxState(startNow, this.startNowCheckbox);\n\n await playExpect(this.createMachineButton).toBeEnabled();\n await this.createMachineButton.click();\n });\n }\n\n async ensureCheckboxState(desiredState: boolean, checkbox: Locator): Promise<void> {\n return test.step(`Ensure checkbox is ${desiredState ? 'checked' : 'unchecked'}`, async () => {\n if (desiredState !== (await checkbox.isChecked())) {\n await checkbox.locator('..').click();\n }\n\n await playExpect.poll(async () => await checkbox.isChecked()).toBe(desiredState);\n });\n }\n\n async specifyVirtualizationProvider(\n virtualizationProvider: PodmanVirtualizationProviders | undefined,\n ): Promise<void> {\n return test.step(`Set Podman Provider to ${virtualizationProvider ?? getDefaultVirtualizationProvider()}`, async () => {\n if (!virtualizationProvider) return;\n // Only select if the dropdown is actually present/visible\n if (!(await this.providerTypeDropdown.getContainer().isVisible())) return;\n await this.providerTypeDropdown.waitForReady();\n // Compare by the hidden input value using variant matching to handle version differences\n const currentValue = await this.providerTypeDropdown.getCurrentValue();\n if (!matchesProviderVariant(virtualizationProvider, currentValue)) {\n // Try to find which variant actually exists in the dropdown\n const availableOptions = await this.providerTypeDropdown.getAvailableOptions();\n const variants = PodmanVirtualizationProviderVariants[virtualizationProvider];\n // Find the first variant that matches any available option\n const matchingVariant = variants.find(variant =>\n availableOptions.some(option => option.toLowerCase().trim() === variant.toLowerCase().trim()),\n );\n if (!matchingVariant) {\n throw new Error(\n `No matching variant found for provider ${virtualizationProvider}. Available options: ${availableOptions.join(', ')}. Expected variants: ${variants.join(', ')}`,\n );\n }\n await this.providerTypeDropdown.selectOption(matchingVariant, matchingVariant, false);\n await this.providerTypeDropdown.verifyState(matchingVariant, matchingVariant);\n }\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport type { PodmanVirtualizationProviders } from '/@/model/core/types';\n\nimport { BasePage } from './base-page';\nimport { MachineCreationForm } from './forms/machine-creation-form';\nimport { ResourcesPage } from './resources-page';\n\nexport class CreateMachinePage extends BasePage {\n readonly heading: Locator;\n readonly machineCreationForm: MachineCreationForm;\n readonly closeButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = this.page.getByRole('heading', {\n name: 'Create Podman Machine',\n });\n this.machineCreationForm = new MachineCreationForm(this.page);\n this.closeButton = this.page.getByRole('button', { name: 'Close' });\n }\n\n async createMachine(\n machineName: string,\n {\n isRootful = true,\n enableUserNet = false,\n startNow = true,\n setAsDefault = true,\n virtualizationProvider,\n }: {\n isRootful?: boolean;\n enableUserNet?: boolean;\n startNow?: boolean;\n setAsDefault?: boolean;\n virtualizationProvider?: PodmanVirtualizationProviders;\n },\n ): Promise<ResourcesPage> {\n return test.step(`Create Podman Machine: ${machineName}`, async () => {\n await this.machineCreationForm.setupAndCreateMachine(machineName, {\n isRootful,\n enableUserNet,\n startNow,\n virtualizationProvider,\n });\n\n const successfulCreationMessage = this.page.getByText('Successful operation');\n const goBackToResourcesButton = this.page.getByRole('button', {\n name: 'Go back to resources',\n });\n\n await playExpect(successfulCreationMessage).toBeVisible({\n timeout: 120_000,\n });\n await playExpect(goBackToResourcesButton).toBeVisible();\n\n try {\n await this.handleConnectionDialog(machineName, setAsDefault);\n } catch (error) {\n console.log('No handling dialog displayed', error);\n }\n\n await playExpect(goBackToResourcesButton).toBeEnabled();\n await goBackToResourcesButton.click();\n return new ResourcesPage(this.page);\n });\n }\n\n async handleConnectionDialog(machineName: string, setAsDefault: boolean): Promise<void> {\n return test.step('Handle Podman Machine connection dialog', async () => {\n const connectionDialog = this.page.getByRole('dialog', {\n name: 'Podman',\n });\n await playExpect(connectionDialog).toBeVisible({ timeout: 10_000 });\n\n const dialogMessage = connectionDialog.getByLabel('Dialog Message');\n await playExpect(dialogMessage).toHaveText(\n new RegExp(\n `Podman Machine '${machineName}' is running but not the default machine .+ Do you want to set it as default?`,\n ),\n );\n\n const handleButtonName = setAsDefault ? 'Yes' : 'Ignore';\n const handleButton = connectionDialog.getByRole('button', {\n name: handleButtonName,\n });\n await handleButton.click();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { SettingsPage } from './settings-page';\n\nexport class DockerCompatibilityPage extends SettingsPage {\n readonly heading: Locator;\n readonly serverInformationBox: Locator;\n readonly podmanComposeCLICard: Locator;\n readonly dockerCLICard: Locator;\n readonly dockerContextDropdownMenu: Locator;\n readonly podmanListeningLabel: Locator;\n\n constructor(page: Page) {\n super(page, 'Docker Compatibility');\n this.heading = this.header\n .getByRole('heading', { name: 'Title' })\n .and(this.header.getByText('Docker Compatibility'));\n this.serverInformationBox = this.content.getByRole('status', { name: 'Server information' });\n this.podmanComposeCLICard = this.content.getByRole('list', { name: 'podman-desktop.podman' });\n this.dockerCLICard = this.content.getByRole('list', { name: 'podman-desktop.docker' });\n this.dockerContextDropdownMenu = this.dockerCLICard.getByRole('button', {\n name: 'select-property-docker.cli.context',\n });\n this.podmanListeningLabel = this.content.getByText('podman is listening');\n }\n\n public async socketIsReachable(): Promise<boolean> {\n try {\n await playExpect(this.podmanListeningLabel).toBeVisible();\n return await this.podmanListeningLabel.isVisible();\n } catch (_error) {\n return false;\n }\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { ExtensionDetailsPage } from './extension-details-page';\n\nexport class ExtensionCatalogCardPage extends BasePage {\n readonly parent: Locator;\n readonly extensionName: string;\n readonly detailsButton: Locator;\n readonly downloadButton: Locator;\n readonly alreadyInstalledText: Locator;\n\n constructor(page: Page, extensionName: string) {\n super(page);\n this.extensionName = extensionName;\n this.parent = this.page.getByRole('group', { name: this.extensionName });\n this.detailsButton = this.parent.getByRole('button', {\n name: 'More details',\n });\n this.downloadButton = this.parent.getByRole('button', { name: 'Install' });\n this.alreadyInstalledText = this.parent.getByText('Already installed', {\n exact: true,\n });\n }\n\n public async openDetails(): Promise<ExtensionDetailsPage> {\n return test.step(`Open details for extension: ${this.extensionName}`, async () => {\n await this.parent.scrollIntoViewIfNeeded();\n await playExpect(this.detailsButton).toBeVisible();\n await this.detailsButton.click();\n return new ExtensionDetailsPage(this.page, this.extensionName);\n });\n }\n\n public async isInstalled(): Promise<boolean> {\n return test.step(`Check if extension ${this.extensionName} is installed`, async () => {\n await this.parent.scrollIntoViewIfNeeded();\n const downloadButton = this.parent.getByRole('button', {\n name: 'Install',\n });\n return (await this.alreadyInstalledText.count()) > 0 && (await downloadButton.count()) === 0;\n });\n }\n\n public async install(timeout: number): Promise<void> {\n return test.step(`Install extension ${this.extensionName}`, async () => {\n if (await this.isInstalled()) {\n console.log(`Extension ${this.extensionName} is already installed`);\n return;\n }\n await playExpect(this.downloadButton).toBeEnabled();\n await this.downloadButton.click();\n await playExpect(this.alreadyInstalledText).toBeVisible({\n timeout: timeout,\n });\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { SettingsPage } from './settings-page';\n\nexport class KubeContextPage extends SettingsPage {\n readonly heading: Locator;\n readonly content: Locator;\n readonly contextTable: Locator;\n readonly editContextDialog: Locator;\n\n constructor(page: Page) {\n super(page, 'Kubernetes');\n this.heading = this.page.getByLabel('Title', { exact: true });\n this.content = this.page.getByLabel('Content');\n this.contextTable = this.content.getByLabel('Contexts');\n this.editContextDialog = this.page.getByRole('dialog', { name: 'Edit Context' });\n }\n\n async pageIsEmpty(): Promise<boolean> {\n const emptyHeading = this.page.getByRole('heading', { name: 'No Kubernetes contexts found', exact: true });\n return (await emptyHeading.count()) > 0;\n }\n\n async getContextRowByName(name: string): Promise<Locator> {\n return this.contextTable.getByLabel(name, { exact: true });\n }\n\n async isContextDefault(name: string): Promise<boolean> {\n const row = await this.getContextRowByName(name);\n if (row === undefined) {\n throw Error(`Context: '${name}' does not exist`);\n }\n\n const bannerText = await row.getByLabel('Current Context').textContent();\n return bannerText === 'Current Context';\n }\n\n async isContextReachable(name: string): Promise<boolean> {\n const row = await this.getContextRowByName(name);\n if (row === undefined) {\n throw Error(`Context: '${name}' does not exist`);\n }\n const contextReachable = row.getByLabel('Context Reachable');\n\n return (await contextReachable.count()) > 0;\n }\n\n async setDefaultContext(name: string): Promise<void> {\n const contextRow = await this.getContextRowByName(name);\n if (contextRow === undefined) {\n throw Error(`Context: '${name}' does not exist`);\n }\n const switchButton = contextRow.getByLabel('Set as Current Context');\n await playExpect(switchButton).toBeEnabled();\n await switchButton.click();\n }\n\n async deleteContext(name: string, handleConfirmation = true): Promise<void> {\n const contextRow = await this.getContextRowByName(name);\n if (contextRow === undefined) {\n throw Error(`Context: '${name}' does not exist`);\n }\n const deleteButton = contextRow.getByLabel('Delete Context');\n await playExpect(deleteButton).toBeEnabled();\n await deleteButton.click();\n if (handleConfirmation) {\n await handleConfirmationDialog(this.page, 'Delete Context');\n }\n }\n\n async duplicateContext(name: string): Promise<void> {\n const contextRow = await this.getContextRowByName(name);\n if (contextRow === undefined) {\n throw Error(`Context: '${name}' does not exist`);\n }\n const duplicateButton = contextRow.getByLabel('Duplicate Context');\n await playExpect(duplicateButton).toBeEnabled();\n await duplicateButton.click();\n }\n\n async editContext(name: string, newName: string): Promise<void> {\n const contextRow = await this.getContextRowByName(name);\n if (contextRow === undefined) {\n throw Error(`Context: '${name}' does not exist`);\n }\n\n if (newName === name) {\n throw Error(`New context name must be different from the current one: ${name}`);\n }\n\n const editButton = contextRow.getByLabel('Edit Context');\n await playExpect(editButton).toBeEnabled();\n await editButton.click();\n\n await playExpect(this.editContextDialog).toBeVisible({ timeout: 10_000 });\n\n const nameInput = this.editContextDialog.getByLabel('contextName', { exact: true });\n await playExpect(nameInput).toBeVisible();\n await nameInput.clear();\n await playExpect(nameInput).toHaveValue('');\n await nameInput.fill(newName);\n await playExpect(nameInput).toHaveValue(newName);\n\n const saveButton = this.editContextDialog.getByRole('button', { name: 'Save' });\n await playExpect(saveButton).toBeEnabled();\n await saveButton.click();\n }\n\n async getContextName(context: string): Promise<string> {\n const row = await this.getContextRowByName(context);\n return row.getByLabel('Context Name', { exact: true }).innerText();\n }\n\n async getContextCluster(context: string): Promise<string> {\n const row = await this.getContextRowByName(context);\n return row.getByLabel('Context Cluster').innerText();\n }\n\n async getContextServer(context: string): Promise<string> {\n const row = await this.getContextRowByName(context);\n return row.getByLabel('Context Server').innerText();\n }\n\n async getContextUser(context: string): Promise<string> {\n const row = await this.getContextRowByName(context);\n return row.getByLabel('Context User').innerText();\n }\n\n async getContextNamespace(context: string): Promise<string> {\n const row = await this.getContextRowByName(context);\n return row.getByLabel('Context Namespace').innerText();\n }\n\n async getSetCurrentContextButton(context: string): Promise<Locator> {\n const row = await this.getContextRowByName(context);\n return row.getByLabel('Set as Current Context');\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { ResourcesPage } from './resources-page';\n\nexport class PodmanMachineDetails extends ResourcesPage {\n readonly podmanMachineName: Locator;\n readonly podmanMachineStatus: Locator;\n readonly podmanMachineConnectionActions: Locator;\n readonly podmanMachineStartButton: Locator;\n readonly podmanMachineRestartButton: Locator;\n readonly podmanMachineStopButton: Locator;\n readonly podmanMachineDeleteButton: Locator;\n\n readonly tabs: Locator;\n readonly summaryTab: Locator;\n readonly logsTab: Locator;\n readonly terminalTab: Locator;\n readonly tabContent: Locator;\n readonly terminalInput: Locator;\n readonly terminalContent: Locator;\n\n constructor(page: Page, podmanMachineName: string) {\n super(page);\n this.podmanMachineName = page.getByRole('heading', { name: podmanMachineName });\n this.podmanMachineStatus = page.getByLabel('Connection Status Label');\n this.podmanMachineConnectionActions = page.getByRole('group', { name: 'Connection Actions' });\n this.podmanMachineStartButton = this.podmanMachineConnectionActions.getByRole('button', {\n name: 'Start',\n exact: true,\n });\n this.podmanMachineRestartButton = this.podmanMachineConnectionActions.getByRole('button', { name: 'Restart' });\n this.podmanMachineStopButton = this.podmanMachineConnectionActions.getByRole('button', { name: 'Stop' });\n this.podmanMachineDeleteButton = this.podmanMachineConnectionActions.getByRole('button', { name: 'Delete' });\n\n this.tabs = page.getByRole('region', { name: 'Tabs' });\n this.summaryTab = this.tabs.getByText('Summary');\n this.logsTab = this.tabs.getByText('Logs');\n this.terminalTab = this.tabs.getByText('Terminal', { exact: true });\n this.tabContent = page.getByRole('region', { name: 'Tab Content' });\n this.terminalInput = this.tabContent.getByLabel('Terminal input');\n this.terminalContent = this.tabContent.locator('.xterm-rows');\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { MachineCreationForm } from './forms/machine-creation-form';\nimport { OnboardingPage } from './onboarding-page';\n\nexport class PodmanOnboardingPage extends OnboardingPage {\n readonly podmanAutostartToggle: Locator;\n readonly createMachinePageTitle: Locator;\n readonly machineCreationForm: MachineCreationForm;\n readonly podmanMachineShowLogsButton: Locator;\n readonly goBackButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.podmanAutostartToggle = this.mainPage.getByRole('checkbox', {\n name: 'Autostart Podman engine when launching Podman Desktop',\n });\n this.createMachinePageTitle = this.onboardingComponent.getByLabel('title');\n this.machineCreationForm = new MachineCreationForm(this.page);\n this.podmanMachineShowLogsButton = this.mainPage.getByRole('button', { name: 'Show Logs' });\n this.goBackButton = this.page.getByRole('button', { name: 'Go back to resources' });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { ResourceCardPage } from './resource-card-page';\n\nexport class ResourceCliCardPage extends ResourceCardPage {}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport class TroubleshootingPage extends BasePage {\n readonly heading: Locator;\n readonly header: Locator;\n readonly tabs: Locator;\n readonly tabContent: Locator;\n readonly containerConnectionsStatus: Locator;\n readonly storesStatus: Locator;\n readonly logsText: Locator;\n readonly logsList: Locator;\n readonly storesList: Locator;\n readonly gatherLogsText: Locator;\n readonly reconnectProvidersButton: Locator;\n readonly reconnectProvidersStatus: Locator;\n\n constructor(page: Page) {\n super(page);\n this.header = this.page.getByRole('region', { name: 'Header' });\n this.heading = this.header.getByRole('heading', { name: 'Troubleshooting' });\n this.tabs = this.page.getByRole('region', { name: 'Tabs' });\n this.tabContent = this.page.getByRole('region', { name: 'Tab Content' });\n // only available when specific tab is opened\n this.containerConnectionsStatus = this.tabContent.getByRole('status', { name: 'Container Connections' });\n this.storesStatus = this.tabContent.getByRole('status', { name: 'stores' });\n this.logsText = this.tabContent.getByText('Logs', { exact: true });\n this.gatherLogsText = this.tabContent.getByText('Gather Log Files');\n this.logsList = this.tabContent.getByRole('list', { name: 'logs', exact: true });\n this.storesList = this.tabContent.getByRole('list', { name: 'stores' });\n this.reconnectProvidersButton = this.tabContent.getByRole('button', { name: 'Reconnect providers' });\n this.reconnectProvidersStatus = this.tabContent.getByRole('status', { name: 'Reconnect Providers' });\n }\n\n public async openRepairConnections(): Promise<void> {\n await this.openTab('Repair & Connections');\n await playExpect(this.containerConnectionsStatus).toBeVisible();\n }\n\n public async openStores(): Promise<void> {\n await this.openTab('Stores');\n await playExpect(this.storesStatus).toBeVisible();\n }\n\n public async openLogs(): Promise<void> {\n await this.openTab('Logs');\n await playExpect(this.logsText).toBeVisible();\n }\n\n public async openGatherLogs(): Promise<void> {\n await this.openTab('Gather Logs');\n await playExpect(this.gatherLogsText).toBeVisible();\n }\n\n private async openTab(tabName: string): Promise<void> {\n const link = this.tabs.getByRole('link', { name: tabName, exact: true });\n await playExpect(link, `Tab Link ${tabName} is not visible`).toBeVisible();\n await link.click();\n }\n\n // return locator for better processing in playwright assertions\n public async getLogs(): Promise<Locator> {\n await this.openLogs();\n await playExpect(this.logsList).toBeVisible();\n return this.logsList;\n }\n\n public async refreshStore(storeName: string): Promise<void> {\n await this.openStores();\n const store = this.storesList.getByRole('listitem', { name: storeName });\n await playExpect(store).toBeVisible();\n await store.scrollIntoViewIfNeeded();\n const refreshButton = store.getByRole('button', { name: 'Refresh' });\n await playExpect(refreshButton).toBeEnabled();\n await refreshButton.click();\n }\n\n public async getContainerConnectionsStatus(): Promise<string> {\n await this.openRepairConnections();\n await playExpect(this.containerConnectionsStatus).toBeVisible();\n return await this.containerConnectionsStatus.innerText();\n }\n\n public async reconnectProviders(): Promise<string> {\n await this.openRepairConnections();\n await playExpect(this.reconnectProvidersButton).toBeEnabled();\n await this.reconnectProvidersButton.click();\n await playExpect(this.reconnectProvidersStatus).toBeVisible();\n return await this.reconnectProvidersStatus.innerText();\n }\n}\n"],"names":["removeFolderIfExists","path","existsSync","rmSync","setupCalled","setup","teardown","isLinux","os","isMac","isWindows","archType","isCI","ContainerState","PodState","VolumeState","ResourceElementState","KubernetesResourceState","ExtensionState","ImageState","TaskState","ResourceElementActions","PodmanKubePlayOptions","KubernetesResources","KubernetesResourceAttributes","PodmanVirtualizationProviders","PodmanVirtualizationProviderVariants","matchesProviderVariant","provider","value","variants","normalizedValue","variant","getProviderFromVariant","PodmanMachinePrivileges","ProxyTypes","BasePage","page","SettingsPage","tabName","CLIToolsPage","toolName","version","test","timeout","playExpect","confirmationDialog","handleConfirmationDialog","currentVersion","versionToSelect","waitUntil","versionSplitInParts","versionNumber","msg","ExperimentalPage","checkbox","enable","isEnabled","PreferencesPage","name","resetButton","appearancePreferenceRow","preferenceInput","selectionButton","option","pathToKube","RegistriesPage","url","username","pswd","title","newUsername","newPswd","registryBox","registryUsername","registryPswd","loginButton","dropdownMenu","err","ResourceCardPage","resourceName","ResourceConnectionCardPage","resourceElementVisibleName","operation","button","label","ResourcesPage","resourceCardAriaLabel","newResourceName","buttonName","SettingsBar","type","desiredPage","tab","href","DetailsPage","tabItem","CreateVolumePage","VolumesPage","MainPage","status","rows","filteredRows","rowNum","exact","locator","toggle","controlRow","checkboxColumnHeader","volumeName","volumeRow","VolumeDetailsPage","containerRowDeleteButton","waitWhile","deleteContainer","containers","NavigationBar","container","stopButton","error","deleteImage","images","row","deleteButton","deleteRegistry","failIfNotExist","registryPage","registryRecord","deletePod","pods","pod","deleteNetwork","networksPage","dialogTitle","confirm","confirmationButton","cancelButton","moreThanOneConsecutiveDialogs","dialog","handleEditNetworkDialog","networkName","options","editDialog","inputFields","dnsServersToAddInput","dnsServersToRemoveInput","updateButton","deletePodmanMachine","machineVisibleName","RESOURCE_NAME","navigationBar","dashboardPage","resourcesPage","podmanResourceCard","ensurePodmanMachineStopped","currentStatus","stopPodmanMachineViaCLI","waitForPodmanMachineStoppedState","execSync","getVolumeNameForContainer","containerName","volumeSummaryContent","volumePage","i","volumeDetails","content","ensureCliInstalled","cliToolsPage","createPodmanMachineFromCLI","podmanMachineMode","userModeNetworking","deletePodmanMachineFromCLI","podmanMachineName","resetPodmanMachinesFromCLI","fillTextbox","textbox","text","runComposeUpFromCLI","composeFilePath","untagImagesFromPodman","tag","setDockerCompatibilityFeature","settingsBar","DCPreferencesLink","DCPreferencesPage","experimentalTitle","dockerCompatibilityCheckbox","DCSettingsLink","setStatusBarProvidersFeature","experimentalPage","isRootlessPodman","output","getPodmanVolumePath","fileName","relativePath","isRootless","readFileInVolumeFromCLI","fullPath","command","verifyVirtualizationProvider","resourceConnectionCardPage","virtualizationProvider","connectionTypeText","matchesVariant","verifyMachinePrivileges","machinePrivileges","parseVersion","part","compareVersions","current","reference","maxLength","currentPart","referencePart","getPodmanCliVersion","match","isPodmanCliVersionAtLeast","referenceVersion","currentVersionArray","referenceVersionArray","ArchitectureType","ImageEditPage","ImagesPage","DeployToKubernetesPage","useKubernetesServices","useRestrictedSecurityContext","useKubernetesIngress","containerExposedPort","isOpenShiftCluster","useOpenShiftRoutes","context","namespace","ContainerDetailsPage","currentState","state","ContainersPage","portsCell","RunImagePage","exposedPort","port","portMapping","customName","detailsPageLocator","heading","optionalParams","message","customPortMapping","hostPort","containerPort","ImageDetailsPage","outputPath","node","kebabMenuButton","pushToKindButton","pushToKindName","PullImagePage","imageName","fullImageName","searchForVersion","imageTag","resultsExpected","searchString","stringToAppend","resultList","resultRows","result","pattern","getExactButtonLocator","image","pullImagePage","oldname","newname","newtag","imageDetailsPage","containersParams","imageRow","BuildImagePage","archivePath","currentRows","count","manifestName","manifest","extendManifestButton","deleteManifestButton","pushManifestButton","locators","badge","containerFilePath","contextDirectory","cancelAfterTimeout","buttonText","archTypeButton","logs","logRows","logRow","architecture","PodmanKubePlayPage","jsonResourceDefinition","codeSection","pathToYaml","buildImage","errorMessage","PodsPage","PodDetailsPage","podRow","openPodDetailsButton","names","podName","environment","deployedContainerRow","CreatePodsPage","SelectImagePage","actionButton","containerRow","containerRowStartButton","containerRowStopButton","containerDetailsPage","DashboardPage","ExtensionDetailsPage","extensionName","disableBeforeRemove","ExtensionsPage","ExtensionCardPage","extensionLabel","extension","imageInput","installButton","doneButton","extensionCard","KubernetesDashboardPage","namespaceLocator","currentResource","countLocator","countText","KubernetesResourceDetailsPage","textToBeChanged","newText","presentation","KubernetesResourcePage","attributeName","resourceType","attrIndex","resourceRow","resourceRowName","KubernetesBar","kubernetesResource","NetworkDetailsPage","NetworksPage","CreateNetworkPage","subnet","networkDeleteButton","networkUpdateButton","createNetworkPage","networkRow","networkRowNameCell","kubernetesBar","wait","waitFunction","until","diff","sendError","time","delay","ms","resolve","waitForPodmanMachineStartup","RunnerOptions","profile","customFolder","customOutputFolder","openDevTools","autoUpdate","autoCheckUpdates","extensionsDisabled","aiLabModelUploadDisabled","binaryPath","saveTracesOnPass","saveVideosOnPass","customSettings","Runner","runnerOptions","join","key","electron","filePath","app","data","filename","mainWindow","getState","video","pid","videoPath","elapsed","rawTracesPath","testStatus","tracesPath","fn","start","pdArgs","pdBinary","directory","tracesDir","env","recordVideo","args","executablePath","dir","settingsFile","parentDir","dirname","mkdirSync","settingsContent","writeFileSync","setupRegistry","registryUrl","ciDefault","tokenDef","pwsdDefault","registryPswdSecret","canTestRegistry","registry","passwd","findPageWithTitleInBrowser","browser","expectedTitle","pages","chromePage","p","performBrowserLogin","usernameAction","passwordAction","postLoginAction","startChromium","browserLaunch","chromium","getEntryFromLogs","filter","regex","lineContains","getEntryFromConsoleLogs","checkString","logLine","parsedString","urlMatch","handleCookies","iframTitle","checkLocatorExistence","CreateClusterBasePage","errorText","CreateKindClusterPage","clusterName","configFilePath","providerType","httpPort","httpsPort","useIngressController","containerImage","providerTypeButton","ResourceDetailsPage","TasksPage","taskName","taskRow","taskStatus","taskLink","deleteTaskButton","StatusBar","providerName","pin","barProviderButton","pinMenuProviderButton","providerTooltip","createKindCluster","statusBar","kindResourceCard","createKindClusterPage","deleteCluster","resourceCard","validateClusterResourcesDeletion","checkClusterResources","containersPage","volumesPage","volumeDetailsPage","resourceConnectionAction","expectedResourceState","resourceConnectionActionDetails","resourceDetailsPage","deleteClusterFromDetails","resourceDetails","WelcomePage","skipIfNotPresent","base","use","runner","welcomePage","deployContainerToCluster","kubernetesContext","deployedPodName","kubernetesPodsPage","createKubernetesResource","resourceYamlPath","kubectlApply","kubernetesResourcePage","deleteKubernetesResource","checkDeploymentReplicasInfo","expectedReplicaCount","kubernetesResourceDetails","summaryTab","checkKubernetesResourceState","editDeploymentYamlFile","deploymentName","currentReplicaCount","updatedReplicaCount","countKubernetesPodReplicas","deploymentsPage","deploymentDetails","expectedPodName","counter","configurePortForwarding","forwardButton","openInBrowserButton","removeConfigurationButton","verifyPortForwardingConfiguration","configurationName","localPort","remotePort","portForwardingPage","configurationRow","localPortCell","remotePortCell","verifyLocalPortResponse","forwardAddress","responseMessage","monitorPodStatusInClusterContainer","checkContourPodsInTerminal","envProvider","PROVIDER_MAP","getVirtualizationProvider","getDefaultVirtualizationProvider","minikubeExtension","podmanAILabExtension","extensionsPackExtension","bootcExtension","developerSandboxExtension","imageLayersExplorerExtension","podmanQuadletExtension","ssoExtension","openshiftCheckerExtension","openshiftLocalExtension","headlampExtension","composeExtension","dockerExtension","kindExtension","kubeContextExtension","kubectlCLIExtension","limaExtension","podmanExtension","registriesExtension","openshiftDockerExtension","extensionsBuiltInList","extensionsExternalList","extensionsInstallationSmokeList","extensionsAllExternalList","AuthenticationPage","CommandPalette","OnboardingPage","ComposeOnboardingPage","ComposeFailedPage","ComposeLocalInstallPage","ComposeVersionPage","versionInfoText","composeVersion","matches","ComposeWideInstallPage","DropdownComponent","ariaLabel","optionValue","optionText","displayText","optionButton","expanded","wasOpen","buttonTexts","expectedValue","expectedDisplayText","MachineCreationForm","machineName","isRootful","enableUserNet","startNow","desiredState","currentValue","availableOptions","matchingVariant","CreateMachinePage","setAsDefault","successfulCreationMessage","goBackToResourcesButton","connectionDialog","dialogMessage","handleButtonName","DockerCompatibilityPage","ExtensionCatalogCardPage","downloadButton","KubeContextPage","contextRow","switchButton","handleConfirmation","duplicateButton","newName","editButton","nameInput","saveButton","PodmanMachineDetails","PodmanOnboardingPage","ResourceCliCardPage","TroubleshootingPage","link","storeName","store","refreshButton"],"mappings":";;;;;;AAwBA,eAAsBA,GAAqBC,GAA6B;AACtE,UAAQ,IAAI,uBAAuBA,CAAI,EAAE,GAErCC,EAAWD,CAAI,MACjB,QAAQ,IAAI,2BAA2B,GACvCE,EAAOF,GAAM,EAAE,WAAW,IAAM,OAAO,IAAM,YAAY,GAAG;AAEhE;ACXA,IAAIG,KAAc;AAGlB,eAAsBC,KAAuB;AAC3C,EAAKD,OAIC,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,IAAI,qBAClC,MAAMJ,GAAqB,cAAc,IAEzC,QAAQ;AAAA,IACN;AAAA,EAAA,GAGJI,KAAc;AAElB;AAEA,eAAsBE,KAA0B;AAKhD;ACxBO,MAAMC,IAAUC,EAAG,eAAe,SAC5BC,IAAQD,EAAG,eAAe,UAC1BE,IAAYF,EAAG,eAAe,SAC9BG,KAAWH,EAAG,KAAA,GAGdI,KAAO,OAAO,QAAQ,IAAI,EAAE,EAAE,kBAAkB;ACRtD,IAAKC,sBAAAA,OACVA,EAAA,WAAW,YACXA,EAAA,WAAW,YACXA,EAAA,UAAU,WACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,WAAW,YACXA,EAAA,UAAU,WACVA,EAAA,SAAS,UACTA,EAAA,UAAU,WACVA,EAAA,UAAU,WAVAA,IAAAA,KAAA,CAAA,CAAA,GAaAC,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,UAAU,WACVA,EAAA,UAAU,WACVA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA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E,YAAA,GACzB,KAAK;AAAA,EACd;AAAA,EAEA,MAAa,aAAa6jB,GAAkC;AAC1D,UAAM,KAAK,WAAA;AACX,UAAMC,IAAQ,KAAK,WAAW,UAAU,YAAY,EAAE,MAAMD,GAAW;AACvE,UAAM7jB,EAAW8jB,CAAK,EAAE,YAAA,GACxB,MAAMA,EAAM,uBAAA;AACZ,UAAMC,IAAgBD,EAAM,UAAU,UAAU,EAAE,MAAM,WAAW;AACnE,UAAM9jB,EAAW+jB,CAAa,EAAE,YAAA,GAChC,MAAMA,EAAc,MAAA;AAAA,EACtB;AAAA,EAEA,MAAa,gCAAiD;AAC5D,iBAAM,KAAK,sBAAA,GACX,MAAM/jB,EAAW,KAAK,0BAA0B,EAAE,YAAA,GAC3C,MAAM,KAAK,2BAA2B,UAAA;AAAA,EAC/C;AAAA,EAEA,MAAa,qBAAsC;AACjD,iBAAM,KAAK,sBAAA,GACX,MAAMA,EAAW,KAAK,wBAAwB,EAAE,YAAA,GAChD,MAAM,KAAK,yBAAyB,MAAA,GACpC,MAAMA,EAAW,KAAK,wBAAwB,EAAE,YAAA,GACzC,MAAM,KAAK,yBAAyB,UAAA;AAAA,EAC7C;AACF;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/utility/cleanup.ts","../src/globalSetup/global-setup.ts","../src/utility/platform.ts","../src/model/core/states.ts","../src/model/core/operations.ts","../src/model/core/types.ts","../src/model/pages/base-page.ts","../src/model/pages/settings-page.ts","../src/model/pages/cli-tools-page.ts","../src/model/pages/experimental-page.ts","../src/model/pages/preferences-page.ts","../src/model/pages/registries-page.ts","../src/model/pages/resource-card-page.ts","../src/model/pages/resource-connection-card-page.ts","../src/model/pages/resources-page.ts","../src/model/pages/settings-bar.ts","../src/model/pages/details-page.ts","../src/model/pages/create-volume-page.ts","../src/model/pages/main-page.ts","../src/model/pages/volumes-page.ts","../src/model/pages/volume-details-page.ts","../src/utility/operations.ts","../src/model/core/platforms.ts","../src/model/pages/image-edit-page.ts","../src/model/pages/deploy-to-kubernetes-page.ts","../src/model/pages/container-details-page.ts","../src/model/pages/run-image-page.ts","../src/model/pages/image-details-page.ts","../src/model/pages/pull-image-page.ts","../src/model/pages/images-page.ts","../src/model/pages/build-image-page.ts","../src/model/pages/podman-kube-play-page.ts","../src/model/pages/pods-details-page.ts","../src/model/pages/pods-page.ts","../src/model/pages/create-pod-page.ts","../src/model/pages/select-image-page.ts","../src/model/pages/containers-page.ts","../src/model/pages/dashboard-page.ts","../src/model/pages/extension-details-page.ts","../src/model/pages/extension-card-page.ts","../src/model/pages/extensions-page.ts","../src/model/pages/kubernetes-dashboard-page.ts","../src/model/pages/kubernetes-resource-details-page.ts","../src/model/pages/kubernetes-resource-page.ts","../src/model/pages/kubernetes-bar.ts","../src/model/pages/network-details-page.ts","../src/model/pages/create-network-page.ts","../src/model/pages/networks-page.ts","../src/model/workbench/navigation.ts","../src/utility/wait.ts","../src/runner/runner-options.ts","../src/runner/podman-desktop-runner.ts","../src/setupFiles/setup-registry.ts","../src/utility/auth-utils.ts","../src/model/pages/cluster-creation-base-page.ts","../src/model/pages/create-kind-cluster-page.ts","../src/model/pages/resource-details-page.ts","../src/model/pages/tasks-page.ts","../src/model/workbench/status-bar.ts","../src/utility/cluster-operations.ts","../src/model/pages/welcome-page.ts","../src/utility/fixtures.ts","../src/utility/kubernetes.ts","../src/utility/provider.ts","../src/model/core/extensions.ts","../src/model/pages/authentication-page.ts","../src/model/pages/command-palette.ts","../src/model/pages/onboarding-page.ts","../src/model/pages/compose-onboarding/compose-onboarding-page.ts","../src/model/pages/compose-onboarding/compose-failed-page.ts","../src/model/pages/compose-onboarding/compose-local-install-page.ts","../src/model/pages/compose-onboarding/compose-version-page.ts","../src/model/pages/compose-onboarding/compose-wide-install-page.ts","../src/model/components/dropdown-component.ts","../src/model/pages/forms/machine-creation-form.ts","../src/model/pages/create-machine-page.ts","../src/model/pages/docker-compatibility-page.ts","../src/model/pages/extension-catalog-card-page.ts","../src/model/pages/kubernetes-context-page.ts","../src/model/pages/podman-machine-details-page.ts","../src/model/pages/podman-onboarding-page.ts","../src/model/pages/resource-cli-card-page.ts","../src/model/pages/troubleshooting-page.ts"],"sourcesContent":["/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { existsSync, rmSync } from 'node:fs';\n\n/**\n * Force remove recursively folder, if exists\n * @param path path to a folder to be force removed recursively\n */\nexport async function removeFolderIfExists(path: string): Promise<void> {\n console.log(`Cleaning up folder: ${path}`);\n\n if (existsSync(path)) {\n console.log('Folder found, removing...');\n rmSync(path, { recursive: true, force: true, maxRetries: 5 });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { removeFolderIfExists } from '/@/utility/cleanup';\n\nlet setupCalled = false;\nlet teardownCalled = false;\n\nexport async function setup(): Promise<void> {\n if (!setupCalled) {\n // remove all previous testing output files\n // Junit reporter output file is created before we can clean up output folders\n // It is not possible to remove junit output file because it is opened by the process already, at least on windows\n if (!process.env.CI && !process.env.SKIP_REMOVE_FOLDER) {\n await removeFolderIfExists('tests/output');\n } else {\n console.log(\n 'On CI, skipping before All tests/output cleanup, see https://github.com/containers/podman-desktop/issues/5460',\n );\n }\n setupCalled = true;\n }\n}\n\nexport async function teardown(): Promise<void> {\n if (!teardownCalled) {\n // here comes teardown logic\n teardownCalled = true;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport * as os from 'node:os';\n\nexport const isLinux = os.platform() === 'linux';\nexport const isMac = os.platform() === 'darwin';\nexport const isWindows = os.platform() === 'win32';\nexport const archType = os.arch();\n\n// powershell $true value is 'True', we need to make it a lowercase first\nexport const isCI = String(process.env.CI).toLowerCase() === 'true';\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nexport enum ContainerState {\n Starting = 'STARTING',\n Stopping = 'STOPPING',\n Running = 'RUNNING',\n Error = 'ERROR',\n Exited = 'EXITED',\n Deleting = 'DELETING',\n Created = 'CREATED',\n Paused = 'PAUSED',\n Stopped = 'STOPPED',\n Unknown = 'UNKNOWN',\n}\n\nexport enum PodState {\n Created = 'CREATED',\n Running = 'RUNNING',\n Stopped = 'STOPPED',\n Exited = 'EXITED',\n Dead = 'DEAD',\n Starting = 'STARTING',\n Stopping = 'STOPPING',\n Deleting = 'DELETING',\n Restarting = 'RESTARTING',\n Degraded = 'DEGRADED',\n Paused = 'PAUSED',\n Unknown = 'UNKNOWN',\n}\n\nexport enum VolumeState {\n Used = 'USED',\n Unused = 'UNUSED',\n}\n\nexport enum ResourceElementState {\n Running = 'RUNNING',\n Off = 'OFF',\n Starting = 'STARTING',\n}\n\nexport enum KubernetesResourceState {\n Starting = 'STARTING',\n Running = 'RUNNING',\n Stopped = 'STOPPED',\n Unknown = 'UNKNOWN',\n Succeeded = 'SUCCEEDED',\n None = '',\n}\nexport enum ExtensionState {\n Disabled = 'DISABLED',\n Active = 'ACTIVE',\n Running = 'RUNNING',\n NotInstalled = 'NOT-INSTALLED',\n Downloadable = 'DOWNLOADABLE',\n}\n\nexport enum ImageState {\n Used = 'USED',\n Unused = 'UNUSED',\n}\n\nexport enum TaskState {\n Canceled = 'canceled',\n Success = 'success',\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nexport enum ResourceElementActions {\n Start = 'Start',\n Restart = 'Restart',\n Stop = 'Stop',\n Delete = 'Delete',\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nexport interface ContainerInteractiveParams {\n interactive?: boolean;\n attachTerminal?: boolean;\n attachVolumeName?: string;\n attachVolumePath?: string;\n}\n\nexport interface KindClusterOptions {\n configFilePath?: string;\n providerType?: string;\n httpPort?: string;\n httpsPort?: string;\n useIngressController?: boolean;\n containerImage?: string;\n}\n\nexport interface DeployPodOptions {\n useKubernetesServices?: boolean;\n useRestrictedSecurityContext?: boolean;\n useKubernetesIngress?: boolean;\n containerExposedPort?: string;\n isOpenShiftCluster?: boolean;\n useOpenShiftRoutes?: boolean;\n}\n\nexport enum PodmanKubePlayOptions {\n SelectYamlFile = 0,\n CreateYamlFileFromScratch = 1,\n}\n\nexport interface PlayFromScratch {\n podmanKubePlayOption: PodmanKubePlayOptions.CreateYamlFileFromScratch;\n jsonResourceDefinition: string;\n}\n\nexport interface PlayFromYaml {\n podmanKubePlayOption: PodmanKubePlayOptions.SelectYamlFile;\n pathToYaml: string;\n}\n\nexport type PlayYamlOptions = PlayFromScratch | PlayFromYaml;\n\nexport enum KubernetesResources {\n Nodes = 'Nodes',\n Deployments = 'Deployments',\n Services = 'Services',\n IngeressesRoutes = 'Ingresses & Routes',\n PVCs = 'Persistent Volume Claims',\n ConfigMapsSecrets = 'ConfigMaps & Secrets',\n PortForwarding = 'Port Forwarding',\n Pods = 'Pods',\n Cronjobs = 'CronJobs',\n Jobs = 'Jobs',\n}\n\nexport const KubernetesResourceAttributes: Record<KubernetesResources, string[]> = {\n [KubernetesResources.Nodes]: ['Status', 'Name', 'Roles', 'Version', 'OS', 'Kernel', 'Age'],\n [KubernetesResources.Deployments]: ['Selected', 'Status', 'Name', 'Conditions', 'Pods', 'Age', 'Actions'],\n [KubernetesResources.Services]: ['Selected', 'Status', 'Name', 'Type', 'Cluster IP', 'Ports', 'Age', 'Actions'],\n [KubernetesResources.IngeressesRoutes]: ['Selected', 'Status', 'Name', 'Host/Path', 'Backend', 'Age', 'Actions'],\n [KubernetesResources.PVCs]: ['Selected', 'Status', 'Name', 'Environment', 'Age', 'Size', 'Actions'],\n [KubernetesResources.ConfigMapsSecrets]: ['Selected', 'Status', 'Name', 'Type', 'Keys', 'Age', 'Actions'],\n [KubernetesResources.PortForwarding]: ['Status', 'Name', 'Type', 'Local Port', 'Remote Port', 'Actions'],\n [KubernetesResources.Pods]: ['Selected', 'Status', 'Name', 'Containers', 'Age', 'Actions'],\n [KubernetesResources.Cronjobs]: [\n 'Selected',\n 'Status',\n 'Name',\n 'Schedule',\n 'Last scheduled',\n 'Suspended',\n 'Active',\n 'Age',\n 'Actions',\n ],\n [KubernetesResources.Jobs]: ['Selected', 'Status', 'Name', 'Conditions', 'Completions', 'Age', 'Actions'],\n};\n\nexport enum PodmanVirtualizationProviders {\n WSL = 'Wsl',\n HyperV = 'Hyperv',\n AppleHV = 'Apple HyperVisor',\n LibKrun = 'default GPU enabled (LibKrun)',\n Qemu = 'Qemu',\n Native = '', //not a real provider, used for 'Connection Type' check in Resources page of Linux machines\n}\n\n/**\n * Maps each virtualization provider enum value to an array of possible UI values.\n * This allows handling version differences where the same provider may appear with different names.\n * For example, HyperV can appear as 'Hyperv' or 'Hyper-V' in different versions.\n */\nexport const PodmanVirtualizationProviderVariants: Record<PodmanVirtualizationProviders, string[]> = {\n [PodmanVirtualizationProviders.WSL]: ['Wsl', 'WSL'],\n [PodmanVirtualizationProviders.HyperV]: ['Hyperv', 'Hyper-V', 'HyperV'],\n [PodmanVirtualizationProviders.AppleHV]: ['Apple HyperVisor', 'Apple Hypervisor', 'AppleHV'],\n [PodmanVirtualizationProviders.LibKrun]: ['default GPU enabled (LibKrun)', 'LibKrun', 'libkrun'],\n [PodmanVirtualizationProviders.Qemu]: ['Qemu', 'QEMU', 'qemu'],\n [PodmanVirtualizationProviders.Native]: [''],\n};\n\n/**\n * Checks if a given value matches any of the possible variants for a provider enum value.\n * @param provider - The provider enum value to check against\n * @param value - The value to check (case-insensitive comparison)\n * @returns True if the value matches any variant of the provider\n */\nexport function matchesProviderVariant(provider: PodmanVirtualizationProviders, value: string): boolean {\n const variants = PodmanVirtualizationProviderVariants[provider];\n const normalizedValue = value.toLowerCase().trim();\n return variants.some(variant => variant.toLowerCase().trim() === normalizedValue);\n}\n\n/**\n * Gets the first matching provider enum value for a given UI value, or undefined if no match.\n * @param value - The UI value to match (case-insensitive comparison)\n * @returns The matching provider enum value, or undefined if no match\n */\nexport function getProviderFromVariant(value: string): PodmanVirtualizationProviders | undefined {\n const normalizedValue = value.toLowerCase().trim();\n for (const [provider, variants] of Object.entries(PodmanVirtualizationProviderVariants)) {\n if (variants.some(variant => variant.toLowerCase().trim() === normalizedValue)) {\n return provider as PodmanVirtualizationProviders;\n }\n }\n return undefined;\n}\n\nexport enum PodmanMachinePrivileges {\n Rootful = 'rootful',\n Rootless = 'rootless',\n}\n\nexport enum ProxyTypes {\n Disabled = 'Disabled',\n Manual = 'Manual',\n System = 'System',\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Page } from '@playwright/test';\n\nexport abstract class BasePage {\n readonly page: Page;\n // TODO: extract header and content locators into base class, add that roles into all pages\n\n constructor(page: Page) {\n this.page = page;\n }\n\n public getPage(): Page {\n return this.page;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport abstract class SettingsPage extends BasePage {\n readonly tabName: string;\n readonly parent: Locator;\n readonly header: Locator;\n readonly content: Locator;\n\n constructor(page: Page, tabName: string) {\n super(page);\n this.tabName = tabName;\n this.parent = this.page.getByRole('region', { name: tabName });\n this.header = this.parent.getByRole('region', { name: 'Header' });\n this.content = this.parent.getByRole('region', { name: 'Content' });\n }\n\n async getTab(): Promise<Locator> {\n let tabName = this.tabName;\n if (this.tabName === 'Preferences') {\n // special case for lower case first letter in 'preferences' tab\n tabName = this.tabName.toLowerCase();\n }\n return this.page\n .getByRole('navigation', { name: 'PreferencesNavigation' })\n .getByRole('link', { name: tabName, exact: true });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog } from '/@/utility/operations';\nimport { waitUntil } from '/@/utility/wait';\n\nimport { SettingsPage } from './settings-page';\n\nexport class CLIToolsPage extends SettingsPage {\n readonly main: Locator;\n readonly header: Locator;\n readonly content: Locator;\n readonly heading: Locator;\n readonly toolsTable: Locator;\n readonly dropDownDialog: Locator;\n readonly versionInputField: Locator;\n private rateLimitReachedFlag = false;\n\n constructor(page: Page) {\n super(page, 'CLI Tools');\n this.main = page.getByRole('region', { name: 'CLI Tools' }); //check name\n this.header = this.main.getByRole('region', { name: 'Header' });\n this.heading = this.header.getByRole('heading', { name: 'CLI Tools', exact: true });\n this.content = this.main.getByRole('region', { name: 'Content' });\n this.toolsTable = this.content.getByRole('table', { name: 'cli-tools' });\n this.dropDownDialog = page.getByRole('dialog', { name: 'drop-down-dialog' });\n this.versionInputField = this.dropDownDialog.getByRole('textbox');\n this.attachRateLimitListener();\n }\n\n public wasRateLimitReached(): boolean {\n return this.rateLimitReachedFlag;\n }\n\n public getToolRow(toolName: string): Locator {\n return this.toolsTable.getByRole('row', { name: toolName, exact: true });\n }\n\n public getInstallButton(toolName: string): Locator {\n return this.getToolRow(toolName).getByLabel('Install', { exact: true });\n }\n\n public getUninstallButton(toolName: string): Locator {\n return this.getToolRow(toolName).getByLabel('Uninstall', { exact: true });\n }\n\n public getUpdateButton(toolName: string): Locator {\n return this.getToolRow(toolName)\n .getByRole('button')\n .and(this.getToolRow(toolName).getByText('Update available', { exact: true }));\n }\n\n public getDowngradeButton(toolName: string): Locator {\n return this.getToolRow(toolName)\n .getByRole('button')\n .and(this.getToolRow(toolName).getByText('Upgrade/Downgrade', { exact: true }));\n }\n\n public getVersionSelectionButton(version: string): Locator {\n return this.dropDownDialog.getByRole('button', { name: version });\n }\n\n public async getCurrentToolVersion(toolName: string): Promise<string> {\n return test.step(`Get current version of ${toolName}`, async () => {\n if ((await this.getToolRow(toolName).getByLabel('no-cli-version', { exact: true }).count()) > 0) {\n return '';\n }\n\n if ((await this.getToolRow(toolName).getByLabel('cli-version', { exact: true }).count()) === 0) {\n return '';\n }\n\n try {\n return await this.getToolRow(toolName).getByLabel('cli-version', { exact: true }).innerText();\n } catch (e) {\n console.log(`Could not get version for ${toolName}: ${e}`);\n return '';\n }\n });\n }\n\n public async installTool(toolName: string, timeout = 60_000): Promise<this> {\n return test.step(`Install ${toolName}`, async () => {\n await playExpect(this.getInstallButton(toolName)).toBeEnabled();\n await this.getInstallButton(toolName).click();\n\n await this.ensureAPIRateLimitNotReached();\n const confirmationDialog = this.page.getByRole('dialog', { name: toolName });\n try {\n await playExpect(confirmationDialog).toBeVisible();\n await handleConfirmationDialog(this.page, toolName);\n } catch {\n console.log(`Dialog for tool ${toolName} was not visible. Proceeding.`);\n }\n\n await playExpect.poll(async () => await this.getCurrentToolVersion(toolName), { timeout: timeout }).toBeTruthy();\n return this;\n });\n }\n\n public async uninstallTool(toolName: string, timeout = 60_000): Promise<this> {\n return test.step(`Uninstall ${toolName}`, async () => {\n if ((await this.getUninstallButton(toolName).count()) === 0) {\n console.log(`Tool ${toolName} is not installed`);\n return this;\n }\n\n await playExpect(this.getUninstallButton(toolName)).toBeEnabled();\n await this.getUninstallButton(toolName).click();\n await handleConfirmationDialog(this.page, 'Uninstall');\n\n await playExpect.poll(async () => await this.getCurrentToolVersion(toolName), { timeout: timeout }).toBeFalsy();\n return this;\n });\n }\n\n public async downgradeTool(toolName: string, version = '', timeout = 60_000): Promise<this> {\n return test.step(`Downgrade ${toolName}`, async () => {\n const currentVersion = await this.getCurrentToolVersion(toolName);\n if (!currentVersion) {\n throw new Error(`Tool ${toolName} is not installed`);\n }\n\n if ((await this.getDowngradeButton(toolName).count()) === 0) {\n console.log(`Tool ${toolName} is already in a downgraded version`);\n return this;\n }\n\n await playExpect(this.getDowngradeButton(toolName)).toBeEnabled();\n await this.getDowngradeButton(toolName).click();\n\n await this.ensureAPIRateLimitNotReached();\n await playExpect(this.dropDownDialog).toBeVisible();\n\n let versionToSelect = version;\n if (!versionToSelect) {\n versionToSelect = await this.getFirstDifferentVersionFromList(currentVersion);\n }\n\n await playExpect(this.getVersionSelectionButton(versionToSelect)).toBeEnabled();\n await this.getVersionSelectionButton(versionToSelect).click();\n\n await this.ensureAPIRateLimitNotReached();\n await playExpect\n .poll(async () => await this.getCurrentToolVersion(toolName), { timeout: timeout })\n .toContain(versionToSelect);\n return this;\n });\n }\n\n public async updateTool(toolName: string, timeout = 60_000): Promise<this> {\n return test.step(`Update ${toolName}`, async () => {\n const currentVersion = await this.getCurrentToolVersion(toolName);\n if (!currentVersion) {\n throw new Error(`Tool ${toolName} is not installed`);\n }\n\n if ((await this.getUpdateButton(toolName).count()) === 0) {\n console.log(`Tool ${toolName} is already on latest`);\n return this;\n }\n\n await playExpect(this.getUpdateButton(toolName)).toBeEnabled();\n await this.getUpdateButton(toolName).click();\n\n await this.ensureAPIRateLimitNotReached();\n await playExpect\n .poll(async () => await this.getCurrentToolVersion(toolName), { timeout: timeout })\n .not.toContain(currentVersion);\n\n return this;\n });\n }\n\n public async ensureAPIRateLimitNotReached(): Promise<void> {\n await waitUntil(async () => this.wasRateLimitReached(), { timeout: 2_000, sendError: false });\n if (this.rateLimitReachedFlag) {\n console.log('Skipping test due to API rate limit being reached');\n test.skip(true, 'Skipping test due to API rate limit being reached');\n }\n }\n\n private async getFirstDifferentVersionFromList(currentVersion = ''): Promise<string> {\n if (!currentVersion) {\n return this.dropDownDialog.getByRole('button').first().innerText();\n }\n const versionSplitInParts = currentVersion.split(' ');\n const versionNumber = versionSplitInParts[versionSplitInParts.length - 1];\n return this.dropDownDialog.getByRole('button').filter({ hasNotText: versionNumber }).first().innerText();\n }\n\n private attachRateLimitListener(): void {\n this.page.on('console', msg => {\n if (msg.text().includes('API rate limit exceeded')) {\n console.log('Rate limit flag triggered!');\n this.rateLimitReachedFlag = true;\n }\n if (msg.text().includes('/releases') && msg.text().includes('403 with id')) {\n console.log('Could not fetch releases - assuming rate limit exceeded');\n this.rateLimitReachedFlag = true;\n }\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { SettingsPage } from './settings-page';\n\nexport class ExperimentalPage extends SettingsPage {\n readonly heading: Locator;\n readonly enableAllExperimentalFeaturesCheckbox: Locator;\n readonly enableAllExperimentalFeaturesButton: Locator;\n readonly statusBarProvidersCheckbox: Locator;\n\n constructor(page: Page) {\n super(page, 'Experimental');\n this.heading = this.header.getByRole('heading', { name: 'Title' }).and(this.header.getByText('Experimental'));\n this.enableAllExperimentalFeaturesCheckbox = this.content\n .getByRole('checkbox')\n .and(this.content.locator('#input-experimental-enable-all'));\n this.enableAllExperimentalFeaturesButton = this.enableAllExperimentalFeaturesCheckbox.locator('..');\n this.statusBarProvidersCheckbox = this.content.getByRole('checkbox', { name: 'Show providers in the status bar' });\n }\n\n public async enableAllExperimentalFeatures(): Promise<void> {\n await playExpect(this.enableAllExperimentalFeaturesCheckbox).toBeVisible();\n\n if (!(await this.enableAllExperimentalFeaturesCheckbox.isChecked())) {\n await this.enableAllExperimentalFeaturesButton.check();\n }\n\n await playExpect(this.enableAllExperimentalFeaturesCheckbox).toBeChecked();\n }\n\n public async disableAllExperimentalFeatures(): Promise<void> {\n await playExpect(this.enableAllExperimentalFeaturesCheckbox).toBeVisible();\n\n if (await this.enableAllExperimentalFeaturesCheckbox.isChecked()) {\n await this.enableAllExperimentalFeaturesButton.uncheck();\n }\n\n await playExpect(this.enableAllExperimentalFeaturesCheckbox).not.toBeChecked();\n }\n\n public async setExperimentalCheckbox(checkbox: Locator, enable: boolean): Promise<void> {\n await playExpect(checkbox).toBeVisible();\n const isEnabled = await checkbox.isChecked();\n if (isEnabled !== enable) {\n await checkbox.locator('..').setChecked(enable);\n const isEnabled = await checkbox.isChecked();\n playExpect(isEnabled).toEqual(enable);\n }\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { SettingsPage } from './settings-page';\n\nexport class PreferencesPage extends SettingsPage {\n readonly heading: Locator;\n readonly searchbar: Locator;\n readonly kubePathInput: Locator;\n readonly APPEARANCE_PREFERENCE_LABEL = 'Appearance';\n\n constructor(page: Page) {\n super(page, 'Preferences');\n this.heading = this.header.getByLabel('Title', { exact: true });\n this.searchbar = this.header.getByLabel('search preferences');\n this.kubePathInput = this.content.getByLabel(\n 'Path to the Kubeconfig file for accessing clusters. (Default is usually ~/.kube/config)',\n );\n }\n\n getPreferenceRowByName(name: string): Locator {\n return this.content\n .locator('div.flex.flex-row.justify-between')\n .filter({ has: this.page.getByText(name, { exact: true }) });\n }\n\n async isPreferenceManaged(name: string): Promise<boolean> {\n const preferenceRow = this.getPreferenceRowByName(name);\n return (await preferenceRow.getByText('Managed').count()) > 0;\n }\n\n async resetPreference(name: string): Promise<void> {\n const preferenceRow = this.getPreferenceRowByName(name);\n const resetButton = preferenceRow.getByRole('button', { name: 'Reset to default value' });\n await playExpect(resetButton).toBeVisible();\n await resetButton.click();\n }\n\n async getAppearancePreferenceValue(): Promise<string> {\n const appearancePreferenceRow = this.getPreferenceRowByName(this.APPEARANCE_PREFERENCE_LABEL);\n await playExpect(appearancePreferenceRow).toBeAttached();\n await appearancePreferenceRow.scrollIntoViewIfNeeded();\n await playExpect(appearancePreferenceRow).toBeVisible();\n\n const preferenceInput = appearancePreferenceRow.getByLabel('hidden input');\n await playExpect(preferenceInput).toBeAttached();\n return await preferenceInput.inputValue();\n }\n\n async setAppearancePreference(value: string): Promise<void> {\n const appearancePreferenceRow = this.getPreferenceRowByName(this.APPEARANCE_PREFERENCE_LABEL);\n await playExpect(appearancePreferenceRow).toBeAttached();\n await appearancePreferenceRow.scrollIntoViewIfNeeded();\n await playExpect(appearancePreferenceRow).toBeVisible();\n\n const selectionButton = appearancePreferenceRow.getByLabel(\n 'Select between light or dark mode, or use your system setting.',\n );\n await playExpect(selectionButton).toBeVisible();\n await selectionButton.click();\n\n const option = appearancePreferenceRow.getByRole('button', { name: value, exact: true });\n await playExpect(option).toBeVisible();\n await option.click();\n }\n\n async selectKubeFile(pathToKube: string): Promise<void> {\n return test.step('Select Kube File', async () => {\n if (!pathToKube) {\n throw Error('Path to Kube config file is incorrect or not provided!');\n }\n playExpect(this.kubePathInput).toBeDefined();\n await this.kubePathInput.clear();\n await playExpect(this.kubePathInput).toHaveValue('');\n\n await this.kubePathInput.fill(pathToKube);\n await playExpect(this.kubePathInput).toHaveValue(pathToKube);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect } from '@playwright/test';\nimport type { Locator, Page } from 'playwright';\n\nimport { waitUntil } from '/@/utility/wait';\n\nimport { SettingsPage } from './settings-page';\n\nexport class RegistriesPage extends SettingsPage {\n readonly heading: Locator;\n readonly addRegistryButton: Locator;\n readonly registriesTable: Locator;\n readonly addRegistryDialog: Locator;\n readonly cancelDialogButton: Locator;\n readonly confirmDialogButton: Locator;\n readonly registryUrlField: Locator;\n readonly registryUsernameField: Locator;\n readonly registryPswdField: Locator;\n\n constructor(page: Page) {\n super(page, 'Registries');\n this.heading = page.getByRole('heading').and(page.getByText('Registries', { exact: true }));\n this.addRegistryButton = page.getByRole('button', { name: 'Add registry' });\n this.registriesTable = page.getByRole('table', { name: 'Registries' });\n this.addRegistryDialog = page.getByRole('dialog', { name: 'Add Registry' });\n this.cancelDialogButton = this.addRegistryDialog.getByRole('button', {\n name: 'Cancel',\n });\n this.confirmDialogButton = this.addRegistryDialog.getByRole('button', {\n name: 'Add',\n });\n this.registryUrlField = this.addRegistryDialog.getByPlaceholder('https://registry.io');\n this.registryUsernameField = this.addRegistryDialog.getByPlaceholder('username');\n this.registryPswdField = this.addRegistryDialog.getByPlaceholder('password');\n }\n\n async createRegistry(url: string, username: string, pswd: string): Promise<void> {\n return test.step('Create a new registry', async () => {\n await this.page.waitForTimeout(4_000);\n await playExpect(this.addRegistryButton).toBeEnabled();\n await this.addRegistryButton.click();\n await playExpect(this.addRegistryDialog).toBeVisible();\n await playExpect(this.cancelDialogButton).toBeEnabled();\n\n await this.registryUrlField.fill(url);\n await this.registryUsernameField.fill(username);\n await this.registryPswdField.fill(pswd);\n\n await playExpect(this.confirmDialogButton).toBeEnabled();\n await this.confirmDialogButton.click();\n });\n }\n\n async editRegistry(title: string, newUsername: string, newPswd: string): Promise<void> {\n return test.step('Edit registry', async () => {\n const registryBox = await this.getRegistryRowByName(title);\n\n const dropdownMenu = registryBox.getByRole('button', {\n name: 'kebab menu',\n });\n await dropdownMenu.click();\n\n const editButton = registryBox.getByTitle('Edit password');\n await editButton.click();\n\n const registryUsername = registryBox.getByLabel('Username');\n const registryPswd = registryBox.getByRole('textbox', {\n name: 'Password',\n });\n await registryUsername.pressSequentially(newUsername, { delay: 100 });\n await registryPswd.pressSequentially(newPswd, { delay: 100 });\n\n const loginButton = registryBox.getByRole('button', { name: 'Login' });\n await this.loginButtonHandling(loginButton);\n });\n }\n\n /*\n * There are two types of registries, if it is custom, then it can be actually deleted\n * If it is default registry, it will delete only the credentials and the record will be kept there.\n */\n async removeRegistry(title: string): Promise<void> {\n return test.step('Remove registry', async () => {\n const registryBox = await this.getRegistryRowByName(title);\n\n const dropdownMenu = registryBox.getByRole('button', {\n name: 'kebab menu',\n });\n try {\n await dropdownMenu.waitFor({ state: 'visible', timeout: 3_000 });\n } catch (_err) {\n throw Error(`Dropdown menu on ${title} registry not available.`);\n }\n await dropdownMenu.click();\n\n const editButton = registryBox.getByTitle('Remove');\n await editButton.click();\n });\n }\n\n async getRegistryRowByName(name: string): Promise<Locator> {\n return this.registriesTable.getByRole('row', { name: name });\n }\n\n private async loginButtonHandling(loginButton: Locator): Promise<void> {\n return test.step('Handle login button', async () => {\n try {\n await waitUntil(\n async function loginIsEnabled() {\n return await loginButton.isEnabled();\n },\n { message: 'Login Button not enabled in time' },\n );\n await loginButton.click({ timeout: 3000 });\n } catch (err) {\n throw Error(`An error occured when trying to log into registry: ${(err as Error).message}`);\n }\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport abstract class ResourceCardPage extends BasePage {\n readonly parent: Locator;\n readonly card: Locator;\n readonly providerSetup: Locator;\n readonly providerConnections: Locator;\n readonly markdownContent: Locator;\n readonly setupButton: Locator;\n\n constructor(page: Page, resourceName: string) {\n super(page);\n this.parent = this.page.getByRole('region', { name: 'content' });\n this.card = this.parent.getByRole('region', { name: resourceName, exact: true });\n this.providerSetup = this.card.getByRole('region', { name: 'Provider Setup', exact: true });\n this.providerConnections = this.card.getByRole('region', { name: 'Provider Connections', exact: true });\n this.markdownContent = this.providerConnections.getByLabel('markdown-content');\n this.setupButton = this.providerSetup.getByRole('button', { name: 'Setup' });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport type { ResourceElementActions } from '/@/model/core/operations';\n\nimport { ResourceCardPage } from './resource-card-page';\n\nexport class ResourceConnectionCardPage extends ResourceCardPage {\n readonly resourceElement: Locator;\n readonly resourceElementDetailsButton: Locator;\n readonly resourceElementConnectionStatus: Locator;\n readonly resourceElementConnectionActions: Locator;\n readonly createButton: Locator;\n readonly connectionType: Locator;\n readonly machinePrivileges: Locator;\n\n constructor(page: Page, resourceName: string, resourceElementVisibleName?: string) {\n super(page, resourceName);\n this.resourceElement = this.providerConnections.getByRole('region', {\n name: resourceElementVisibleName,\n exact: true,\n });\n this.resourceElementDetailsButton = this.resourceElement.getByRole('button', { name: 'details' });\n this.resourceElementConnectionStatus = this.resourceElement.getByLabel('Connection Status Label');\n this.resourceElementConnectionActions = this.resourceElement.getByRole('group', { name: 'Connection Actions' });\n this.createButton = this.providerSetup.getByRole('button', {\n name: 'Create',\n });\n this.connectionType = this.resourceElement.getByLabel('Connection Type');\n this.machinePrivileges = this.resourceElement.getByLabel('Machine with root privileges:');\n }\n\n public async doesResourceElementExist(): Promise<boolean> {\n return (await this.resourceElement.count()) > 0;\n }\n\n public async performConnectionAction(operation: ResourceElementActions, timeout = 25000): Promise<void> {\n return test.step(`Perform connection action '${operation}' on resource element '${this.resourceElement}'`, async () => {\n const button = this.resourceElementConnectionActions.getByRole('button', {\n name: operation,\n exact: true,\n });\n await playExpect(button).toBeEnabled({ timeout: timeout });\n await button.click();\n });\n }\n\n public async getConnectionInfoByLabel(label: string): Promise<string> {\n return (await this.card.getByLabel(label, { exact: true }).textContent()) ?? '';\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from 'playwright';\n\nimport { SettingsPage } from './settings-page';\n\nexport class ResourcesPage extends SettingsPage {\n readonly heading: Locator;\n readonly featuredProviderResources: Locator;\n\n constructor(page: Page) {\n super(page, 'Resources');\n this.heading = this.header.getByRole('heading', { name: 'Title' }).and(this.header.getByText('Resources'));\n this.featuredProviderResources = this.content.getByRole('region', { name: 'Featured Provider Resources' });\n }\n\n public async resourceCardIsVisible(resourceCardAriaLabel: string): Promise<boolean> {\n return (await this.resourceCardLocatorGenerator(resourceCardAriaLabel).count()) > 0;\n }\n\n public async goToCreateNewResourcePage(resourceCardAriaLabel: string, newResourceName = ''): Promise<void> {\n if (!(await this.resourceCardIsVisible(resourceCardAriaLabel))) {\n throw new Error(`Resource card with label \"${resourceCardAriaLabel}\" is not available`);\n }\n\n const buttonName = newResourceName || resourceCardAriaLabel;\n await this.resourceCardLocatorGenerator(resourceCardAriaLabel)\n .getByRole('button', { name: `Create new ${buttonName}` })\n .click();\n }\n\n private resourceCardLocatorGenerator(resourceCardAriaLabel: string): Locator {\n return this.content.getByRole('region', { name: resourceCardAriaLabel, exact: true });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { type Locator, type Page, test } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport type { SettingsPage } from './settings-page';\n\nexport class SettingsBar {\n readonly page: Page;\n readonly settingsNavBar: Locator;\n readonly resourcesTab: Locator;\n readonly proxyTab: Locator;\n readonly registriesTab: Locator;\n readonly authenticationTab: Locator;\n readonly preferencesTab: Locator;\n readonly cliToolsTab: Locator;\n readonly kubernetesTab: Locator;\n\n constructor(page: Page) {\n this.page = page;\n this.settingsNavBar = page.getByRole('navigation', { name: 'PreferencesNavigation' });\n this.resourcesTab = this.settingsNavBar.getByRole('link', { name: 'Resources' });\n this.proxyTab = this.settingsNavBar.getByRole('link', { name: 'Proxy' });\n this.registriesTab = this.settingsNavBar.getByRole('link', { name: 'Registries' });\n this.authenticationTab = this.settingsNavBar.getByRole('link', { name: 'Authentication' });\n this.cliToolsTab = this.settingsNavBar.getByRole('link', { name: 'CLI Tools' });\n this.kubernetesTab = this.settingsNavBar.getByRole('link', { name: 'Kubernetes' });\n this.preferencesTab = this.settingsNavBar.getByRole('link', { name: 'preferences' });\n }\n\n public async openTabPage<T extends SettingsPage>(type: new (page: Page) => T): Promise<T> {\n return test.step(`Open ${type.name} tab from Settings`, async () => {\n const desiredPage = new type(this.page);\n const tab = await desiredPage.getTab();\n await playExpect(tab).toBeVisible();\n await tab.click({ force: true });\n return desiredPage;\n });\n }\n\n public getSettingsNavBarTabLocator(name: string): Locator {\n return this.settingsNavBar.getByLabel(name);\n }\n\n public getPreferencesLinkLocator(label: string): Locator {\n return this.settingsNavBar.getByRole('link', { name: label, exact: true });\n }\n\n public getLinkLocatorByHref(href: string): Locator {\n return this.settingsNavBar.locator(`[href*=\"${href}\"]`);\n }\n\n public async expandPreferencesTab(): Promise<void> {\n await playExpect(this.preferencesTab).toBeVisible({ timeout: 10_000 });\n await this.preferencesTab.click();\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { type Locator, type Page } from '@playwright/test';\n\nimport { waitUntil } from '/@/utility/wait';\n\nimport { BasePage } from './base-page';\n\nexport abstract class DetailsPage extends BasePage {\n readonly header: Locator;\n readonly tabs: Locator;\n readonly tabContent: Locator;\n readonly controlActions: Locator;\n readonly closeButton: Locator;\n readonly backLink: Locator;\n readonly pageName: Locator;\n readonly resourceName: string;\n readonly heading: Locator;\n readonly breadcrumb: Locator;\n\n constructor(page: Page, resourceName: string) {\n super(page);\n this.resourceName = resourceName;\n\n this.tabContent = page.getByRole('region', { name: 'Tab Content' });\n this.header = page.getByRole('region', { name: 'Header' });\n this.tabs = page.getByRole('region', { name: 'Tabs' });\n this.breadcrumb = this.header.getByRole('navigation', { name: 'Breadcrumb' });\n this.controlActions = this.header.getByRole('group', { name: 'Control Actions' });\n this.heading = this.header.getByRole('heading', { name: this.resourceName });\n this.closeButton = this.breadcrumb.getByRole('button', { name: 'Close' });\n this.backLink = this.breadcrumb.getByRole('link', { name: 'Back' });\n this.pageName = this.breadcrumb.getByRole('region', { name: 'Page Name' });\n }\n\n async activateTab(tabName: string): Promise<this> {\n return test.step(`Activate tab: ${tabName}`, async () => {\n const tabItem = this.tabs.getByRole('link', { name: tabName, exact: true });\n await waitUntil(async () => await tabItem.isVisible(), {\n message: `Tab ${tabName} does not exist currently, maybe entry was deleted!`,\n });\n await tabItem.click();\n return this;\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { VolumesPage } from './volumes-page';\n\nexport class CreateVolumePage extends BasePage {\n readonly heading: Locator;\n readonly closeLink: Locator;\n readonly volumeNameBox: Locator;\n readonly doneButton: Locator;\n readonly closeButton: Locator;\n readonly createVolumeButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = this.page.getByRole('heading', { name: 'Create a volume' });\n this.closeLink = this.page.getByRole('link', { name: 'Close' });\n this.volumeNameBox = this.page.getByRole('textbox', {\n name: 'Volume name',\n });\n this.doneButton = this.page.getByRole('button', { name: 'Done' });\n this.closeButton = this.page.getByRole('button', { name: 'Close' });\n this.createVolumeButton = this.page.getByRole('button', { name: 'Create' });\n }\n\n async createVolume(name: string): Promise<VolumesPage> {\n return test.step(`Create volume ${name}`, async () => {\n await this.volumeNameBox.fill(name);\n await playExpect(this.createVolumeButton).toBeEnabled();\n await this.createVolumeButton.click();\n await playExpect(this.doneButton).toBeEnabled({ timeout: 30000 });\n await this.doneButton.click();\n return new VolumesPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { type Locator, type Page, test } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { waitUntil } from '/@/utility/wait';\n\nimport { BasePage } from './base-page';\n\n/**\n * Abstract representation of a visual page objects of the main content pages of Podman Desktop app: Images,\n * Containers, Volumes and Pods.\n * Is not intended to be directly used, but rather by particular page's implementation.\n */\nexport abstract class MainPage extends BasePage {\n readonly title: string;\n readonly mainPage: Locator;\n readonly header: Locator;\n readonly search: Locator;\n readonly content: Locator;\n readonly additionalActions: Locator;\n readonly bottomAdditionalActions: Locator;\n readonly heading: Locator;\n readonly noContainerEngineHeading: Locator;\n readonly noImagesHeading: Locator;\n readonly rowTable: Locator;\n\n constructor(page: Page, title: string) {\n super(page);\n this.title = title;\n this.mainPage = page.getByRole('region', { name: this.title });\n this.header = this.mainPage.getByRole('region', { name: 'header' });\n this.search = this.mainPage.getByRole('region', { name: 'search' });\n this.content = this.mainPage.getByRole('region', { name: 'content' });\n this.additionalActions = this.header.getByRole('group', {\n name: 'additionalActions',\n });\n this.bottomAdditionalActions = this.search.getByRole('group', {\n name: 'bottomAdditionalActions',\n });\n this.heading = this.header.getByRole('heading', { name: this.title });\n this.noContainerEngineHeading = this.content.getByRole('heading', {\n name: 'No Container Engine',\n exact: true,\n });\n this.noImagesHeading = this.content.getByRole('heading', {\n name: `No ${this.title}`,\n exact: true,\n });\n this.rowTable = this.content.getByRole('table');\n }\n\n /**\n * Check the presence of items in main page's content.\n * @returns true, if there are any items present in the content's table, false otherwise\n */\n async pageIsEmpty(): Promise<boolean> {\n return test.step('Check if the page is empty', async () => {\n if (await this.noContainerEngine()) return true;\n return (await this.noImagesHeading.count()) > 0;\n });\n }\n\n async noContainerEngine(): Promise<boolean> {\n return test.step('Check if there is no container engine', async () => {\n return (await this.noContainerEngineHeading.count()) > 0;\n });\n }\n\n async rowsAreVisible(): Promise<boolean> {\n return await this.page.getByRole('row').first().isVisible();\n }\n\n async getAllTableRows(): Promise<Locator[]> {\n return await this.rowTable.getByRole('row').all();\n }\n\n async getRowsFromTableByStatus(status: string): Promise<Locator[]> {\n return test.step(`Get rows from ${this.title} page table by status: ${status}`, async () => {\n await waitUntil(async () => await this.rowsAreVisible(), {\n sendError: false,\n });\n\n const rows = await this.getAllTableRows();\n const filteredRows = [];\n for (let rowNum = 1; rowNum < rows.length; rowNum++) {\n //skip header\n const statusCount = await rows[rowNum].getByRole('cell').nth(2).getByTitle(status, { exact: true }).count();\n if (statusCount > 0) filteredRows.push(rows[rowNum]);\n }\n return filteredRows;\n });\n }\n\n async countRowsFromTable(): Promise<number> {\n return test.step(`Count rows from ${this.title} page table`, async () => {\n await waitUntil(async () => await this.rowsAreVisible(), {\n sendError: false,\n });\n const table = this.content.getByRole('table');\n const rows = await table.getByRole('row').all();\n return rows.length > 1 ? rows.length - 1 : 0;\n });\n }\n\n async getRowByName(name: string, exact = true): Promise<Locator | undefined> {\n return test.step(`Get row from ${this.title} page table by name: ${name}`, async () => {\n const locator = this.page\n .getByRole('row')\n .and(this.page.getByLabel(name, { exact: exact }))\n .first();\n\n return (await locator.count()) > 0 ? locator : undefined;\n });\n }\n\n async waitForRowToExists(name: string, timeout = 5_000): Promise<boolean> {\n return test.step(`Wait for row with name: ${name} to exist`, async () => {\n await waitUntil(async () => (await this.getRowByName(name)) !== undefined, { timeout: timeout });\n return true;\n });\n }\n\n async waitForRowToBeDelete(name: string, timeout = 5_000): Promise<boolean> {\n return test.step(`Wait for row with name: ${name} to be deleted`, async () => {\n await waitUntil(async () => (await this.getRowByName(name)) === undefined, { timeout: timeout });\n return true;\n });\n }\n\n async uncheckAllRows(): Promise<void> {\n return test.step(`Uncheck all rows on ${this.title} page`, async () => {\n try {\n const toggle = await this.getToggleLocator();\n\n if ((await toggle.innerHTML()).includes('pd-input-checkbox-indeterminate')) {\n await toggle.click();\n }\n\n if ((await toggle.innerHTML()).includes('pd-input-checkbox-checked')) {\n await toggle.click();\n }\n\n await playExpect\n .poll(async () => await toggle.innerHTML(), { timeout: 15_000 })\n .toContain('pd-input-checkbox-unchecked');\n } catch (err) {\n console.log(`Exception caught on ${this.title} page when checking cells for unchecking with message: ${err}`);\n throw err;\n }\n });\n }\n\n async checkAllRows(): Promise<void> {\n return test.step(`Checks all rows on ${this.title} page`, async () => {\n try {\n const toggle = await this.getToggleLocator();\n\n if ((await toggle.innerHTML()).includes('pd-input-checkbox-unchecked')) {\n await toggle.click();\n }\n\n await playExpect\n .poll(async () => toggle.innerHTML(), { timeout: 15_000 })\n .toContain('pd-input-checkbox-checked');\n } catch (err) {\n console.log(`Exception caught on containers page when checking cells with message: ${err}`);\n throw err;\n }\n });\n }\n\n private async getToggleLocator(): Promise<Locator> {\n await playExpect(this.rowTable).toBeVisible();\n const controlRow = this.rowTable.getByRole('row').first();\n await playExpect(controlRow).toBeAttached();\n const checkboxColumnHeader = controlRow.getByRole('columnheader').nth(1);\n await playExpect(checkboxColumnHeader).toBeAttached();\n const toggle = checkboxColumnHeader.getByTitle('Toggle all');\n await playExpect(toggle).toBeAttached();\n\n return toggle;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { VolumeState } from '/@/model/core/states';\nimport { handleConfirmationDialog } from '/@/utility/operations';\nimport { waitUntil, waitWhile } from '/@/utility/wait';\n\nimport { CreateVolumePage } from './create-volume-page';\nimport { MainPage } from './main-page';\nimport { VolumeDetailsPage } from './volume-details-page';\n\nexport class VolumesPage extends MainPage {\n readonly createVolumeButton: Locator;\n readonly pruneVolumesButton: Locator;\n readonly collectUsageDataButton: Locator;\n\n constructor(page: Page) {\n super(page, 'volumes');\n this.createVolumeButton = this.additionalActions.getByRole('button', { name: 'Create' });\n this.pruneVolumesButton = this.additionalActions.getByRole('button', { name: 'Prune' });\n this.collectUsageDataButton = this.additionalActions.getByRole('button', { name: 'Gather volume sizes' });\n }\n\n async openCreateVolumePage(volumeName: string): Promise<CreateVolumePage> {\n return test.step('Open Create Volume Page', async () => {\n const row = await this.getVolumeRowByName(volumeName);\n if (row !== undefined) {\n throw Error('Volume is already created');\n }\n\n await playExpect(this.createVolumeButton).toBeEnabled();\n await this.createVolumeButton.click();\n return new CreateVolumePage(this.page);\n });\n }\n\n async openVolumeDetails(volumeName: string): Promise<VolumeDetailsPage> {\n return test.step('Open Volume Details Page', async () => {\n const volumeRow = await this.getVolumeRowByName(volumeName);\n if (volumeRow === undefined) {\n throw Error(`Volume: ${volumeName} does not exist`);\n }\n const containerRowName = volumeRow.getByRole('cell').nth(3);\n await containerRowName.click();\n\n return new VolumeDetailsPage(this.page, volumeName);\n });\n }\n\n async deleteVolume(volumeName: string): Promise<VolumesPage> {\n return test.step('Delete Volume', async () => {\n const volumeRow = await this.getVolumeRowByName(volumeName);\n if (volumeRow === undefined) {\n throw Error(`Volume: ${volumeName} does not exist`);\n }\n const containerRowDeleteButton = volumeRow.getByRole('button', { name: 'Delete Volume' });\n await playExpect(containerRowDeleteButton).toBeEnabled();\n await containerRowDeleteButton.click();\n await handleConfirmationDialog(this.page);\n\n return this;\n });\n }\n\n async getVolumeRowByName(name: string): Promise<Locator | undefined> {\n return this.getRowByName(name, false);\n }\n\n protected async volumeExists(name: string): Promise<boolean> {\n return test.step(`Check if volume ${name} exists`, async () => {\n const result = await this.getVolumeRowByName(name);\n return result !== undefined;\n });\n }\n\n async countVolumesFromTable(): Promise<number> {\n return this.countRowsFromTable();\n }\n\n async countUsedVolumesFromTable(): Promise<number> {\n return (await this.getRowsFromTableByStatus(VolumeState.Used)).length;\n }\n\n async waitForVolumeExists(name: string, timeout = 30_000): Promise<boolean> {\n return test.step(`Wait for volume ${name} to exist`, async () => {\n if (!name) {\n throw Error('Volume name is not provided');\n }\n await waitUntil(async () => await this.volumeExists(name), { timeout });\n return true;\n });\n }\n\n async waitForVolumeDelete(name: string, timeout = 30_000): Promise<boolean> {\n return test.step(`Wait for volume ${name} to be deleted`, async () => {\n if (!name) {\n throw Error('Volume name is not provided');\n }\n await waitWhile(async () => await this.volumeExists(name), { timeout });\n return true;\n });\n }\n\n async pruneVolumes(): Promise<VolumesPage> {\n return test.step('Prune Volumes', async () => {\n await playExpect(this.pruneVolumesButton).toBeEnabled();\n await this.pruneVolumesButton.click();\n await handleConfirmationDialog(this.page, 'Prune');\n return this;\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { VolumeState } from '/@/model/core/states';\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { DetailsPage } from './details-page';\nimport { VolumesPage } from './volumes-page';\n\nexport class VolumeDetailsPage extends DetailsPage {\n readonly deleteButton: Locator;\n\n static readonly SUMMARY_TAB = 'Summary';\n\n constructor(page: Page, name: string) {\n super(page, name);\n this.deleteButton = this.controlActions.getByRole('button', {\n name: 'Delete Volume',\n });\n }\n\n async isUsed(): Promise<boolean> {\n return (await this.header.getByTitle(VolumeState.Used).count()) > 0;\n }\n\n async deleteVolume(): Promise<VolumesPage> {\n return test.step('Delete Volume', async () => {\n await playExpect(this.deleteButton).toBeEnabled();\n await this.deleteButton.click();\n await handleConfirmationDialog(this.page);\n return new VolumesPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { execSync } from 'node:child_process';\nimport * as os from 'node:os';\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { ResourceElementActions } from '/@/model/core/operations';\nimport { ResourceElementState } from '/@/model/core/states';\nimport type { PodmanVirtualizationProviders } from '/@/model/core/types';\nimport { matchesProviderVariant, PodmanMachinePrivileges } from '/@/model/core/types';\nimport { CLIToolsPage } from '/@/model/pages/cli-tools-page';\nimport { ExperimentalPage } from '/@/model/pages/experimental-page';\nimport { PreferencesPage } from '/@/model/pages/preferences-page';\nimport { RegistriesPage } from '/@/model/pages/registries-page';\nimport { ResourceConnectionCardPage } from '/@/model/pages/resource-connection-card-page';\nimport { ResourcesPage } from '/@/model/pages/resources-page';\nimport { SettingsBar } from '/@/model/pages/settings-bar';\nimport { VolumeDetailsPage } from '/@/model/pages/volume-details-page';\nimport { NavigationBar } from '/@/model/workbench/navigation';\nimport { isLinux, isMac, isWindows } from '/@/utility/platform';\nimport { waitUntil, waitWhile } from '/@/utility/wait';\n\n/**\n * Stop and delete container defined by its name\n * @param page playwright's page object\n * @param name name of container to be removed\n */\nexport async function deleteContainer(page: Page, name: string): Promise<void> {\n return test.step(`Delete container with name ${name}`, async () => {\n const navigationBar = new NavigationBar(page);\n const containers = await navigationBar.openContainers();\n await playExpect(containers.heading).toBeVisible({ timeout: 10_000 });\n const container = await containers.getContainerRowByName(name);\n // check for container existence\n if (container === undefined) {\n console.log(`container '${name}' does not exist, skipping...`);\n } else {\n // stop container first, might not be running\n const stopButton = container.getByRole('button').and(container.getByLabel('Stop Container'));\n if ((await stopButton.count()) > 0) await stopButton.click();\n\n // delete the container\n const deleteButton = container.getByRole('button').and(container.getByLabel('Delete Container'));\n await deleteButton.click();\n await handleConfirmationDialog(page);\n // wait for container to disappear\n try {\n console.log('Waiting for container to get deleted ...');\n await playExpect\n .poll(async () => await containers.getContainerRowByName(name), { timeout: 30_000 })\n .toBeFalsy();\n } catch (error) {\n if (!(error as Error).message.includes('Page is empty')) {\n throw Error(`Error waiting for container '${name}' to get removed, ${error}`);\n }\n }\n }\n });\n}\n\n/**\n * Delete image defined by its name\n * @param page playwright's page object\n * @param name name of image to be removed\n */\nexport async function deleteImage(page: Page, name: string): Promise<void> {\n return test.step(`Delete image ${name}`, async () => {\n const navigationBar = new NavigationBar(page);\n const images = await navigationBar.openImages();\n await playExpect(images.heading).toBeVisible({ timeout: 10_000 });\n const row = await images.getImageRowByName(name);\n if (row === undefined) {\n console.log(`image '${name}' does not exist, skipping...`);\n } else {\n const deleteButton = row.getByRole('button', { name: 'Delete Image' });\n if (await deleteButton.isEnabled()) {\n await deleteButton.click();\n await handleConfirmationDialog(page);\n } else {\n throw Error(`Cannot delete image ${name}, because it is in use`);\n }\n // wait for image to disappear\n try {\n console.log('image deleting, waiting...');\n await waitWhile(\n async () => {\n const images = await new NavigationBar(page).openImages();\n const result = await images.getImageRowByName(name);\n return !!result;\n },\n { timeout: 10_000, sendError: false },\n );\n } catch (error) {\n if (!(error as Error).message.includes('Page is empty')) {\n throw Error(`Error waiting for image '${name}' to get removed, ${error}`);\n }\n }\n }\n });\n}\n\nexport async function deleteRegistry(page: Page, name: string, failIfNotExist = false): Promise<void> {\n return test.step(`Delete registry ${name}`, async () => {\n const navigationBar = new NavigationBar(page);\n const settingsBar = await navigationBar.openSettings();\n const registryPage = await settingsBar.openTabPage(RegistriesPage);\n const registryRecord = await registryPage.getRegistryRowByName(name);\n await waitUntil(() => registryRecord.isVisible(), { sendError: failIfNotExist });\n if (await registryRecord.isVisible()) {\n // it might be that the record exist but there are no credentials -> it is default registry and it is empty\n // or if there is a kebab memu available\n const dropdownMenu = registryRecord.getByRole('button', { name: 'kebab menu' });\n if (await dropdownMenu.isVisible()) {\n await registryPage.removeRegistry(name);\n }\n }\n });\n}\n\nexport async function deletePod(page: Page, name: string, timeout = 50_000): Promise<void> {\n return test.step(`Delete pod ${name}`, async () => {\n const navigationBar = new NavigationBar(page);\n const pods = await navigationBar.openPods();\n await playExpect(pods.heading).toBeVisible({ timeout: 10_000 });\n const pod = await pods.getPodRowByName(name);\n // check if pod exists\n if (pod === undefined) {\n console.log(`pod '${name}' does not exist, skipping...`);\n } else {\n // delete the pod\n const deleteButton = pod.getByRole('button').and(pod.getByLabel('Delete Pod'));\n await deleteButton.click();\n // config delete dialog\n await handleConfirmationDialog(page);\n // wait for pod to disappear\n try {\n console.log('Waiting for pod to get deleted ...');\n await waitWhile(\n async () => {\n return !!(await pods.getPodRowByName(name));\n },\n { timeout: timeout },\n );\n } catch (error) {\n if (!(error as Error).message.includes('Page is empty')) {\n throw Error(`Error waiting for pod '${name}' to get removed, ${error}`);\n }\n }\n }\n });\n}\n\n/**\n * Delete network defined by its name\n * @param page playwright's page object\n * @param name name of network to be removed\n */\nexport async function deleteNetwork(page: Page, name: string): Promise<void> {\n return test.step(`Delete network with name ${name}`, async () => {\n const navigationBar = new NavigationBar(page);\n const networksPage = await navigationBar.openNetworks();\n await playExpect(networksPage.heading).toBeVisible({ timeout: 10_000 });\n const networkExists = await networksPage.networkExists(name);\n\n if (!networkExists) {\n console.log(`network '${name}' does not exist, skipping...`);\n } else {\n await networksPage.deleteNetwork(name);\n\n try {\n console.log('Waiting for network to get deleted ...');\n await playExpect\n .poll(async () => await networksPage.getNetworkRowByName(name), { timeout: 30_000 })\n .toBeFalsy();\n } catch (error) {\n if (!(error as Error).message.includes('Page is empty')) {\n throw Error(`Error waiting for network '${name}' to get removed, ${error}`);\n }\n }\n }\n });\n}\n\n// Handles dialog that has accessible name `dialogTitle` and either confirms or rejects it.\nexport async function handleConfirmationDialog(\n page: Page,\n dialogTitle = 'Confirmation',\n confirm = true,\n confirmationButton = 'Yes',\n cancelButton = 'Cancel',\n timeout = 10_000,\n moreThanOneConsecutiveDialogs = false,\n): Promise<void> {\n // Note: Intentionally not wrapped in test.step to allow proper try-catch handling\n // by callers. test.step has special failure semantics that can interfere with\n // exception handling when this function is used in \"try and see\" patterns.\n const dialog = page.getByRole('dialog', { name: dialogTitle, exact: true });\n await waitUntil(async () => await dialog.isVisible(), { timeout: timeout });\n const button = confirm\n ? dialog.getByRole('button', { name: confirmationButton })\n : dialog.getByRole('button', { name: cancelButton });\n await playExpect(button).toBeEnabled({ timeout: timeout });\n await button.click();\n\n if (moreThanOneConsecutiveDialogs) {\n const doneButton = dialog.getByRole('button', { name: 'Done' });\n await playExpect(doneButton).toBeEnabled({ timeout: timeout });\n await doneButton.click();\n }\n\n await waitUntil(async () => !(await dialog.isVisible()), { timeout: timeout });\n}\n\n/**\n * Handles the Edit Network dialog by filling DNS server fields and clicking Cancel or Update button.\n * @param page playwright's page object\n * @param networkName name of the network being edited\n * @param options optional configuration for DNS servers and action\n */\nexport async function handleEditNetworkDialog(\n page: Page,\n networkName: string,\n options?: {\n dnsServersToAdd?: string;\n dnsServersToRemove?: string;\n action?: 'Cancel' | 'Update';\n },\n): Promise<void> {\n return test.step(`Handle Edit Network dialog for: ${networkName}`, async () => {\n const dialogTitle = `Edit Network ${networkName}`;\n const editDialog = page.getByRole('dialog', { name: dialogTitle });\n await playExpect(editDialog).toBeVisible();\n\n // Get the two input fields (both have placeholder \"8.8.8.8 1.1.1.1\")\n const inputFields = editDialog.getByPlaceholder('8.8.8.8 1.1.1.1');\n const dnsServersToAddInput = inputFields.nth(0);\n const dnsServersToRemoveInput = inputFields.nth(1);\n\n const cancelButton = editDialog.getByRole('button', { name: 'Cancel', exact: true });\n const updateButton = editDialog.getByRole('button', { name: 'Update', exact: true });\n\n if (options?.dnsServersToAdd !== undefined) {\n await dnsServersToAddInput.clear();\n await playExpect(dnsServersToAddInput).toHaveValue('');\n\n await dnsServersToAddInput.fill(options.dnsServersToAdd);\n await playExpect(dnsServersToAddInput).toHaveValue(options.dnsServersToAdd);\n }\n\n if (options?.dnsServersToRemove !== undefined) {\n await dnsServersToRemoveInput.clear();\n await playExpect(dnsServersToRemoveInput).toHaveValue('');\n\n await dnsServersToRemoveInput.fill(options.dnsServersToRemove);\n await playExpect(dnsServersToRemoveInput).toHaveValue(options.dnsServersToRemove);\n }\n\n const action = options?.action ?? 'Update';\n if (action === 'Cancel') {\n await playExpect(cancelButton).toBeEnabled();\n await cancelButton.click();\n } else {\n await playExpect(updateButton).toBeEnabled();\n await updateButton.click();\n }\n\n await playExpect(editDialog).not.toBeVisible();\n });\n}\n\n/**\n * Async function that stops and deletes Podman Machine through Settings -> Resources page\n * @param page playwright's page object\n * @param machineVisibleName Name of the Podman Machine to delete\n */\nexport async function deletePodmanMachine(page: Page, machineVisibleName: string): Promise<void> {\n return test.step('Delete Podman machine', async () => {\n const RESOURCE_NAME: string = 'podman';\n\n // Navigate to resources page\n const navigationBar = new NavigationBar(page);\n const dashboardPage = await navigationBar.openDashboard();\n await playExpect(dashboardPage.heading).toBeVisible();\n\n const settingsBar = await navigationBar.openSettings();\n const resourcesPage = await settingsBar.openTabPage(ResourcesPage);\n await playExpect(resourcesPage.heading).toBeVisible({ timeout: 10_000 });\n\n await playExpect\n .poll(async () => await resourcesPage.resourceCardIsVisible(RESOURCE_NAME), { timeout: 15_000 })\n .toBeTruthy();\n\n const podmanResourceCard = new ResourceConnectionCardPage(page, RESOURCE_NAME, machineVisibleName);\n await playExpect(podmanResourceCard.providerConnections).toBeVisible({ timeout: 10_000 });\n\n // Wait for resource element to be visible\n const isResourceVisible = await waitUntil(async () => await podmanResourceCard.resourceElement.isVisible(), {\n timeout: 30_000,\n })\n .then(() => true)\n .catch(() => false);\n\n if (!isResourceVisible) {\n console.log(`Podman machine [${machineVisibleName}] not present, skipping deletion.`);\n return;\n }\n\n // Ensure connection actions and status are visible\n await playExpect(podmanResourceCard.resourceElementConnectionActions).toBeVisible();\n await playExpect(podmanResourceCard.resourceElementConnectionStatus).toBeVisible();\n\n // Handle machine state and stop if needed\n await ensurePodmanMachineStopped(podmanResourceCard, machineVisibleName);\n\n // Delete the machine\n await podmanResourceCard.performConnectionAction(ResourceElementActions.Delete);\n await playExpect(podmanResourceCard.resourceElement).toBeHidden({ timeout: 60_000 });\n });\n}\n\nasync function ensurePodmanMachineStopped(\n podmanResourceCard: ResourceConnectionCardPage,\n machineVisibleName: string,\n): Promise<void> {\n const currentStatus = await podmanResourceCard.resourceElementConnectionStatus.innerText();\n\n if (currentStatus === ResourceElementState.Off) {\n console.log('Podman machine already stopped');\n return;\n }\n\n // Handle Starting state - use CLI immediately\n if (currentStatus === ResourceElementState.Starting) {\n console.log('Podman machine is starting, will stop via CLI');\n await stopPodmanMachineViaCLI(machineVisibleName);\n await waitForPodmanMachineStoppedState(podmanResourceCard);\n return;\n }\n\n // Handle Running state - try UI first, fallback to CLI\n if (currentStatus === ResourceElementState.Running) {\n try {\n await podmanResourceCard.performConnectionAction(ResourceElementActions.Stop);\n await waitForPodmanMachineStoppedState(podmanResourceCard);\n } catch (error) {\n console.log(\n 'Podman machine stop via UI failed, trying CLI:',\n error instanceof Error ? error.message : String(error),\n );\n await stopPodmanMachineViaCLI(machineVisibleName);\n await waitForPodmanMachineStoppedState(podmanResourceCard);\n }\n }\n}\n\nasync function stopPodmanMachineViaCLI(machineVisibleName: string): Promise<void> {\n // eslint-disable-next-line sonarjs/os-command\n execSync(`podman machine stop ${machineVisibleName}`);\n console.log(`Podman machine stopped via CLI: ${machineVisibleName}`);\n}\n\nasync function waitForPodmanMachineStoppedState(podmanResourceCard: ResourceConnectionCardPage): Promise<void> {\n await playExpect(podmanResourceCard.resourceElementConnectionStatus).toHaveText(ResourceElementState.Off, {\n timeout: 30_000,\n });\n}\n\nexport async function getVolumeNameForContainer(page: Page, containerName: string): Promise<string> {\n return test.step('Get volume name for container', async () => {\n let volumeName: string | null;\n let volumeSummaryContent: string[];\n try {\n const navigationBar = new NavigationBar(page);\n const volumePage = await navigationBar.openVolumes();\n await playExpect(volumePage.heading).toBeVisible({ timeout: 10_000 });\n const rows = await volumePage.getAllTableRows();\n\n for (let i = rows.length - 1; i > 0; i--) {\n volumeName = await rows[i].getByRole('cell').nth(3).getByRole('button').textContent();\n if (volumeName) {\n const volumeDetails = await volumePage.openVolumeDetails(volumeName);\n await volumeDetails.activateTab(VolumeDetailsPage.SUMMARY_TAB);\n volumeSummaryContent = await volumeDetails.tabContent.allTextContents();\n for (const content of volumeSummaryContent) {\n if (content.includes(containerName)) {\n await volumeDetails.backLink.click();\n return volumeName;\n }\n }\n await volumeDetails.backLink.click();\n }\n }\n return '';\n } catch (error) {\n if (\n error instanceof Error &&\n (error.message === 'Page is empty, there is no content' || error.message.includes('does not exist'))\n ) {\n return '';\n }\n throw error;\n }\n });\n}\n\nexport async function ensureCliInstalled(page: Page, resourceName: string, timeout = 60_000): Promise<void> {\n return test.step(`Ensure ${resourceName} CLI is installed`, async () => {\n const cliToolsPage = new CLIToolsPage(page);\n await playExpect(cliToolsPage.toolsTable).toBeVisible({ timeout: 10_000 });\n await playExpect.poll(async () => await cliToolsPage.toolsTable.count()).toBeGreaterThan(0);\n await playExpect(cliToolsPage.getToolRow(resourceName)).toBeVisible({ timeout: 10_000 });\n\n if (!(await cliToolsPage.getCurrentToolVersion(resourceName))) {\n await cliToolsPage.installTool(resourceName, timeout);\n }\n\n await playExpect\n .poll(async () => await cliToolsPage.getCurrentToolVersion(resourceName), { timeout: timeout })\n .toBeTruthy();\n });\n}\n\nexport async function createPodmanMachineFromCLI(): Promise<void> {\n return test.step('Create Podman machine from CLI', async () => {\n if (isLinux) return;\n\n const podmanMachineMode = process.env.PODMAN_ROOTFUL === '0' ? '' : '--rootful';\n const userModeNetworking = process.env.PODMAN_NETWORKING === '1' ? '--user-networking' : '';\n\n try {\n // eslint-disable-next-line sonarjs/no-os-command-from-path, sonarjs/os-command\n execSync(`podman machine init ${podmanMachineMode} ${userModeNetworking}`);\n } catch (error) {\n if (error instanceof Error && error.message.includes('VM already exists')) {\n console.log('Podman machine already exists, skipping creation.');\n }\n }\n\n try {\n // eslint-disable-next-line sonarjs/no-os-command-from-path\n execSync('podman machine start');\n console.log('Default podman machine started');\n } catch (error) {\n if (error instanceof Error && error.message.includes('already running')) {\n console.log('Default podman machine already started, skipping start.');\n }\n }\n });\n}\n\nexport async function deletePodmanMachineFromCLI(podmanMachineName: string): Promise<void> {\n return test.step('Delete Podman machine from CLI', () => {\n try {\n // eslint-disable-next-line sonarjs/os-command\n execSync(`podman machine rm ${podmanMachineName} -f`);\n } catch (error) {\n if (error instanceof Error && error.message.includes('VM does not exist')) {\n console.log(`Podman machine [${podmanMachineName}] does not exist, skipping deletion.`);\n }\n }\n });\n}\n\nexport async function resetPodmanMachinesFromCLI(): Promise<void> {\n return test.step('Reset Podman machine from CLI', () => {\n // eslint-disable-next-line sonarjs/no-os-command-from-path\n execSync('podman machine reset -f');\n });\n}\n\nexport async function fillTextbox(textbox: Locator, text: string): Promise<void> {\n return test.step(`Fill textbox with ${text}`, async () => {\n await playExpect(textbox).toBeVisible({ timeout: 15_000 });\n await textbox.fill(text);\n await playExpect(textbox).toHaveValue(text);\n });\n}\n\nexport async function runComposeUpFromCLI(composeFilePath: string): Promise<void> {\n return test.step('Run Compose up from CLI', async () => {\n try {\n // eslint-disable-next-line sonarjs/os-command\n execSync(`podman compose -f ${composeFilePath} up -d`);\n } catch (error) {\n throw new Error(`Error running podman compose up from CLI: ${error}`);\n }\n });\n}\n\nexport async function untagImagesFromPodman(name: string, tag = ''): Promise<void> {\n return test.step('Untag images from Podman', async () => {\n try {\n if (tag) {\n // eslint-disable-next-line sonarjs/os-command\n execSync(`podman untag ${name}:${tag}`);\n } else {\n // eslint-disable-next-line sonarjs/os-command\n execSync(`podman untag ${name}`);\n }\n } catch (error) {\n throw new Error(`Error untagging images from Podman: ${error}`);\n }\n });\n}\n\nexport async function setDockerCompatibilityFeature(page: Page, enable: boolean): Promise<void> {\n //Open the preferences bar and verify DC preferences page\n const settingsBar = new SettingsBar(page);\n\n if (await settingsBar.preferencesTab.isHidden()) {\n //Open settings if not opened already\n const navigationBar = new NavigationBar(page);\n await navigationBar.openSettings();\n }\n\n await settingsBar.expandPreferencesTab();\n\n const DCPreferencesLink = settingsBar.getLinkLocatorByHref('/preferences/default/preferences.dockerCompatibility');\n await playExpect(DCPreferencesLink).toBeVisible();\n await DCPreferencesLink.click();\n const DCPreferencesPage = new PreferencesPage(page);\n\n await playExpect(DCPreferencesPage.heading).toBeVisible();\n const experimentalTitle = DCPreferencesPage.content.getByText('Docker Compatibility', { exact: true });\n await playExpect(experimentalTitle).toBeVisible();\n\n //Set the feature\n const dockerCompatibilityCheckbox = DCPreferencesPage.content.getByRole('checkbox', {\n name: 'Enable the section for Docker compatibility.',\n });\n await playExpect(dockerCompatibilityCheckbox).toBeVisible();\n const isEnabled = await dockerCompatibilityCheckbox.isChecked();\n if (isEnabled !== enable) {\n await dockerCompatibilityCheckbox.locator('..').setChecked(enable);\n const isEnabled = await dockerCompatibilityCheckbox.isChecked();\n playExpect(isEnabled).toEqual(enable);\n }\n\n //Verify the main docker compatibility page (dis)appeared\n const DCSettingsLink = settingsBar.getLinkLocatorByHref('/preferences/docker-compatibility');\n if (enable) {\n await playExpect(DCSettingsLink).toBeVisible();\n } else {\n await playExpect(DCSettingsLink).not.toBeVisible();\n }\n\n //Close the preferences bar\n await settingsBar.expandPreferencesTab();\n}\n\nexport async function setStatusBarProvidersFeature(\n page: Page,\n navigationBar: NavigationBar,\n enable: boolean,\n): Promise<void> {\n await navigationBar.openSettings();\n const settingsBar = new SettingsBar(page);\n const experimentalPage = await settingsBar.openTabPage(ExperimentalPage);\n await experimentalPage.setExperimentalCheckbox(experimentalPage.statusBarProvidersCheckbox, enable);\n}\n\nfunction isRootlessPodman(): boolean {\n try {\n let output: string;\n\n if (isMac || isWindows) {\n // eslint-disable-next-line sonarjs/no-os-command-from-path\n output = execSync('podman machine ssh podman info --format json').toString();\n } else if (isLinux) {\n // eslint-disable-next-line sonarjs/no-os-command-from-path\n output = execSync('podman info --format json').toString();\n } else {\n throw new Error('Unsupported platform');\n }\n const info = JSON.parse(output);\n return info?.host?.security?.rootless === true;\n } catch (err) {\n throw new Error(`Failed to determine Podman rootless mode: ${err}`);\n }\n}\n\nfunction getPodmanVolumePath(volumeName: string, fileName: string): string {\n const relativePath = `${volumeName}/_data/${fileName}`;\n const isRootless = isRootlessPodman();\n\n if (isMac || isWindows) {\n const base = isRootless ? '.local/share/containers/storage/volumes' : '/var/lib/containers/storage/volumes';\n return `${base}/${relativePath}`;\n }\n\n if (isLinux) {\n const base = isRootless\n ? `${os.homedir()}/.local/share/containers/storage/volumes`\n : '/var/lib/containers/storage/volumes';\n return `${base}/${relativePath}`;\n }\n\n throw new Error('Unsupported platform');\n}\n\nexport async function readFileInVolumeFromCLI(volumeName: string, fileName: string): Promise<string> {\n return test.step('Read file in volume from CLI', async () => {\n try {\n const fullPath = getPodmanVolumePath(volumeName, fileName);\n\n const command = isMac || isWindows ? `podman machine ssh sudo cat ${fullPath}` : `cat ${fullPath}`;\n\n // eslint-disable-next-line sonarjs/os-command\n const output = execSync(command);\n return output.toString();\n } catch (error) {\n throw new Error(`Error reading file: ${fileName} in volume: ${volumeName} from CLI: ${error}`);\n }\n });\n}\n\n/**\n * Verifies that a Podman machine has the specified virtualization provider type.\n * This method checks that the machine card exists and displays the correct connection type.\n *\n * @param resourceConnectionCardPage - The resource connection card page to verify\n * @param virtualizationProvider - The expected virtualization provider type (e.g., PodmanVirtualizationProviders.WSL, PodmanVirtualizationProviders.HyperV...)\n * @returns A Promise that resolves when the verification is complete\n * @throws Will throw an error if the expected virtualization provider is not found or doesn't match\n */\nexport async function verifyVirtualizationProvider(\n resourceConnectionCardPage: ResourceConnectionCardPage,\n virtualizationProvider: PodmanVirtualizationProviders,\n): Promise<void> {\n return test.step(`Verify Podman Provider is ${virtualizationProvider}`, async () => {\n await playExpect\n .poll(async () => await resourceConnectionCardPage.doesResourceElementExist(), { timeout: 15_000 })\n .toBeTruthy();\n // Check against all possible variants to handle version differences\n const connectionTypeText = await resourceConnectionCardPage.connectionType.textContent();\n if (!connectionTypeText) {\n throw new Error('Connection type text is empty');\n }\n const matchesVariant = matchesProviderVariant(virtualizationProvider, connectionTypeText);\n playExpect(matchesVariant).toBeTruthy();\n });\n}\n\n/**\n * Verifies that a Podman machine has the specified machine privileges (rootful or rootless).\n * This method checks that the machine card exists and displays the correct machine privileges.\n *\n * @param resourceConnectionCardPage - The resource connection card page to verify\n * @param machinePrivileges - The expected machine privileges (e.g., PodmanMachinePrivileges.Rootful, PodmanMachinePrivileges.Rootless)\n * @returns A Promise that resolves when the verification is complete\n * @throws Will throw an error if the expected machine privileges are not found or doesn't match\n */\nexport async function verifyMachinePrivileges(\n resourceConnectionCardPage: ResourceConnectionCardPage,\n machinePrivileges: PodmanMachinePrivileges,\n): Promise<void> {\n return test.step(`Verify Podman Machine Privileges are ${machinePrivileges === PodmanMachinePrivileges.Rootful ? 'rootful' : 'rootless'}`, async () => {\n await playExpect\n .poll(async () => await resourceConnectionCardPage.doesResourceElementExist(), { timeout: 15_000 })\n .toBeTruthy();\n await playExpect(resourceConnectionCardPage.machinePrivileges).toContainText(machinePrivileges, {\n ignoreCase: true,\n });\n });\n}\n\n/**\n * Parses a version string into an array of numeric components.\n * Handles versions like \"5.7.0\", \"5.7\", \"6.0\", \"5.4.1\"\n * @param version - Version string to parse\n * @returns Array of numeric version components [major, minor, patch]\n */\nfunction parseVersion(version: string): number[] {\n return version.split('.').map(part => Number.parseInt(part, 10));\n}\n\n/**\n * Compares two version arrays to determine if the first is >= the second.\n * @param current - Current version components array\n * @param reference - Reference version components array\n * @returns true if current >= reference\n */\nfunction compareVersions(current: number[], reference: number[]): boolean {\n console.log(`Current podman CLI version: ${current.join('.')}`);\n console.log(`Reference podman CLI version: ${reference.join('.')}`);\n\n const maxLength = Math.max(current.length, reference.length);\n\n for (let i = 0; i < maxLength; i++) {\n const currentPart = current[i] ?? 0;\n const referencePart = reference[i] ?? 0;\n\n if (currentPart > referencePart) {\n return true;\n }\n if (currentPart < referencePart) {\n return false;\n }\n }\n\n return true; // versions are equal\n}\n\n/**\n * Gets the current Podman CLI version by running `podman -v`.\n * @returns The version string (e.g., \"5.7.0\")\n * @throws Error if the version cannot be determined\n */\nexport function getPodmanCliVersion(): string {\n try {\n // eslint-disable-next-line sonarjs/no-os-command-from-path\n const output = execSync('podman -v').toString().trim();\n // Output format: \"podman version 5.7.0\"\n const versionRegex = /podman version (\\d+(?:\\.\\d+)*)/i;\n const match = versionRegex.exec(output);\n if (!match?.[1]) {\n throw new Error(`Unable to parse Podman version from output: ${output}`);\n }\n return match[1];\n } catch (error) {\n throw new Error(`Failed to get Podman CLI version: ${error}`);\n }\n}\n\n/**\n * Checks if the installed Podman CLI version is equal to or greater than the reference version.\n * @param referenceVersion - The minimum required version (e.g., \"5.7.0\", \"5.7\", \"6.0\")\n * @returns true if the installed version is >= the reference version, false if podman is not available or version cannot be determined\n */\nexport function isPodmanCliVersionAtLeast(referenceVersion: string): boolean {\n try {\n const currentVersion = getPodmanCliVersion();\n const currentVersionArray = parseVersion(currentVersion);\n const referenceVersionArray = parseVersion(referenceVersion);\n\n return compareVersions(currentVersionArray, referenceVersionArray);\n } catch {\n // If podman is not available or version cannot be determined, return false\n return false;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nexport enum ArchitectureType {\n Default = 'default',\n AMD64 = 'amd64',\n ARM64 = 'arm64',\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { ImagesPage } from './images-page';\n\nexport class ImageEditPage extends BasePage {\n readonly name: string;\n readonly cancelButton: Locator;\n readonly saveButton: Locator;\n readonly imageName: Locator;\n readonly imageTag: Locator;\n readonly editDialog: Locator;\n readonly alertDialog: Locator;\n\n constructor(page: Page, name: string) {\n super(page);\n this.editDialog = page.getByRole('dialog', { name: 'Edit Image' });\n this.imageName = this.editDialog.getByLabel('imageName');\n this.cancelButton = this.editDialog.getByRole('button', {\n name: 'Cancel',\n exact: true,\n });\n this.saveButton = this.editDialog.getByRole('button', {\n name: 'Save',\n exact: true,\n });\n this.name = name;\n this.imageTag = this.editDialog.getByLabel('imageTag');\n this.alertDialog = page.getByLabel('Error Message Content');\n }\n\n async renameImage(name: string, tag = ''): Promise<ImagesPage> {\n return test.step('Rename image', async () => {\n if (!name) {\n throw Error('Provide name is invalid!');\n }\n\n await playExpect(this.saveButton).toBeVisible();\n await this.imageName.clear();\n await this.imageName.fill(name);\n\n if (tag) {\n await this.imageTag.clear();\n await this.imageTag.fill(tag);\n }\n\n await playExpect.poll(async () => this.alertDialog.count()).toBe(0);\n\n await playExpect(this.saveButton).toBeEnabled();\n await this.saveButton.click();\n return new ImagesPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport type { DeployPodOptions } from '/@/model/core/types';\n\nimport { BasePage } from './base-page';\n\nexport class DeployToKubernetesPage extends BasePage {\n readonly content: Locator;\n readonly podName: Locator;\n readonly kubernetesContext: Locator;\n readonly deployButton: Locator;\n readonly doneButton: Locator;\n readonly namespaceCombobox: Locator;\n readonly servicesCheckbox: Locator;\n readonly restrictedContextCheckbox: Locator;\n readonly createIngressCheckbox: Locator;\n readonly createOpenShiftRoutesCheckbox: Locator;\n readonly selectPortCombobox: Locator;\n readonly deploymentStatus: Locator;\n\n constructor(page: Page) {\n super(page);\n this.content = this.page.getByRole('region', { name: 'Tab Content' });\n this.podName = this.content.getByRole('textbox', { name: 'Pod Name' });\n this.kubernetesContext = this.content.getByRole('textbox', {\n name: 'Kubernetes Context',\n });\n this.namespaceCombobox = this.content.getByRole('combobox', {\n name: 'Select a Kubernetes Namespace',\n });\n this.deployButton = this.content.getByRole('button', { name: 'Deploy' });\n this.doneButton = this.content.getByRole('button', { name: 'Done' });\n this.servicesCheckbox = this.content.getByRole('checkbox', {\n name: 'Use Services',\n });\n this.restrictedContextCheckbox = this.content.getByRole('checkbox', {\n name: 'Use restricted security context',\n });\n this.createIngressCheckbox = this.content.getByRole('checkbox', {\n name: 'Create Ingress',\n });\n this.createOpenShiftRoutesCheckbox = this.content.getByRole('checkbox', {\n name: 'Use Routes',\n });\n this.selectPortCombobox = this.content.getByRole('combobox', {\n name: 'Select a Port',\n });\n this.deploymentStatus = this.content.getByRole('region', {\n name: 'Pod Deployment Status Info',\n });\n }\n\n public async deployPod(\n name: string,\n {\n useKubernetesServices,\n useRestrictedSecurityContext,\n useKubernetesIngress,\n containerExposedPort,\n isOpenShiftCluster,\n useOpenShiftRoutes,\n }: DeployPodOptions,\n context: string,\n namespace = 'default',\n timeout = 100_000,\n ): Promise<void> {\n return test.step(`Deploy pod ${name}`, async () => {\n await playExpect(this.podName).toBeVisible();\n await this.podName.clear();\n await this.podName.fill(name);\n\n await playExpect(this.servicesCheckbox).toBeEnabled();\n if (useKubernetesServices) {\n await this.servicesCheckbox.check();\n await playExpect(this.servicesCheckbox).toBeChecked();\n } else {\n await this.servicesCheckbox.uncheck();\n await playExpect(this.servicesCheckbox).not.toBeChecked();\n }\n\n await playExpect(this.restrictedContextCheckbox).toBeEnabled();\n if (useRestrictedSecurityContext) {\n await this.restrictedContextCheckbox.check();\n await playExpect(this.restrictedContextCheckbox).toBeChecked();\n } else {\n await this.restrictedContextCheckbox.uncheck();\n await playExpect(this.restrictedContextCheckbox).not.toBeChecked();\n }\n\n if (isOpenShiftCluster) {\n await playExpect(this.createOpenShiftRoutesCheckbox).toBeEnabled();\n if (useOpenShiftRoutes) {\n await this.createOpenShiftRoutesCheckbox.check();\n await playExpect(this.createOpenShiftRoutesCheckbox).toBeChecked();\n } else {\n await this.createOpenShiftRoutesCheckbox.uncheck();\n await playExpect(this.createOpenShiftRoutesCheckbox).not.toBeChecked();\n }\n } else {\n await playExpect(this.createIngressCheckbox).toBeEnabled();\n if (useKubernetesIngress) {\n await this.createIngressCheckbox.check();\n await playExpect(this.createIngressCheckbox).toBeChecked();\n if (containerExposedPort) {\n await this.selectExposedPort(containerExposedPort);\n }\n } else {\n await this.createIngressCheckbox.uncheck();\n await playExpect(this.createIngressCheckbox).not.toBeChecked();\n }\n }\n\n await this.kubernetesContext.scrollIntoViewIfNeeded();\n await playExpect(this.kubernetesContext).toHaveValue(context);\n await playExpect(this.namespaceCombobox).toBeVisible();\n const currentNamespace = await this.namespaceCombobox.inputValue();\n if (currentNamespace !== namespace) {\n const namespaceOptions = await this.namespaceCombobox.locator('option').allInnerTexts();\n if (!namespaceOptions.includes(namespace)) {\n throw new Error(`${namespace} doesn't exist`);\n }\n await this.namespaceCombobox.selectOption({ value: namespace });\n await playExpect(this.namespaceCombobox).toHaveValue(namespace);\n }\n\n await playExpect(this.deployButton).toBeEnabled();\n await this.deployButton.click();\n await playExpect(this.deploymentStatus).toBeVisible({ timeout: 30_000 });\n await this.deploymentStatus.scrollIntoViewIfNeeded();\n await playExpect(this.doneButton).toBeVisible({ timeout: timeout });\n });\n }\n\n private async selectExposedPort(containerExposedPort: string): Promise<void> {\n return test.step(`Select exposed port: ${containerExposedPort}`, async () => {\n await playExpect(this.selectPortCombobox).toBeVisible();\n const exposedPorts = await this.selectPortCombobox.locator('option').allInnerTexts();\n if (!exposedPorts.includes(containerExposedPort)) {\n throw new Error(`Port: ${containerExposedPort} doesn't exist`);\n }\n await this.selectPortCombobox.selectOption({\n value: containerExposedPort,\n });\n await playExpect(this.selectPortCombobox).toHaveValue(containerExposedPort);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { ContainerState } from '/@/model/core/states';\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { ContainersPage } from './containers-page';\nimport { DeployToKubernetesPage } from './deploy-to-kubernetes-page';\nimport { DetailsPage } from './details-page';\n\nexport class ContainerDetailsPage extends DetailsPage {\n readonly stopButton: Locator;\n readonly deleteButton: Locator;\n readonly imageLink: Locator;\n readonly deployButton: Locator;\n readonly startButton: Locator;\n readonly terminalInput: Locator;\n readonly terminalContent: Locator;\n readonly findInLogsInput: Locator;\n readonly searchResults: Locator;\n\n static readonly SUMMARY_TAB = 'Summary';\n static readonly LOGS_TAB = 'Logs';\n static readonly KUBE_TAB = 'Kube';\n static readonly TERMINAL_TAB = 'Terminal';\n static readonly INSPECT_TAB = 'Inspect';\n static readonly Tty_TAB = 'Tty';\n\n constructor(page: Page, name: string) {\n super(page, name);\n this.stopButton = this.controlActions.getByRole('button').and(this.page.getByLabel('Stop Container'));\n this.deleteButton = this.controlActions.getByRole('button').and(this.page.getByLabel('Delete Container'));\n this.imageLink = this.header.getByRole('link', { name: 'Image Details' });\n this.deployButton = this.controlActions.getByRole('button', {\n name: 'Deploy to Kubernetes',\n });\n this.startButton = this.controlActions.getByRole('button', {\n name: 'Start Container',\n exact: true,\n });\n\n this.terminalInput = this.tabContent.getByLabel('Terminal input');\n this.terminalContent = this.tabContent.locator('.xterm-rows');\n this.findInLogsInput = this.tabContent.getByLabel('Find');\n this.searchResults = this.tabContent.locator('div.xterm-selection > div');\n }\n\n async getState(): Promise<string> {\n return test.step('Get container state', async () => {\n const currentState = await this.header.getByRole('status').getAttribute('title');\n for (const state of Object.values(ContainerState)) {\n if (currentState === state) return state;\n }\n\n return ContainerState.Unknown;\n });\n }\n\n async stopContainer(): Promise<void> {\n return test.step('Stop container', async () => {\n await playExpect(this.stopButton).toBeEnabled();\n await this.stopButton.click();\n });\n }\n\n async deleteContainer(): Promise<ContainersPage> {\n return test.step('Delete container', async () => {\n await playExpect(this.deleteButton).toBeEnabled();\n await this.deleteButton.click();\n await handleConfirmationDialog(this.page);\n return new ContainersPage(this.page);\n });\n }\n\n async getContainerPort(): Promise<string> {\n return test.step('Get container port', async () => {\n await this.activateTab(ContainerDetailsPage.SUMMARY_TAB);\n const summaryTable = this.tabContent.getByRole('table');\n const portsRow = summaryTable.locator('tr:has-text(\"Ports\")');\n const portsCell = portsRow.getByRole('cell').nth(1);\n await playExpect(portsCell).toBeVisible();\n return await portsCell.innerText();\n });\n }\n\n async openDeployToKubernetesPage(): Promise<DeployToKubernetesPage> {\n return test.step('Open Deploy to Kubernetes page', async () => {\n await playExpect(this.deployButton).toBeVisible();\n await this.deployButton.click();\n return new DeployToKubernetesPage(this.page);\n });\n }\n\n async executeCommandInTerminal(command: string): Promise<void> {\n await this.activateTab(ContainerDetailsPage.TERMINAL_TAB);\n\n await playExpect(this.terminalInput).toBeVisible();\n await this.page.waitForTimeout(500); // Wait for terminal to be ready\n await this.terminalInput.pressSequentially(command, { delay: 10 });\n await this.terminalInput.press('Enter');\n }\n\n async executeCommandInTty(command: string): Promise<void> {\n return test.step('Execute command in TTY terminal', async () => {\n await this.activateTab(ContainerDetailsPage.Tty_TAB);\n\n await this.terminalInput.pressSequentially(command, { delay: 10 });\n await this.terminalInput.press('Enter');\n });\n }\n\n async findInLogs(text: string): Promise<void> {\n return test.step('Find text in logs', async () => {\n await this.activateTab(ContainerDetailsPage.LOGS_TAB);\n await playExpect(this.findInLogsInput).toBeVisible();\n await this.findInLogsInput.clear();\n await playExpect(this.findInLogsInput).toHaveValue('');\n\n await this.findInLogsInput.fill(text);\n await playExpect(this.findInLogsInput).toHaveValue(text);\n });\n }\n\n async getCountOfSearchResults(): Promise<number> {\n return test.step('Get count of search results', async () => {\n await this.activateTab(ContainerDetailsPage.LOGS_TAB);\n await playExpect(this.findInLogsInput).toBeVisible();\n\n return await this.searchResults.count();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport type { ContainerInteractiveParams } from '/@/model/core/types';\nimport { waitWhile } from '/@/utility/wait';\n\nimport { BasePage } from './base-page';\nimport { ContainerDetailsPage } from './container-details-page';\nimport { ContainersPage } from './containers-page';\n\nexport class RunImagePage extends BasePage {\n readonly name: Locator;\n readonly heading: Locator;\n readonly closeLink: Locator;\n readonly backToImageDetailsLink: Locator;\n readonly imageName: string;\n readonly startContainerButton: Locator;\n readonly errorAlert: Locator;\n readonly containerNameInput: Locator;\n readonly containerEntryPointInput: Locator;\n readonly containerComamndInput: Locator;\n readonly containerAddCustomPortMappingButton: Locator;\n readonly volumeNameInput: Locator;\n readonly volumeContainerPath: Locator;\n\n constructor(page: Page, name: string) {\n super(page);\n this.imageName = name;\n this.name = page.getByLabel('name').and(page.getByText('Run Image'));\n this.heading = page.getByRole('heading', { name: this.imageName });\n this.closeLink = page.getByRole('link', { name: 'Close' });\n this.errorAlert = page.getByRole('alert', {\n name: 'Error Message Content',\n });\n this.backToImageDetailsLink = page.getByRole('link', {\n name: 'Go back to Image Details',\n });\n this.startContainerButton = page.getByLabel('Start Container', {\n exact: true,\n });\n this.containerNameInput = page.getByLabel('Container Name');\n this.containerEntryPointInput = page.getByLabel('Entrypoint');\n this.containerComamndInput = page.getByLabel('Command');\n this.containerAddCustomPortMappingButton = page.getByLabel('Add custom port mapping', { exact: true });\n this.volumeNameInput = page.getByPlaceholder('Path on the host');\n this.volumeContainerPath = page.getByPlaceholder('Path inside the container');\n }\n\n async activateTab(name: string): Promise<void> {\n return test.step(`Activate tab: ${name}`, async () => {\n const tabactive = this.page.getByRole('link', { name: name, exact: true }).and(this.page.getByText(name));\n await tabactive.click();\n });\n }\n\n // If the container has a defined exposed port, the mapping offers only one part of the input box, host port\n // Example of the placeholder: 'Enter value for port 80/tcp' : settable value\n async setHostPortToExposedContainerPort(exposedPort: string, port: string): Promise<void> {\n return test.step('Set host port to exposed container port', async () => {\n await this.activateTab('Basic');\n const portMapping = this.page\n .getByRole('textbox')\n .and(this.page.getByPlaceholder(`Enter value for port ${exposedPort}/tcp`));\n await portMapping.waitFor({ state: 'visible' });\n await portMapping.fill(port);\n });\n }\n\n async startInteractiveContainer(customName = ''): Promise<ContainerDetailsPage> {\n return test.step(`Start interactive container from image: ${this.imageName}`, async () => {\n await this.startContainer(customName, {\n attachTerminal: true,\n interactive: true,\n } as ContainerInteractiveParams);\n const detailsPageLocator = this.page.getByLabel('name').and(this.page.getByText('Container Details'));\n await playExpect(detailsPageLocator).toBeVisible(); // we are sure to get into details page\n const heading = this.page.getByRole('heading');\n const containerName = customName ? customName : await heading.innerText();\n console.log(`Heading and container name: ${await heading.innerText()}`);\n return new ContainerDetailsPage(this.page, containerName);\n });\n }\n\n async startContainer(customName = '', optionalParams?: ContainerInteractiveParams): Promise<ContainersPage> {\n return test.step(`Start container from image: ${this.imageName}`, async () => {\n if (customName !== '') {\n await this.activateTab('Basic');\n await playExpect(this.containerNameInput).toBeVisible();\n await this.containerNameInput.fill(customName);\n await playExpect(this.containerNameInput).toHaveValue(customName);\n }\n\n if (optionalParams?.attachVolumeName !== undefined && optionalParams?.attachVolumePath !== undefined) {\n await this.activateTab('Basic');\n\n await playExpect(this.volumeNameInput).toBeVisible();\n await this.volumeNameInput.pressSequentially(optionalParams.attachVolumeName, { delay: 10 });\n await playExpect(this.volumeNameInput).toHaveValue(optionalParams.attachVolumeName);\n\n await playExpect(this.volumeContainerPath).toBeVisible();\n await this.volumeContainerPath.pressSequentially(optionalParams.attachVolumePath, { delay: 10 });\n await playExpect(this.volumeContainerPath).toHaveValue(optionalParams.attachVolumePath);\n }\n\n if (optionalParams?.attachTerminal !== undefined) {\n // disable the checkbox in advanced tab\n await this.activateTab('Advanced');\n const checkbox = this.page.getByRole('checkbox', {\n name: 'Attach a pseudo terminal',\n });\n if (optionalParams.attachTerminal) {\n await checkbox.check();\n } else {\n await checkbox.uncheck();\n }\n await playExpect(checkbox).toBeChecked({\n checked: optionalParams.attachTerminal,\n });\n }\n\n if (optionalParams?.interactive !== undefined) {\n // disable the checkbox in advanced tab\n await this.activateTab('Advanced');\n const checkbox = this.page.getByRole('checkbox', {\n name: 'Use interactive',\n });\n if (optionalParams.interactive) {\n await checkbox.check();\n } else {\n await checkbox.uncheck();\n }\n await playExpect(checkbox).toBeChecked({\n checked: optionalParams.interactive,\n });\n }\n\n await this.activateTab('Basic');\n await playExpect(this.startContainerButton).toBeEnabled();\n await this.startContainerButton.click();\n // After clicking on the button there seems to be four possible outcomes\n // 1. Opening particular container's details page with tty tab opened\n // 2. Opening Containers page with new container on it\n // 3. staying on the run image page with an error\n // 4. Starting a container without entrypoint or command creates a container, but it stays on Run Image Page without error\n await waitWhile(\n async () => {\n return await this.name.isVisible();\n },\n { sendError: false },\n );\n\n const errorCount = await this.errorAlert.count();\n if (errorCount > 0) {\n const runImagePageActive = await this.name.isVisible();\n const message = runImagePageActive ? 'threw an ' : 'redirected to another page with an ';\n throw Error(`Starting the container ${message} error: ${await this.errorAlert.innerText()}`);\n }\n return new ContainersPage(this.page);\n });\n }\n\n async setCustomPortMapping(customPortMapping: string): Promise<void> {\n return test.step(`Set custom port mapping: ${customPortMapping}`, async () => {\n // add port mapping\n await this.activateTab('Basic');\n await playExpect(this.containerAddCustomPortMappingButton).toBeVisible();\n await this.containerAddCustomPortMappingButton.click();\n const hostPort = this.page.getByLabel('host port');\n const containerPort = this.page.getByLabel('container port');\n await hostPort.fill(customPortMapping.split(':')[0]);\n await containerPort.fill(customPortMapping.split(':')[1]);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { DetailsPage } from './details-page';\nimport { ImageEditPage } from './image-edit-page';\nimport { ImagesPage } from './images-page';\nimport { RunImagePage } from './run-image-page';\n\nexport class ImageDetailsPage extends DetailsPage {\n readonly runImageButton: Locator;\n readonly deleteButton: Locator;\n readonly editButton: Locator;\n readonly summaryTab: Locator;\n readonly historyTab: Locator;\n readonly inspectTab: Locator;\n readonly actionsButton: Locator;\n readonly buildDiskImageButton: Locator;\n readonly saveImagebutton: Locator;\n readonly saveImageInput: Locator;\n readonly confirmSaveImages: Locator;\n readonly browseButton: Locator;\n readonly pushButton: Locator;\n\n constructor(page: Page, name: string) {\n super(page, name);\n this.runImageButton = this.controlActions.getByRole('button', {\n name: 'Run Image',\n });\n this.deleteButton = this.controlActions.getByRole('button', {\n name: 'Delete Image',\n });\n this.editButton = this.controlActions.getByRole('button', {\n name: 'Edit Image',\n });\n this.pushButton = this.controlActions.getByRole('button', {\n name: 'Push Image',\n exact: true,\n });\n this.summaryTab = this.tabs.getByText('Summary');\n this.historyTab = this.tabs.getByText('History');\n this.inspectTab = this.tabs.getByText('Inspect');\n this.actionsButton = page.getByRole('button', { name: 'kebab menu' });\n this.buildDiskImageButton = page.getByTitle('Build Disk Image');\n this.saveImagebutton = this.controlActions.getByRole('button', {\n name: 'Save Image',\n exact: true,\n });\n this.saveImageInput = page.locator('#input-output-directory');\n this.confirmSaveImages = page.getByLabel('Save images', { exact: true });\n this.browseButton = page.getByLabel('Select output folder');\n }\n\n async openRunImage(): Promise<RunImagePage> {\n return test.step('Open run image page', async () => {\n await playExpect(this.runImageButton).toBeEnabled({ timeout: 30_000 });\n await this.runImageButton.click();\n return new RunImagePage(this.page, this.resourceName);\n });\n }\n\n async openEditImage(): Promise<ImageEditPage> {\n return test.step('Open edit image page', async () => {\n await playExpect(this.editButton).toBeEnabled({ timeout: 30_000 });\n await this.editButton.click();\n return new ImageEditPage(this.page, this.resourceName);\n });\n }\n\n async deleteImage(): Promise<ImagesPage> {\n return test.step('Delete image', async () => {\n await playExpect(this.deleteButton).toBeEnabled({ timeout: 30_000 });\n await this.deleteButton.click();\n await handleConfirmationDialog(this.page);\n return new ImagesPage(this.page);\n });\n }\n\n async pushImage(): Promise<void> {\n return test.step('Push image', async () => {\n await playExpect(this.pushButton).toBeEnabled();\n await this.pushButton.click();\n await handleConfirmationDialog(this.page, 'Push image', true, 'Push image', '', 60_000, true);\n });\n }\n\n async saveImage(outputPath: string): Promise<ImagesPage> {\n if (!outputPath) {\n throw Error('Path is incorrect or not provided!');\n }\n // TODO: Will probably require refactoring when https://github.com/containers/podman-desktop/issues/7620 is done\n await playExpect(this.saveImagebutton).toBeEnabled();\n await this.saveImagebutton.click();\n await playExpect(this.saveImageInput).toBeVisible();\n await playExpect(this.confirmSaveImages).toBeVisible();\n\n await this.saveImageInput.evaluate(node => node.removeAttribute('readonly'));\n await this.confirmSaveImages.evaluate(node => node.removeAttribute('disabled'));\n\n await this.saveImageInput.pressSequentially(outputPath, { delay: 10 });\n await this.confirmSaveImages.click();\n\n return new ImagesPage(this.page);\n }\n\n async pushImageToKindCluster(): Promise<void> {\n const kebabMenuButton = this.controlActions.getByRole('button', { name: 'kebab menu', exact: true });\n let pushToKindButton: Locator;\n const pushToKindName = 'Push image to Kind Cluster';\n\n if ((await kebabMenuButton.count()) > 0) {\n await kebabMenuButton.click();\n pushToKindButton = this.controlActions.getByTitle('Drop Down Menu Items').getByTitle(pushToKindName);\n } else {\n pushToKindButton = this.controlActions.getByRole('button', { name: pushToKindName });\n }\n await playExpect(pushToKindButton).toBeVisible();\n await pushToKindButton.click();\n\n await handleConfirmationDialog(this.page, 'Kind', true, 'OK', '', 80_000);\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { ImagesPage } from './images-page';\n\nexport class PullImagePage extends BasePage {\n readonly heading: Locator;\n readonly pullImageButton: Locator;\n readonly closeLink: Locator;\n readonly backToImagesLink: Locator;\n readonly manageRegistriesButton: Locator;\n readonly imageNameInput: Locator;\n readonly tabContent: Locator;\n readonly searchResultsTable: Locator;\n readonly doneButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = page.getByRole('heading', {\n name: 'Pull Image From a Registry',\n });\n this.pullImageButton = page.getByRole('button', { name: 'Pull' });\n this.closeLink = page.getByRole('link', { name: 'Close' });\n this.backToImagesLink = page.getByRole('link', {\n name: 'Go back to Images',\n });\n this.manageRegistriesButton = page.getByRole('button', {\n name: 'Manage registries',\n });\n this.imageNameInput = page.getByLabel('Image to Pull');\n this.tabContent = page.getByRole('region', {\n name: 'Tab Content',\n exact: true,\n });\n this.searchResultsTable = this.tabContent.getByRole('row');\n this.doneButton = page.getByRole('button', { name: 'Done', exact: true });\n }\n\n async pullImage(imageName: string, tag = '', timeout = 60_000): Promise<ImagesPage> {\n return test.step(`Pulling image ${imageName}:${tag}`, async () => {\n const fullImageName = `${imageName}${tag.length === 0 ? '' : ':' + tag}`;\n await this.imageNameInput.fill(fullImageName);\n await playExpect(this.pullImageButton).toBeEnabled();\n await this.pullImageButton.click();\n\n await playExpect(this.doneButton).toBeEnabled({ timeout: timeout });\n await this.doneButton.click();\n return new ImagesPage(this.page);\n });\n }\n\n async getAllSearchResultsFor(\n imageName: string,\n searchForVersion: boolean,\n imageTag = '',\n resultsExpected = true,\n ): Promise<string[]> {\n return test.step(`Get all search results for ${imageName}:${imageTag}`, async () => {\n const searchString = await this.handleFormAndResultSearchString(\n imageName,\n searchForVersion,\n imageTag,\n resultsExpected,\n );\n return await this.getAllSearchResultsInstantly(searchString);\n });\n }\n\n async getFirstSearchResultFor(\n imageName: string,\n searchForVersion: boolean,\n imageTag = '',\n resultsExpected = true,\n ): Promise<string> {\n return test.step(`Get first search result for ${imageName}:${imageTag}`, async () => {\n await this.handleFormAndResultSearchString(imageName, searchForVersion, imageTag, resultsExpected);\n return await this.getFirstSearchResultInstantly();\n });\n }\n\n async refineSearchResults(stringToAppend: string, resultsExpected = true): Promise<string[]> {\n return test.step(`Refine search results by appending: ${stringToAppend}`, async () => {\n await this.imageNameInput.pressSequentially(stringToAppend, {\n delay: 10,\n });\n const searchString = await this.imageNameInput.inputValue();\n\n if (resultsExpected) {\n await playExpect(this.searchResultsTable).toBeVisible({\n timeout: 15_000,\n });\n await playExpect\n .poll(async () => await this.getFirstSearchResultInstantly(), {\n timeout: 10_000,\n })\n .toContain(searchString);\n } else {\n await playExpect(this.searchResultsTable).not.toBeVisible({\n timeout: 15_000,\n });\n }\n\n return await this.getAllSearchResultsInstantly(searchString);\n });\n }\n\n async getAllSearchResultsInstantly(searchString: string): Promise<string[]> {\n return test.step(`Get search results instantly for ${searchString}`, async () => {\n const resultList: string[] = [];\n const resultRows = await this.getAllResultButtonLocators(searchString);\n for (const row of resultRows) {\n const result = await row.innerText();\n resultList.push(result);\n }\n console.log(`Found ${resultList.length} results for ${searchString}`);\n return resultList;\n });\n }\n\n async getFirstSearchResultInstantly(): Promise<string> {\n return test.step('Get first search result from the results table', async () => {\n const resultRow = this.getFirstResultButtonLocator();\n return await resultRow.innerText();\n });\n }\n\n async pullImageFromSearchResults(pattern: string, timeout = 60_000): Promise<ImagesPage> {\n return test.step(`Pull image from search results: ${pattern}`, async () => {\n await this.selectValueFromSearchResults(pattern);\n await playExpect(this.pullImageButton).toBeEnabled();\n await this.pullImageButton.click();\n\n await playExpect(this.doneButton).toBeEnabled({ timeout: timeout });\n await this.doneButton.click();\n return new ImagesPage(this.page);\n });\n }\n\n async selectValueFromSearchResults(pattern: string): Promise<void> {\n return test.step(`Select value from search results: ${pattern}`, async () => {\n const getExactButtonLocator = this.searchResultsTable.getByRole('button', { name: pattern, exact: true }).first();\n\n await getExactButtonLocator.scrollIntoViewIfNeeded();\n await getExactButtonLocator.focus();\n\n await playExpect(getExactButtonLocator).toBeEnabled();\n await getExactButtonLocator.click();\n\n await playExpect(this.imageNameInput).toHaveValue(pattern);\n });\n }\n\n async clearImageSearch(): Promise<void> {\n return test.step('Clear image search', async () => {\n await this.imageNameInput.clear();\n await playExpect(this.imageNameInput).toHaveValue('');\n await playExpect(this.searchResultsTable).not.toBeVisible();\n });\n }\n\n private getAllResultButtonLocators(pattern: string): Promise<Locator[]> {\n return this.searchResultsTable.getByRole('button', { name: pattern }).all();\n }\n\n private getFirstResultButtonLocator(): Locator {\n return this.searchResultsTable.getByRole('button').first();\n }\n\n private async handleFormAndResultSearchString(\n imageName: string,\n searchForVersion: boolean,\n imageTag = '',\n resultsExpected = true,\n ): Promise<string> {\n return test.step(`Handle form and result search string for ${imageName}:${imageTag}`, async () => {\n if (!imageName || imageName.length === 0) {\n throw new Error('Image name is invalid');\n }\n\n let searchString: string;\n\n if (searchForVersion) {\n searchString = `${imageName}:${imageTag}`;\n } else {\n searchString = imageName;\n }\n\n await this.clearImageSearch();\n await this.imageNameInput.fill(searchString);\n\n if (resultsExpected) {\n await playExpect(this.searchResultsTable).toBeVisible({\n timeout: 15_000,\n });\n } else {\n await playExpect(this.searchResultsTable).not.toBeVisible({\n timeout: 15_000,\n });\n }\n return searchString;\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport type { ContainerInteractiveParams } from '/@/model/core/types';\nimport { handleConfirmationDialog } from '/@/utility/operations';\nimport { waitUntil, waitWhile } from '/@/utility/wait';\n\nimport { BuildImagePage } from './build-image-page';\nimport type { ContainersPage } from './containers-page';\nimport { ImageDetailsPage } from './image-details-page';\nimport { MainPage } from './main-page';\nimport { PullImagePage } from './pull-image-page';\n\nexport class ImagesPage extends MainPage {\n readonly pullImageButton: Locator;\n readonly pruneImagesButton: Locator;\n readonly buildImageButton: Locator;\n readonly pruneConfirmationButton: Locator;\n readonly loadImagesFromTarButton: Locator;\n readonly addArchiveButton: Locator;\n readonly confirmLoadImagesButton: Locator;\n readonly deleteAllUnusedImagesCheckbox: Locator;\n readonly deleteAllSelectedButton: Locator;\n\n constructor(page: Page) {\n super(page, 'images');\n this.pullImageButton = this.additionalActions.getByRole('button', { name: 'Pull', exact: true });\n this.pruneImagesButton = this.additionalActions.getByRole('button', { name: 'Prune', exact: true });\n this.buildImageButton = this.additionalActions.getByRole('button', { name: 'Build', exact: true });\n this.pruneConfirmationButton = this.page.getByRole('button', { name: 'All unused images', exact: true });\n this.loadImagesFromTarButton = this.additionalActions.getByLabel('Load Images', { exact: true });\n this.addArchiveButton = this.page.getByRole('button', { name: 'Add archive', exact: true });\n this.confirmLoadImagesButton = this.page.getByRole('button', { name: 'Load Images', exact: true });\n this.deleteAllUnusedImagesCheckbox = this.page.getByRole('checkbox', { name: 'Toggle all', exact: true });\n this.deleteAllSelectedButton = this.bottomAdditionalActions.getByRole('button', { name: 'Delete' });\n }\n\n async openPullImage(): Promise<PullImagePage> {\n return test.step('Open pull image page', async () => {\n await waitWhile(() => this.noContainerEngine(), {\n timeout: 50_000,\n message: 'No Container Engine is available, cannot pull an image',\n });\n await this.pullImageButton.click();\n return new PullImagePage(this.page);\n });\n }\n\n async pullImage(image: string): Promise<ImagesPage> {\n return test.step(`Pull image: ${image}`, async () => {\n const pullImagePage = await this.openPullImage();\n await playExpect(pullImagePage.heading).toBeVisible();\n return await pullImagePage.pullImage(image);\n });\n }\n\n async renameImage(oldname: string, newname: string, newtag = ''): Promise<ImagesPage> {\n return test.step(`Rename ${oldname} to ${newname}`, async () => {\n const imageDetailsPage = await this.openImageDetails(oldname);\n await playExpect(imageDetailsPage.heading).toContainText(oldname);\n const editImagePage = await imageDetailsPage.openEditImage();\n return await editImagePage.renameImage(newname, newtag);\n });\n }\n\n async startContainerWithImage(\n image: string,\n containerName: string,\n containersParams?: ContainerInteractiveParams,\n ): Promise<ContainersPage> {\n return test.step(`Start container with image: ${image}`, async () => {\n const imageDetails = await this.openImageDetails(image);\n const runImage = await imageDetails.openRunImage();\n return await runImage.startContainer(containerName, containersParams);\n });\n }\n\n async openImageDetails(name: string): Promise<ImageDetailsPage> {\n return test.step(`Open image details page for image: ${name}`, async () => {\n const imageRow = await this.getImageRowByName(name);\n if (imageRow === undefined) {\n throw Error(`Image: '${name}' does not exist`);\n }\n const imageRowName = imageRow.getByRole('cell').nth(3);\n await imageRowName.click();\n return new ImageDetailsPage(this.page, name);\n });\n }\n\n async pruneImages(): Promise<ImagesPage> {\n return test.step('Prune all images', async () => {\n await this.pruneImagesButton.click();\n await handleConfirmationDialog(this.page, 'Prune', true, 'All unused images');\n return this;\n });\n }\n\n async pruneUntaggedImages(): Promise<ImagesPage> {\n return test.step('Prune untagged images', async () => {\n await this.pruneImagesButton.click();\n await handleConfirmationDialog(this.page, 'Prune', true, 'All untagged images');\n return this;\n });\n }\n\n async openBuildImage(): Promise<BuildImagePage> {\n return test.step('Open build image page', async () => {\n await this.buildImageButton.click();\n return new BuildImagePage(this.page);\n });\n }\n\n async getImageRowByName(name: string): Promise<Locator | undefined> {\n return this.getRowByName(name);\n }\n\n private async imageExists(name: string): Promise<boolean> {\n return test.step(`Check if image: ${name} exists`, async () => {\n const result = await this.getImageRowByName(name);\n return result !== undefined;\n });\n }\n\n async waitForImageExists(name: string, timeout = 5_000): Promise<boolean> {\n return test.step(`Wait for image: ${name} to exist`, async () => {\n await waitUntil(async () => await this.imageExists(name), { timeout: timeout });\n return true;\n });\n }\n\n async waitForImageDelete(name: string, timeout = 5_000): Promise<boolean> {\n return test.step(`Wait for image: ${name} to be deleted`, async () => {\n await waitWhile(async () => await this.imageExists(name), { timeout: timeout });\n return true;\n });\n }\n\n async getCurrentStatusOfImage(name: string): Promise<string> {\n return test.step(`Get current status of image: ${name}`, async () => {\n let status = '';\n const row = await this.getImageRowByName(name);\n\n if (row === undefined) throw new Error(`Image: '${name}' does not exist`);\n status = status + (await row.getByRole('status').getAttribute('title'));\n return status;\n });\n }\n\n async loadImages(archivePath: string): Promise<ImagesPage> {\n // TODO: Will probably require refactoring when https://github.com/containers/podman-desktop/issues/7620 is done\n\n await playExpect(this.loadImagesFromTarButton).toBeEnabled();\n await this.loadImagesFromTarButton.click();\n await playExpect(this.addArchiveButton).toBeEnabled();\n await this.addArchiveButton.setInputFiles(archivePath);\n await playExpect(this.confirmLoadImagesButton).toBeEnabled();\n await this.confirmLoadImagesButton.click();\n return this;\n }\n\n async markAllUnusedImages(): Promise<boolean> {\n return test.step('Mark all unused images', async () => {\n if (!(await this.deleteAllUnusedImagesCheckbox.isVisible())) {\n console.log('No images available on the page');\n return false;\n }\n\n if (!(await this.deleteAllUnusedImagesCheckbox.isEnabled())) {\n console.log('No unused images available on the page');\n return false;\n }\n\n await playExpect(this.deleteAllUnusedImagesCheckbox).not.toBeChecked();\n await this.deleteAllUnusedImagesCheckbox.locator('..').click();\n await playExpect(this.deleteAllUnusedImagesCheckbox).toBeChecked();\n return true;\n });\n }\n\n async deleteAllUnusedImages(): Promise<void> {\n return test.step('Delete all unused images', async () => {\n if (!(await this.markAllUnusedImages())) {\n console.log('No images available to delete');\n return;\n }\n\n await playExpect(this.deleteAllSelectedButton).toBeEnabled();\n await this.deleteAllSelectedButton.click();\n await handleConfirmationDialog(this.page);\n });\n }\n\n async getCountOfImagesByStatus(status: string): Promise<number> {\n return test.step(`Get count from ${this.title} for images with status: ${status}`, async () => {\n const currentRows = await this.getAllTableRows();\n let count = 0;\n if (currentRows.length < 2) return 0;\n\n for (let rowNum = 1; rowNum < currentRows.length; rowNum++) {\n //skip header\n const statusCount = await currentRows[rowNum].getByRole('status').getByTitle(status, { exact: true }).count();\n if (statusCount > 0) ++count;\n }\n return count;\n });\n }\n\n async toggleImageManifest(manifestName: string): Promise<void> {\n const manifest = await this.getImageRowByName(manifestName);\n if (!manifest) {\n throw new Error(`Manifest with name \"${manifestName}\" not found`);\n }\n\n const extendManifestButton = manifest.getByRole('cell').nth(0).getByRole('button');\n await playExpect(extendManifestButton).toBeEnabled();\n await extendManifestButton.click();\n }\n\n async deleteImageManifest(manifestName: string): Promise<void> {\n const manifest = await this.getImageRowByName(manifestName);\n if (!manifest) {\n throw new Error(`Manifest with name \"${manifestName}\" not found`);\n }\n\n const deleteManifestButton = manifest.getByRole('button', { name: 'Delete Manifest' });\n await playExpect(deleteManifestButton).toBeEnabled();\n await deleteManifestButton.click();\n await handleConfirmationDialog(this.page);\n }\n\n async pushManifest(manifestName: string): Promise<void> {\n return test.step(`Push manifest: ${manifestName}`, async () => {\n const manifest = await this.getImageRowByName(manifestName);\n if (!manifest) {\n throw new Error(`Manifest with name \"${manifestName}\" not found`);\n }\n\n const kebabMenuButton = manifest.getByRole('button', { name: 'kebab menu', exact: true });\n await playExpect(kebabMenuButton).toBeVisible();\n await kebabMenuButton.click();\n\n // Push Manifest button has role='none', so we use getByTitle instead of getByRole\n const pushManifestButton = manifest.getByTitle('Push Manifest');\n await playExpect(pushManifestButton).toBeVisible();\n await pushManifestButton.click();\n\n await handleConfirmationDialog(this.page, 'Push manifest', true, 'Push manifest', '', 120_000, true);\n });\n }\n\n async getAllImageBadges(name: string): Promise<string[]> {\n return test.step(`Get all badges for image: ${name}`, async () => {\n const locators = await this.getAllBadgeLocators(name);\n return await Promise.all(locators.map(async locator => await locator.innerText()));\n });\n }\n\n async checkImageBadge(name: string, badge: string): Promise<boolean> {\n return test.step(`Check if badge: ${badge} exists for image: ${name}`, async () => {\n return (await this.getAllImageBadges(name)).includes(badge);\n });\n }\n\n async getAllBadgeLocators(name: string): Promise<Locator[]> {\n return test.step(`Get all badge locators for image: ${name}`, async () => {\n const imageRow = await this.getImageRowByName(name);\n if (imageRow === undefined) {\n throw Error(`Image: '${name}' does not exist`);\n }\n return imageRow.getByLabel('badge-').all();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { ArchitectureType } from '/@/model/core/platforms';\nimport { archType } from '/@/utility/platform';\n\nimport { BasePage } from './base-page';\nimport { ImagesPage } from './images-page';\n\nexport class BuildImagePage extends BasePage {\n readonly heading: Locator;\n readonly containerFilePathInput: Locator;\n readonly buildContextDirectoryInput: Locator;\n readonly imageNameInput: Locator;\n readonly buildButton: Locator;\n readonly doneButton: Locator;\n readonly cancelBuildButton: Locator;\n readonly containerFilePathButton: Locator;\n readonly platformRegion: Locator;\n readonly arm64Button: Locator;\n readonly amd64Button: Locator;\n readonly arm64checkbox: Locator;\n readonly amd64checkbox: Locator;\n readonly archMoreOptionsButton: Locator;\n readonly archLessOptionsButton: Locator;\n readonly terminalContent: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = page.getByRole('heading', {\n name: 'Build Image from Containerfile',\n });\n this.containerFilePathInput = page.getByPlaceholder('Containerfile to build');\n this.buildContextDirectoryInput = page.getByPlaceholder('Directory to build in');\n this.imageNameInput = page.getByPlaceholder('my-custom-image');\n this.buildButton = page.getByRole('button', { name: 'Build', exact: true });\n this.doneButton = page.getByRole('button', { name: 'Done' });\n this.cancelBuildButton = page.getByRole('button', { name: 'Cancel' });\n this.containerFilePathButton = page.getByRole('button', { name: 'Browse...' }).first();\n this.platformRegion = page.getByRole('region', {\n name: 'Build Platform Options',\n });\n this.arm64Button = this.platformRegion.getByLabel('linux/arm64');\n this.amd64Button = this.platformRegion.getByLabel('linux/amd64');\n this.arm64checkbox = this.platformRegion.getByLabel('ARM® aarch64 systems');\n this.amd64checkbox = this.platformRegion.getByLabel('Intel and AMD x86_64 systems');\n this.archMoreOptionsButton = this.platformRegion.getByRole('button', { name: 'Show more options' });\n this.archLessOptionsButton = this.platformRegion.getByRole('button', { name: 'Show less options' });\n this.terminalContent = page.locator('.xterm-rows');\n }\n\n async buildImage(\n imageName: string,\n containerFilePath: string,\n contextDirectory: string,\n archType: string[] = [ArchitectureType.Default],\n timeout = 120000,\n ): Promise<ImagesPage> {\n return test.step(`Building image ${imageName} from ${containerFilePath} in ${contextDirectory} with ${archType} architecture`, async () => {\n await this.fillBuildImageForm(imageName, containerFilePath, contextDirectory, archType);\n\n await playExpect(this.doneButton).toBeEnabled({ timeout: timeout });\n await this.validateBuildLogs();\n await this.doneButton.scrollIntoViewIfNeeded();\n await this.doneButton.click();\n console.log(`Image ${imageName} has been built successfully!`);\n\n return new ImagesPage(this.page);\n });\n }\n\n async cancelBuild(\n imageName: string,\n containerFilePath: string,\n contextDirectory: string,\n archType: string[] = [ArchitectureType.Default],\n cancelAfterTimeout = 200,\n ): Promise<void> {\n return test.step(`Starting and canceling build for image ${imageName}`, async () => {\n await this.fillBuildImageForm(imageName, containerFilePath, contextDirectory, archType);\n\n await playExpect(this.cancelBuildButton).toBeEnabled();\n await this.cancelBuildButton.scrollIntoViewIfNeeded();\n await this.page.waitForTimeout(cancelAfterTimeout);\n\n await playExpect(this.cancelBuildButton).toBeVisible();\n await this.cancelBuildButton.click();\n\n await playExpect(this.doneButton).toBeEnabled({ timeout: 30_000 });\n });\n }\n\n async uncheckedAllCheckboxes(): Promise<void> {\n return test.step('Uncheck all checkboxes', async () => {\n await this.showAllArchOptions();\n for (const button of await this.platformRegion.getByRole('button').all()) {\n const buttonText = (await button.textContent()) ?? '';\n if (buttonText.trim() === 'New platform' || buttonText.trim() === 'Less Options...') {\n continue;\n }\n const checkbox = button.getByRole('checkbox');\n try {\n await playExpect(checkbox).toBeVisible();\n await playExpect(checkbox).toBeChecked();\n await playExpect(button).toBeEnabled();\n await button.click();\n await playExpect(checkbox).not.toBeChecked();\n } catch {\n console.log(`Checkbox for button \"${buttonText.trim()}\" is already unchecked.`);\n }\n }\n });\n }\n\n private async checkArchCheckbox(archType: string): Promise<void> {\n return test.step(`Check ${archType} checkbox`, async () => {\n const archTypeButton = this.platformRegion.getByLabel('linux/' + archType);\n await playExpect(archTypeButton).toBeEnabled();\n await archTypeButton.click();\n const checkbox = archTypeButton.getByRole('checkbox');\n await playExpect(checkbox).toBeChecked();\n });\n }\n\n async uncheckDefaultCheckbox(): Promise<void> {\n return test.step('Uncheck default checkbox', async () => {\n if (archType === 'arm64') {\n await playExpect(this.arm64checkbox).toBeChecked();\n await this.arm64Button.click();\n await playExpect(this.arm64checkbox).not.toBeChecked();\n } else {\n await playExpect(this.amd64checkbox).toBeChecked();\n await this.amd64Button.click();\n await playExpect(this.amd64checkbox).not.toBeChecked();\n }\n });\n }\n\n private async showAllArchOptions(): Promise<void> {\n if ((await this.archMoreOptionsButton.count()) > 0) {\n await playExpect(this.archMoreOptionsButton).toBeEnabled();\n await this.archMoreOptionsButton.click();\n } else {\n await playExpect(this.archLessOptionsButton).toBeEnabled();\n }\n }\n\n async validateBuildLogs(): Promise<void> {\n const logs = this.page.locator('.xterm-rows');\n await playExpect(logs).toBeVisible();\n const logRows = await logs.locator('div:has(span)').all();\n\n await Promise.all(\n logRows.map(async logRow => {\n await playExpect.poll(async () => logRow.textContent()).not.toContain('Error');\n }),\n );\n }\n\n private async fillBuildImageForm(\n imageName: string,\n containerFilePath: string,\n contextDirectory: string,\n archType: string[] = [ArchitectureType.Default],\n ): Promise<void> {\n if (!containerFilePath) {\n throw Error('Path to containerfile is incorrect or not provided!');\n }\n\n await this.containerFilePathInput.fill(containerFilePath);\n\n if (contextDirectory) await this.buildContextDirectoryInput.fill(contextDirectory);\n if (imageName) {\n await this.imageNameInput.clear();\n await this.imageNameInput.pressSequentially(imageName, { delay: 50 });\n }\n\n if (!archType.includes(ArchitectureType.Default)) {\n await this.uncheckDefaultCheckbox();\n await this.showAllArchOptions();\n\n for (const architecture of archType) {\n await this.checkArchCheckbox(architecture);\n }\n }\n\n await playExpect(this.buildButton).toBeEnabled();\n await this.buildButton.scrollIntoViewIfNeeded();\n await this.buildButton.click();\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport type { PlayYamlOptions } from '/@/model/core/types';\nimport { PodmanKubePlayOptions } from '/@/model/core/types';\n\nimport { BasePage } from './base-page';\nimport { PodsPage } from './pods-page';\n\nexport class PodmanKubePlayPage extends BasePage {\n readonly heading: Locator;\n readonly yamlPathInput: Locator;\n readonly playButton: Locator;\n readonly doneButton: Locator;\n readonly selectYamlButton: Locator;\n readonly createYamlFromScratchButton: Locator;\n readonly customYamlEditor: Locator;\n readonly alertMessage: Locator;\n readonly buildCheckbox: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = page.getByRole('heading', {\n name: 'Create pods from a Kubernetes YAML file',\n });\n this.yamlPathInput = page.getByPlaceholder('Select a .yaml file to play');\n this.selectYamlButton = page.getByRole('button', {\n name: 'Podman Container Engine Runtime',\n });\n this.createYamlFromScratchButton = page.getByRole('button', { name: 'Create file from scratch' });\n this.customYamlEditor = page.locator('#custom-yaml-editor');\n this.playButton = page.getByRole('button', { name: 'Play' });\n this.doneButton = page.getByRole('button', { name: 'Done' });\n this.alertMessage = this.page.getByLabel('Error Message Content');\n this.buildCheckbox = page.getByRole('checkbox', { name: 'Enable build' }).locator('..');\n }\n\n private async enableBuildFlag(): Promise<void> {\n await playExpect(this.buildCheckbox).not.toBeChecked();\n await playExpect(this.buildCheckbox).toBeEnabled();\n await this.buildCheckbox.check();\n await playExpect(this.buildCheckbox).toBeChecked();\n }\n\n private async createFromScratch(jsonResourceDefinition: string): Promise<void> {\n await playExpect(this.createYamlFromScratchButton).toBeEnabled();\n await this.createYamlFromScratchButton.click();\n await playExpect(this.createYamlFromScratchButton).toHaveAttribute('aria-pressed', 'true');\n\n const codeSection = this.customYamlEditor.getByRole('code');\n await playExpect(codeSection).toBeVisible();\n await codeSection.click();\n\n await codeSection.pressSequentially(jsonResourceDefinition, { delay: 5 });\n await playExpect(codeSection).toContainText(jsonResourceDefinition);\n }\n\n private async selectYamlFile(pathToYaml: string): Promise<void> {\n if (!pathToYaml) {\n throw Error('Path to Yaml file is incorrect or not provided!');\n }\n await playExpect(this.selectYamlButton).toBeEnabled();\n await this.selectYamlButton.click();\n await playExpect(this.selectYamlButton).toHaveAttribute('aria-pressed', 'true');\n // TODO: evaluate() is required due to noninteractivity of fields currently, once https://github.com/containers/podman-desktop/issues/5479 is done they will no longer be needed\n await this.yamlPathInput.evaluate(node => node.removeAttribute('readonly'));\n await this.playButton.evaluate(node => node.removeAttribute('disabled'));\n await this.yamlPathInput.fill(pathToYaml);\n }\n\n async playYaml(options: PlayYamlOptions, buildImage = false, timeout = 120_000): Promise<PodsPage> {\n return test.step('Podman Kube Play', async () => {\n const podmanKubePlayOption = options.podmanKubePlayOption;\n switch (podmanKubePlayOption) {\n case PodmanKubePlayOptions.SelectYamlFile:\n await this.selectYamlFile(options.pathToYaml);\n break;\n case PodmanKubePlayOptions.CreateYamlFileFromScratch:\n await this.createFromScratch(options.jsonResourceDefinition);\n break;\n }\n\n if (buildImage) {\n await this.enableBuildFlag();\n }\n\n await this.playButton.click();\n await playExpect(this.doneButton.or(this.alertMessage).first()).toBeVisible({ timeout: timeout });\n\n if (await this.alertMessage.isVisible()) {\n const errorMessage = await this.alertMessage.textContent();\n throw Error(`Error while playing Kubernetes YAML: ${errorMessage}`);\n }\n\n await playExpect(this.doneButton).toBeEnabled();\n await this.doneButton.click();\n return new PodsPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { PodState } from '/@/model/core/states';\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { DetailsPage } from './details-page';\nimport { PodsPage } from './pods-page';\n\nexport class PodDetailsPage extends DetailsPage {\n readonly startButton: Locator;\n readonly stopButton: Locator;\n readonly restartButton: Locator;\n readonly deleteButton: Locator;\n readonly findInLogsInput: Locator;\n readonly searchResults: Locator;\n\n static readonly SUMMARY_TAB = 'Summary';\n static readonly LOGS_TAB = 'Logs';\n static readonly INSPECT_TAB = 'Inspect';\n static readonly KUBE_TAB = 'Kube';\n\n constructor(page: Page, name: string) {\n super(page, name);\n this.startButton = this.controlActions.getByRole('button').and(this.page.getByLabel('Start Pod', { exact: true }));\n this.stopButton = this.controlActions.getByRole('button').and(this.page.getByLabel('Stop Pod', { exact: true }));\n this.restartButton = this.controlActions\n .getByRole('button')\n .and(this.page.getByLabel('Restart Pod', { exact: true }));\n this.deleteButton = this.controlActions\n .getByRole('button')\n .and(this.page.getByLabel('Delete Pod', { exact: true }));\n this.findInLogsInput = this.tabContent.getByLabel('Find');\n this.searchResults = this.tabContent.locator('div.xterm-selection > div');\n }\n\n async getState(): Promise<string> {\n return test.step('Get Pod State', async () => {\n const currentState = await this.header.getByRole('status').getAttribute('title');\n for (const state of Object.values(PodState)) {\n if (currentState === state) return state;\n }\n\n return PodState.Unknown;\n });\n }\n\n async startPod(): Promise<void> {\n return test.step('Start Pod', async () => {\n await playExpect(this.startButton).toBeEnabled({ timeout: 10_000 });\n await this.startButton.click();\n });\n }\n\n async stopPod(): Promise<void> {\n return test.step('Stop Pod', async () => {\n await playExpect(this.stopButton).toBeEnabled({ timeout: 10_000 });\n await this.stopButton.click();\n });\n }\n\n async restartPod(): Promise<void> {\n return test.step('Restart Pod', async () => {\n await playExpect(this.restartButton).toBeEnabled({ timeout: 20_000 });\n await this.restartButton.click();\n });\n }\n\n async deletePod(): Promise<PodsPage> {\n return test.step('Delete Pod', async () => {\n await playExpect(this.deleteButton).toBeEnabled({ timeout: 10_000 });\n await this.deleteButton.click();\n await handleConfirmationDialog(this.page);\n return new PodsPage(this.page);\n });\n }\n\n async findInLogs(text: string): Promise<void> {\n return test.step('Find text in logs', async () => {\n await this.activateTab(PodDetailsPage.LOGS_TAB);\n await playExpect(this.findInLogsInput).toBeVisible();\n await this.findInLogsInput.clear();\n await playExpect(this.findInLogsInput).toHaveValue('');\n\n await this.findInLogsInput.fill(text);\n await playExpect(this.findInLogsInput).toHaveValue(text);\n });\n }\n\n async getCountOfSearchResults(): Promise<number> {\n return test.step('Get count of search results', async () => {\n await this.activateTab(PodDetailsPage.LOGS_TAB);\n await playExpect(this.findInLogsInput).toBeVisible();\n\n return await this.searchResults.count();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { MainPage } from './main-page';\nimport { PodmanKubePlayPage } from './podman-kube-play-page';\nimport { PodDetailsPage } from './pods-details-page';\n\nexport class PodsPage extends MainPage {\n readonly podmanKubePlayButton: Locator;\n readonly prunePodsButton: Locator;\n readonly pruneConfirmationButton: Locator;\n\n constructor(page: Page) {\n super(page, 'pods');\n this.podmanKubePlayButton = this.page.getByRole('button', {\n name: 'Podman Kube Play',\n });\n this.prunePodsButton = this.page.getByRole('button', { name: 'Prune' });\n this.pruneConfirmationButton = this.page.getByRole('button', {\n name: 'Yes',\n });\n }\n\n async openPodDetails(name: string): Promise<PodDetailsPage> {\n return test.step(`Open Pod: ${name} details`, async () => {\n const podRow = await this.getPodRowByName(name);\n if (podRow === undefined) {\n throw Error(`Pod: ${name} does not exist`);\n }\n const openPodDetailsButton = podRow.getByRole('button').getByText(name, { exact: true });\n await playExpect(openPodDetailsButton).toBeEnabled();\n await openPodDetailsButton.click();\n return new PodDetailsPage(this.page, name);\n });\n }\n\n async getPodRowByName(name: string): Promise<Locator | undefined> {\n return this.getRowByName(name);\n }\n\n async podExists(name: string): Promise<boolean> {\n return (await this.getPodRowByName(name)) !== undefined;\n }\n\n async openPodmanKubePlay(): Promise<PodmanKubePlayPage> {\n return test.step('Open Podman Kube Play', async () => {\n await playExpect(this.podmanKubePlayButton).toBeEnabled();\n await this.podmanKubePlayButton.click();\n return new PodmanKubePlayPage(this.page);\n });\n }\n\n async prunePods(): Promise<PodsPage> {\n return test.step('Prune Pods', async () => {\n await this.prunePodsButton.click();\n await handleConfirmationDialog(this.page, 'Prune');\n return this;\n });\n }\n\n async selectPod(names: string[]): Promise<void> {\n return test.step(`Select Pod: ${names}`, async () => {\n for (const containerName of names) {\n const row = await this.getPodRowByName(containerName);\n if (row === undefined) {\n throw Error('Pod cannot be selected');\n }\n await row.getByRole('cell').nth(1).click();\n }\n });\n }\n\n async getPodActionsMenu(name: string): Promise<Locator> {\n const row = await this.getPodRowByName(name);\n if (row === undefined) {\n throw Error('Cannot select actions menu, pod does not exist');\n }\n return row.getByRole('button', { name: 'kebab menu', exact: true });\n }\n\n public async deployedPodExists(podName: string, environment = 'Podman'): Promise<boolean> {\n return test.step(`Check if deployed pod exists: ${podName}`, async () => {\n const deployedContainerRow = await this.getPodRowByName(podName);\n if (deployedContainerRow) {\n const env = await deployedContainerRow.getByRole('cell').nth(4).textContent();\n return env?.trim() === environment;\n }\n return false;\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { type Locator, type Page, test } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { PodsPage } from './pods-page';\n\nexport class CreatePodsPage extends BasePage {\n readonly heading: Locator;\n readonly closeLink: Locator;\n readonly podNameBox: Locator;\n readonly closeButton: Locator;\n readonly createPodButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = this.page.getByRole('heading', {\n name: 'Copy containers to a pod',\n });\n this.closeLink = this.page.getByRole('link', { name: 'Close' });\n this.podNameBox = this.page.getByRole('textbox', { name: 'Pod name' });\n this.closeButton = this.page.getByRole('button', { name: 'Close' });\n this.createPodButton = this.page.getByRole('button', {\n name: 'Create Pod',\n });\n }\n\n async createPod(podName: string): Promise<PodsPage> {\n return test.step(`Create pod ${podName}`, async () => {\n await this.podNameBox.fill(podName);\n await this.createPodButton.click();\n return new PodsPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { ContainersPage } from './containers-page';\nimport { RunImagePage } from './run-image-page';\n\nexport class SelectImagePage extends BasePage {\n readonly heading: Locator;\n readonly imageNameInput: Locator;\n readonly cancelButton: Locator;\n readonly runImageButton: Locator;\n readonly pullImageAndRunButton: Locator;\n readonly manageRegistriesButton: Locator;\n readonly errorMessage: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = page.getByRole('heading', {\n name: 'Select an image',\n exact: true,\n });\n this.imageNameInput = page.getByPlaceholder('Select or enter an image to run');\n this.cancelButton = page.getByRole('button', { name: 'Cancel' });\n this.runImageButton = page.getByRole('button', { name: 'Run Image' });\n this.pullImageAndRunButton = page.getByRole('button', { name: 'Pull Image and Run' });\n this.manageRegistriesButton = page.getByRole('button', { name: 'Manage registries' });\n this.errorMessage = page.getByRole('alert', { name: 'Error Message Content' });\n }\n\n async selectImage(imageName: string): Promise<SelectImagePage> {\n return test.step(`Select image: ${imageName}`, async () => {\n await playExpect(this.imageNameInput).toBeVisible();\n await this.imageNameInput.fill(imageName);\n await playExpect(this.imageNameInput).toHaveValue(imageName);\n return this;\n });\n }\n\n async cancel(): Promise<ContainersPage> {\n return test.step('Cancel and return to Containers page', async () => {\n await playExpect(this.cancelButton).toBeEnabled();\n await this.cancelButton.click();\n return new ContainersPage(this.page);\n });\n }\n\n async runImage(imageName: string): Promise<RunImagePage> {\n return test.step('Run image', async () => {\n await this.selectImage(imageName);\n // The UI conditionally shows either \"Pull Image and Run\" or \"Run Image\" button\n // depending on whether the image exists locally\n const actionButton = this.pullImageAndRunButton.or(this.runImageButton);\n await playExpect(actionButton).toBeEnabled({ timeout: 10_000 });\n await actionButton.click();\n return new RunImagePage(this.page, imageName);\n });\n }\n\n async openManageRegistries(): Promise<void> {\n return test.step('Open Manage registries', async () => {\n await playExpect(this.manageRegistriesButton).toBeEnabled();\n await this.manageRegistriesButton.click();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { ContainerState } from '/@/model/core/states';\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { BuildImagePage } from './build-image-page';\nimport { ContainerDetailsPage } from './container-details-page';\nimport { CreatePodsPage } from './create-pod-page';\nimport { MainPage } from './main-page';\nimport { SelectImagePage } from './select-image-page';\n\nexport class ContainersPage extends MainPage {\n readonly pruneContainersButton: Locator;\n readonly createContainerButton: Locator;\n readonly pruneConfirmationButton: Locator;\n readonly runAllContainersButton: Locator;\n readonly createDialog: Locator;\n readonly createDialogCloseButton: Locator;\n readonly createDialogContainerOrDockerfileButton: Locator;\n readonly createDialogExistingImageButton: Locator;\n\n constructor(page: Page) {\n super(page, 'containers');\n this.pruneContainersButton = this.additionalActions.getByRole('button', {\n name: 'Prune',\n });\n this.createContainerButton = this.additionalActions.getByRole('button', {\n name: 'Create',\n });\n this.pruneConfirmationButton = this.page.getByRole('button', {\n name: 'Yes',\n });\n this.runAllContainersButton = this.page.getByLabel('Run selected containers and pods');\n this.createDialog = this.page.getByRole('dialog', {\n name: 'Create a new container',\n exact: true,\n });\n this.createDialogCloseButton = this.createDialog.getByLabel('Close');\n this.createDialogContainerOrDockerfileButton = this.createDialog.getByRole('button', {\n name: 'Containerfile or Dockerfile',\n });\n this.createDialogExistingImageButton = this.createDialog.getByRole('button', {\n name: 'Existing image',\n });\n }\n\n async openContainersDetails(name: string): Promise<ContainerDetailsPage> {\n return test.step(`Open Container: ${name} details`, async () => {\n const containerRow = await this.getContainerRowByName(name);\n if (containerRow === undefined) {\n throw Error(`Container: '${name}' does not exist`);\n }\n const containerRowName = containerRow.getByRole('cell').nth(3);\n await containerRowName.click();\n return new ContainerDetailsPage(this.page, name);\n });\n }\n\n async startContainer(containerName: string): Promise<ContainersPage> {\n return test.step(`Start Container: ${containerName}`, async () => {\n const containerRow = await this.getContainerRowByName(containerName);\n if (containerRow === undefined) {\n throw Error(`Container: '${containerName}' does not exist`);\n }\n const containerRowStartButton = containerRow.getByRole('button', {\n name: 'Start Container',\n });\n await playExpect(containerRowStartButton).toBeVisible();\n await containerRowStartButton.click();\n return this;\n });\n }\n\n async stopContainer(containerName: string): Promise<ContainersPage> {\n return test.step(`Stop Container: ${containerName}`, async () => {\n const containerRow = await this.getContainerRowByName(containerName);\n if (containerRow === undefined) {\n throw Error(`Container: '${containerName}' does not exist`);\n }\n const containerRowStopButton = containerRow.getByRole('button', {\n name: 'Stop Container',\n });\n await playExpect(containerRowStopButton).toBeVisible();\n await containerRowStopButton.click();\n return this;\n });\n }\n\n async deleteContainer(containerName: string): Promise<ContainersPage> {\n return test.step(`Delete Container: ${containerName}`, async () => {\n const containerRow = await this.getContainerRowByName(containerName);\n if (containerRow === undefined) {\n throw Error(`Container: '${containerName}' does not exist`);\n }\n const containerRowDeleteButton = containerRow.getByRole('button', {\n name: 'Delete Container',\n });\n await playExpect(containerRowDeleteButton).toBeVisible();\n await playExpect(containerRowDeleteButton).toBeEnabled();\n await containerRowDeleteButton.click();\n await handleConfirmationDialog(this.page);\n return new ContainersPage(this.page);\n });\n }\n\n async stopContainerFromDetails(container: string): Promise<ContainerDetailsPage> {\n return test.step(`Stop Container ${container} from details page`, async () => {\n const containerDetailsPage = await this.openContainersDetails(container);\n await playExpect(containerDetailsPage.heading).toBeVisible();\n await playExpect(containerDetailsPage.heading).toContainText(container);\n playExpect(await containerDetailsPage.getState()).toContain(ContainerState.Running);\n await containerDetailsPage.stopContainer();\n return containerDetailsPage;\n });\n }\n\n async getContainerRowByName(name: string): Promise<Locator | undefined> {\n return this.getRowByName(name);\n }\n\n async containerExists(name: string): Promise<boolean> {\n return (await this.getContainerRowByName(name)) !== undefined;\n }\n\n async openCreatePodPage(names: string[]): Promise<CreatePodsPage> {\n return test.step(`Open Create Pod page for containers: ${names}`, async () => {\n for (const containerName of names) {\n const row = await this.getContainerRowByName(containerName);\n if (row === undefined) {\n throw Error('Container cannot be podified');\n }\n await row.getByRole('cell').nth(1).click();\n }\n await this.page.getByRole('button', { name: 'Create Pod' }).click();\n return new CreatePodsPage(this.page);\n });\n }\n\n async pruneContainers(): Promise<ContainersPage> {\n return test.step('Prune Containers', async () => {\n await this.pruneContainersButton.click();\n await handleConfirmationDialog(this.page, 'Prune');\n return this;\n });\n }\n\n async getContainerImage(name: string): Promise<string> {\n const container = await this.getContainerRowByName(name);\n const image = await container?.getByRole('cell').nth(5).textContent();\n if (image) {\n return image;\n }\n return '';\n }\n\n async startAllContainers(): Promise<ContainersPage> {\n return test.step('Start all containers', async () => {\n await this.checkAllRows();\n await this.runAllContainersButton.click();\n return this;\n });\n }\n\n async openCreateDialog(): Promise<ContainersPage> {\n return test.step('Open Create dialog', async () => {\n await playExpect(this.createContainerButton).toBeEnabled();\n await this.createContainerButton.click();\n await playExpect(this.createDialog).toBeVisible();\n return this;\n });\n }\n\n async closeCreateDialog(): Promise<ContainersPage> {\n return test.step('Close Create dialog', async () => {\n await playExpect(this.createDialogCloseButton).toBeVisible();\n await this.createDialogCloseButton.click();\n await playExpect(this.createDialog).not.toBeVisible();\n return this;\n });\n }\n\n async openBuildImageFromDialog(): Promise<BuildImagePage> {\n return test.step('Open Build Image page from Create dialog', async () => {\n await this.openCreateDialog();\n await playExpect(this.createDialogContainerOrDockerfileButton).toBeEnabled({ timeout: 10_000 });\n await this.createDialogContainerOrDockerfileButton.click();\n await playExpect(this.createDialog).not.toBeVisible({ timeout: 10_000 });\n return new BuildImagePage(this.page);\n });\n }\n\n async openSelectImageFromDialog(): Promise<SelectImagePage> {\n return test.step('Open Select Image page from Create dialog', async () => {\n await this.openCreateDialog();\n await playExpect(this.createDialogExistingImageButton).toBeEnabled({ timeout: 10_000 });\n await this.createDialogExistingImageButton.click();\n await playExpect(this.createDialog).not.toBeVisible({ timeout: 10_000 });\n return new SelectImagePage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport class DashboardPage extends BasePage {\n readonly mainPage: Locator;\n readonly header: Locator;\n readonly content: Locator;\n readonly heading: Locator;\n readonly notificationsBox: Locator;\n readonly featuredExtensions: Locator;\n // dev sandbox\n readonly devSandboxProvider: Locator;\n readonly devSandboxBox: Locator;\n readonly devSandboxStatusLabel: Locator;\n // openshift local\n readonly openshiftLocalProvider: Locator;\n readonly openshiftLocalBox: Locator;\n readonly openshiftLocalStatusLabel: Locator;\n readonly transitioningState: Locator;\n\n // podman/machine\n readonly podmanProvider: Locator;\n readonly podmanStatusLabel: Locator;\n readonly podmanInitilizeAndStartButton: Locator;\n\n // contants\n readonly ACTUAL_STATE = 'Actual State';\n readonly CONNECTION_STATUS_LABEL = 'Connection Status Label';\n\n constructor(page: Page) {\n super(page);\n this.mainPage = page.getByRole('region', { name: 'Dashboard' });\n this.header = this.mainPage.getByRole('region', { name: 'header' });\n this.content = this.mainPage.getByRole('region', { name: 'content' });\n this.heading = page.getByRole('heading', { name: 'Dashboard' });\n\n this.notificationsBox = this.content.getByRole('region', { name: 'Notifications Box' });\n this.featuredExtensions = page.getByRole('region', { name: 'FeaturedExtensions' });\n\n // Dev Sandbox locators\n this.devSandboxProvider = page.getByRole('region', { name: 'Developer Sandbox Provider' });\n this.devSandboxBox = this.featuredExtensions.getByLabel('Developer Sandbox');\n this.devSandboxStatusLabel = this.devSandboxProvider.getByLabel(this.CONNECTION_STATUS_LABEL);\n\n // OpenShift Local locators\n this.openshiftLocalProvider = page.getByRole('region', { name: 'OpenShift Local Provider' });\n this.openshiftLocalBox = this.featuredExtensions.getByLabel('OpenShift Local');\n this.openshiftLocalStatusLabel = this.openshiftLocalProvider.getByLabel(this.CONNECTION_STATUS_LABEL);\n\n // Podman/Machine Provider locators\n this.podmanProvider = page.getByRole('region', { name: 'Podman Provider' });\n this.podmanInitilizeAndStartButton = this.podmanProvider.getByRole('button', { name: 'Initialize and start ' });\n this.transitioningState = this.podmanProvider.getByLabel('Transitioning State');\n this.podmanStatusLabel = this.podmanProvider.getByLabel(this.CONNECTION_STATUS_LABEL);\n }\n\n public getPodmanStatusLocator(): Locator {\n return this.content.getByRole('region', { name: 'Podman Provider' });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { ExtensionsPage } from './extensions-page';\n\nexport class ExtensionDetailsPage extends BasePage {\n readonly header: Locator;\n readonly tabs: Locator;\n readonly tabContent: Locator;\n readonly enableButton: Locator;\n readonly disableButton: Locator;\n readonly removeExtensionButton: Locator;\n readonly status: Locator;\n readonly heading: Locator;\n readonly errorStackTrace: Locator;\n\n constructor(\n page: Page,\n public readonly extensionName: string,\n ) {\n super(page);\n this.header = page.getByRole('region', { name: 'Header' });\n this.tabs = page.getByRole('region', { name: 'Tabs' });\n this.tabContent = page.getByRole('region', { name: 'Tab Content' });\n this.heading = this.header.getByRole('heading', { name: extensionName });\n this.enableButton = this.header.getByRole('button', { name: 'Start' });\n this.disableButton = this.header.getByRole('button', { name: 'Stop' });\n this.removeExtensionButton = this.header.getByRole('button', {\n name: 'Delete',\n });\n this.status = this.header.getByLabel('Extension Status Label');\n this.errorStackTrace = this.tabContent.getByRole('group', {\n name: 'Stack Trace',\n exact: true,\n });\n }\n\n async disableExtension(): Promise<this> {\n return test.step(`Disable extension: ${this.extensionName}`, async () => {\n if ((await this.status.innerText()) === 'DISABLED') return this;\n\n await this.disableButton.click();\n await playExpect(this.status).toHaveText('DISABLED', { timeout: 30000 });\n return this;\n });\n }\n\n async enableExtension(): Promise<this> {\n return test.step(`Enable extension: ${this.extensionName}`, async () => {\n if ((await this.status.innerText()) === 'ACTIVE') return this;\n\n await this.enableButton.click();\n await playExpect(this.status).toHaveText('ACTIVE', { timeout: 30000 });\n return this;\n });\n }\n\n async removeExtension(disableBeforeRemove = true): Promise<ExtensionsPage> {\n return test.step(`Remove extension: ${this.extensionName}`, async () => {\n if (disableBeforeRemove) {\n await this.disableExtension();\n }\n\n await playExpect(this.removeExtensionButton).toBeVisible();\n await this.removeExtensionButton.click();\n await playExpect(this.removeExtensionButton).not.toBeVisible({ timeout: 30_000 });\n return new ExtensionsPage(this.page);\n });\n }\n\n async activateTab(tabName: string): Promise<this> {\n return test.step(`Activate tab: ${tabName}`, async () => {\n const tabItem = this.tabs.getByRole('button', {\n name: tabName,\n exact: true,\n });\n await playExpect(tabItem).toBeVisible();\n await tabItem.click();\n return this;\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { ExtensionDetailsPage } from './extension-details-page';\nimport { ExtensionsPage } from './extensions-page';\n\nexport class ExtensionCardPage extends BasePage {\n readonly parent: Locator;\n readonly card: Locator;\n readonly leftActions: Locator;\n readonly rightActions: Locator;\n readonly detailsLink: Locator;\n readonly extensionName: string;\n readonly extensionLabel: string;\n readonly extensionActions: Locator;\n readonly onboardingButton: Locator;\n readonly editButton: Locator;\n readonly status: Locator;\n readonly enableButton: Locator;\n readonly disableButton: Locator;\n readonly removeButton: Locator;\n\n constructor(page: Page, extensionName: string, extensionLabel: string) {\n super(page);\n this.parent = this.page.getByRole('region', { name: 'content' });\n this.extensionName = extensionName;\n this.extensionLabel = extensionLabel;\n this.card = this.parent.getByRole('region', {\n name: this.extensionLabel,\n exact: true,\n });\n this.leftActions = this.card.getByRole('region', { name: 'left actions' });\n this.rightActions = this.card.getByRole('region', {\n name: 'right actions',\n });\n this.detailsLink = this.rightActions.getByRole('button', {\n name: `${this.extensionName} extension details`,\n exact: true,\n });\n this.extensionActions = this.leftActions.getByRole('group', {\n name: 'Extension Actions',\n });\n this.onboardingButton = this.leftActions.getByRole('button', {\n name: 'Onboarding bootc',\n });\n this.editButton = this.leftActions.getByRole('button', {\n name: `Edit properties of ${extensionName} extension`,\n });\n this.status = this.leftActions.getByLabel('Extension Status Label');\n this.enableButton = this.extensionActions.getByRole('button', {\n name: 'Start',\n });\n this.disableButton = this.extensionActions.getByRole('button', {\n name: 'Stop',\n });\n this.removeButton = this.extensionActions.getByRole('button', {\n name: 'Delete',\n });\n }\n\n public async openExtensionDetails(heading: string): Promise<ExtensionDetailsPage> {\n await playExpect(this.card).toBeVisible();\n await this.card.scrollIntoViewIfNeeded();\n await playExpect(this.detailsLink).toBeVisible();\n await this.detailsLink.click();\n return new ExtensionDetailsPage(this.page, heading);\n }\n\n async disableExtension(): Promise<this> {\n return test.step(`Disable extension: ${this.extensionName}`, async () => {\n if ((await this.status.innerText()) === 'DISABLED') return this;\n\n await this.disableButton.click();\n await playExpect(this.status).toHaveText('DISABLED');\n return this;\n });\n }\n\n async enableExtension(): Promise<this> {\n return test.step(`Enable extension: ${this.extensionName}`, async () => {\n if ((await this.status.innerText()) === 'ACTIVE') return this;\n\n await this.enableButton.click();\n await playExpect(this.status).toHaveText('ACTIVE');\n return this;\n });\n }\n\n async removeExtension(): Promise<ExtensionsPage> {\n return test.step(`Remove extension: ${this.extensionName}`, async () => {\n await this.disableExtension();\n await this.removeButton.click();\n return new ExtensionsPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { ExtensionCardPage } from './extension-card-page';\nimport type { ExtensionDetailsPage } from './extension-details-page';\n\nexport class ExtensionsPage {\n readonly page: Page;\n readonly heading: Locator;\n readonly header: Locator;\n readonly content: Locator;\n readonly additionalActions: Locator;\n readonly installedTab: Locator;\n readonly catalogTab: Locator;\n readonly installExtensionFromOCIImageButton: Locator;\n\n constructor(page: Page) {\n this.page = page;\n this.header = page.getByRole('region', { name: 'header' });\n this.content = page.getByRole('region', { name: 'content' });\n this.heading = this.header.getByRole('heading', { name: 'extensions' });\n this.additionalActions = this.header.getByRole('group', {\n name: 'additionalActions',\n });\n this.installedTab = this.page.getByRole('button', { name: 'Installed' });\n this.catalogTab = this.page.getByRole('button', { name: 'Catalog', exact: true });\n this.installExtensionFromOCIImageButton = this.additionalActions.getByLabel('Install custom');\n }\n\n public async installExtensionFromOCIImage(extension: string, timeout = 100_000): Promise<ExtensionsPage> {\n return test.step(`Install extension from OCI image: ${extension}`, async () => {\n // open button to install extension from OCI image\n await playExpect(this.installExtensionFromOCIImageButton).toBeEnabled();\n await this.installExtensionFromOCIImageButton.click();\n\n const dialog = this.page.getByRole('dialog', {\n name: 'Install Custom Extension',\n exact: true,\n });\n await playExpect(dialog).toBeVisible();\n const imageInput = dialog.getByRole('textbox', {\n name: 'Image name to install custom extension',\n });\n // check visibility of the input\n await playExpect(imageInput).toBeVisible();\n\n await imageInput.fill(extension);\n\n const installButton = dialog.getByRole('button', {\n name: 'Install',\n exact: true,\n });\n await playExpect(installButton).toBeEnabled();\n\n await installButton.click();\n\n const doneButton = dialog.getByRole('button', {\n name: 'Done',\n exact: true,\n });\n await playExpect(doneButton).toBeEnabled({ timeout: timeout });\n await doneButton.click();\n\n return this;\n });\n }\n\n public async openInstalledTab(): Promise<void> {\n await playExpect(this.installedTab).toBeVisible({ timeout: 10_000 });\n await this.installedTab.click({ force: true });\n }\n\n public async openCatalogTab(): Promise<void> {\n await this.catalogTab.click();\n }\n\n public async openExtensionDetails(name: string, label: string, heading: string): Promise<ExtensionDetailsPage> {\n const extensionCard = await this.getInstalledExtension(name, label);\n return await extensionCard.openExtensionDetails(heading);\n }\n\n public async getInstalledExtension(name: string, label: string): Promise<ExtensionCardPage> {\n await this.openInstalledTab();\n const extensionCard = new ExtensionCardPage(this.page, name, label);\n await playExpect(extensionCard.card).toBeVisible();\n return extensionCard;\n }\n\n public async extensionIsInstalled(label: string): Promise<boolean> {\n await this.openInstalledTab();\n const extension = this.content.getByRole('region', { name: label, exact: true });\n return (await extension.count()) > 0;\n }\n\n public async getInstalledExtensionVersion(name: string, label: string): Promise<string | undefined> {\n const extensionCard = await this.getInstalledExtension(name, label);\n const version = extensionCard.rightActions.getByLabel('Version');\n if ((await version.count()) === 0) {\n return undefined;\n }\n\n try {\n return await version.innerText();\n } catch (error) {\n console.log(`Could not get ${label} extension version:`, error);\n return undefined;\n }\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { KubernetesResources } from '/@/model/core/types';\n\nimport { MainPage } from './main-page';\n\nexport class KubernetesDashboardPage extends MainPage {\n readonly namespaceLocator: Locator;\n readonly namespaceDropdownButton: Locator;\n readonly currentNamespace: Locator;\n\n readonly nodesMetricsButton: Locator;\n readonly podsMetricsButton: Locator;\n readonly deploymentsMetricsButton: Locator;\n readonly servicesMetricsButton: Locator;\n readonly ingressesMetricsButton: Locator;\n readonly pvcsMetricsButton: Locator;\n readonly configMapsMetricsButton: Locator;\n readonly jobsMetricsButton: Locator;\n readonly cronJobsMetricsButton: Locator;\n\n constructor(page: Page) {\n super(page, 'Dashboard');\n this.namespaceLocator = this.page.getByLabel('Kubernetes Namespace', { exact: true });\n this.namespaceDropdownButton = this.namespaceLocator.getByRole('button', { name: 'Namespace' });\n this.currentNamespace = this.namespaceLocator.getByLabel('hidden input', { exact: true });\n\n this.nodesMetricsButton = this.metricsLocatorByName(KubernetesResources.Nodes);\n this.podsMetricsButton = this.metricsLocatorByName(KubernetesResources.Pods);\n this.deploymentsMetricsButton = this.metricsLocatorByName(KubernetesResources.Deployments);\n this.servicesMetricsButton = this.metricsLocatorByName(KubernetesResources.Services);\n this.ingressesMetricsButton = this.metricsLocatorByName(KubernetesResources.IngeressesRoutes);\n this.pvcsMetricsButton = this.metricsLocatorByName(KubernetesResources.PVCs);\n this.configMapsMetricsButton = this.metricsLocatorByName(KubernetesResources.ConfigMapsSecrets);\n this.jobsMetricsButton = this.metricsLocatorByName(KubernetesResources.Jobs);\n this.cronJobsMetricsButton = this.metricsLocatorByName(KubernetesResources.Cronjobs);\n }\n\n async changeNamespace(name: string): Promise<void> {\n await playExpect(this.currentNamespace).not.toHaveValue(name, { timeout: 10_000 });\n await this.selectNamespaceByName(name);\n await playExpect(this.currentNamespace).toHaveValue(name, { timeout: 10_000 });\n }\n\n async selectNamespaceByName(name: string): Promise<void> {\n await playExpect(this.namespaceDropdownButton).toBeVisible();\n await this.namespaceDropdownButton.click();\n\n const namespaceLocator = this.namespaceLocatorByName(name);\n await playExpect(namespaceLocator).toBeVisible({ timeout: 10_000 });\n await namespaceLocator.click();\n }\n\n async getCurrentTotalCountForResource(name: KubernetesResources): Promise<number> {\n return this.getCountByType(name);\n }\n\n async getCurrentActiveCountForResource(name: KubernetesResources): Promise<number> {\n return this.getCountByType(name, 'active');\n }\n\n private namespaceLocatorByName(name: string): Locator {\n return this.namespaceLocator.getByRole('button', { name, exact: true });\n }\n\n private metricsLocatorByName(name: KubernetesResources): Locator {\n return this.page.getByRole('button').filter({ hasText: name });\n }\n\n private async getCountByType(name: KubernetesResources, type = ''): Promise<number> {\n const currentResource = this.metricsLocatorByName(name);\n const label = type ? `${name} ${type} count` : `${name} count`;\n const countLocator = currentResource.getByLabel(label, { exact: true });\n\n if ((await countLocator.count()) === 0) {\n throw new Error(`No ${label} locator found for resource: ${name}`);\n }\n\n const countText = await countLocator.textContent();\n return countText ? Number.parseInt(countText, 10) : 0;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport { KubernetesResourceState } from '/@/model/core/states';\nimport { handleConfirmationDialog } from '/@/utility/operations';\nimport { isMac } from '/@/utility/platform';\n\nimport { DetailsPage } from './details-page';\n\nexport class KubernetesResourceDetailsPage extends DetailsPage {\n readonly applyChangesButton: Locator;\n readonly revertChagesButton: Locator;\n readonly deleteButton: Locator;\n readonly editorWidget: Locator;\n readonly toggleButton: Locator;\n readonly findTextArea: Locator;\n readonly replaceTextArea: Locator;\n readonly replaceButton: Locator;\n\n static readonly SUMMARY_TAB = 'Summary';\n static readonly INSPECT_TAB = 'Inspect';\n static readonly KUBE_TAB = 'Kube';\n\n constructor(page: Page, title: string) {\n super(page, title);\n this.applyChangesButton = this.tabContent.getByRole('button', { name: 'Apply changes to cluster' });\n this.revertChagesButton = this.tabContent.getByRole('button', { name: 'Revert Changes' });\n this.deleteButton = this.controlActions.getByRole('button', { name: 'Delete', exact: false });\n this.editorWidget = this.page.getByRole('dialog', { name: 'Find / Replace' });\n this.toggleButton = this.editorWidget.getByRole('button', { name: 'Toggle Replace' });\n this.findTextArea = this.editorWidget.getByPlaceholder('Find');\n this.replaceTextArea = this.editorWidget.getByPlaceholder('Replace');\n this.replaceButton = this.editorWidget.getByRole('button', { name: 'Replace All' });\n }\n\n async getState(): Promise<string> {\n return test.step('Get resource state', async () => {\n const currentState = await this.header.getByRole('status').getAttribute('title');\n return currentState ?? KubernetesResourceState.Unknown;\n });\n }\n\n public async editKubernetsYamlFile(textToBeChanged: string, newText: string): Promise<void> {\n return test.step('Edit Kubernetes YAML file', async () => {\n await this.activateTab(KubernetesResourceDetailsPage.KUBE_TAB);\n const presentation = this.tabContent.getByRole('presentation');\n await playExpect(presentation).toBeVisible();\n await presentation.click();\n if (isMac) {\n await this.page.keyboard.press('Meta+F');\n } else {\n await this.page.keyboard.press('Control+F');\n }\n await playExpect(this.editorWidget).toBeVisible();\n await playExpect(this.findTextArea).toBeVisible();\n await this.findTextArea.fill(textToBeChanged);\n await playExpect(this.toggleButton).toBeVisible();\n await this.toggleButton.click();\n await playExpect(this.replaceTextArea).toBeVisible();\n await this.replaceTextArea.fill(newText);\n await playExpect(this.replaceButton).toBeVisible();\n await this.replaceButton.click();\n await playExpect(this.revertChagesButton).toBeEnabled();\n await playExpect(this.applyChangesButton).toBeEnabled();\n await this.applyChangesButton.click();\n await handleConfirmationDialog(this.page, 'Kubernetes', true, 'OK');\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport { KubernetesResourceAttributes, KubernetesResources } from '/@/model/core/types';\n\nimport { KubernetesResourceDetailsPage } from './kubernetes-resource-details-page';\nimport { MainPage } from './main-page';\n\nexport class KubernetesResourcePage extends MainPage {\n readonly applyYamlButton: Locator;\n\n constructor(page: Page, name: string) {\n super(page, name);\n this.applyYamlButton = this.additionalActions.getByRole('button', {\n name: 'Apply YAML',\n });\n }\n\n async fetchKubernetesResource(resourceName: string, timeout = 15_000): Promise<Locator> {\n try {\n await playExpect.poll(async () => this.getRowByName(resourceName, false), { timeout: timeout }).toBeTruthy();\n } catch {\n throw Error(`Resource: ${resourceName} does not exist`);\n }\n\n return (await this.getRowByName(resourceName, false)) as Locator;\n }\n\n async geAttributeByRow(row: Locator, attributeName: string, resourceType: KubernetesResources): Promise<Locator> {\n const attributes = KubernetesResourceAttributes[resourceType];\n const attrIndex = attributes.indexOf(attributeName) + 1;\n return row.getByRole('cell').nth(attrIndex);\n }\n\n async openResourceDetails(\n resourceName: string,\n resourceType: KubernetesResources,\n timeout?: number,\n ): Promise<KubernetesResourceDetailsPage> {\n return test.step(`Open ${resourceType}: ${resourceName} details`, async () => {\n const resourceRow = await this.fetchKubernetesResource(resourceName, timeout);\n\n let resourceRowName: Locator;\n if (resourceType === KubernetesResources.Nodes) {\n resourceRowName = resourceRow.getByRole('cell').nth(2);\n } else {\n resourceRowName = resourceRow.getByRole('cell').nth(3);\n }\n\n await playExpect(resourceRowName).toBeEnabled();\n await resourceRowName.click();\n\n return new KubernetesResourceDetailsPage(this.page, resourceName);\n });\n }\n\n async deleteKubernetesResource(resourceName: string): Promise<void> {\n return test.step(`Delete ${resourceName}`, async () => {\n const resourceRow = await this.fetchKubernetesResource(resourceName);\n const deleteButton = resourceRow.getByRole('button', {\n name: 'Delete',\n exact: false,\n });\n await playExpect(deleteButton).toBeVisible();\n await deleteButton.click();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport type { KubernetesResources } from '/@/model/core/types';\n\nimport { KubernetesDashboardPage } from './kubernetes-dashboard-page';\nimport { KubernetesResourcePage } from './kubernetes-resource-page';\n\nexport class KubernetesBar {\n readonly page: Page;\n readonly kubernetesNavBar: Locator;\n readonly title: Locator;\n\n constructor(page: Page) {\n this.page = page;\n this.kubernetesNavBar = page.getByRole('navigation', { name: 'Kubernetes Navigation Bar' });\n this.title = this.kubernetesNavBar.getByText('Kubernetes');\n }\n\n public async openTabPage(kubernetesResource: KubernetesResources): Promise<KubernetesResourcePage> {\n const resource = this.kubernetesNavBar.getByRole('link', { name: kubernetesResource, exact: true });\n await resource.click();\n\n switch (kubernetesResource) {\n case 'Persistent Volume Claims':\n return new KubernetesResourcePage(this.page, 'PVCs');\n case 'ConfigMaps & Secrets':\n return new KubernetesResourcePage(this.page, 'Configmaps and Secrets');\n case 'Ingresses & Routes':\n return new KubernetesResourcePage(this.page, 'ingresses and routes');\n default:\n return new KubernetesResourcePage(this.page, kubernetesResource);\n }\n }\n\n public async openKubernetesDashboardPage(): Promise<KubernetesDashboardPage> {\n const dashboardLink = this.kubernetesNavBar.getByRole('link', { name: 'Dashboard', exact: true });\n await dashboardLink.click();\n return new KubernetesDashboardPage(this.page);\n }\n\n public getSettingsNavBarTabLocator(name: string): Locator {\n return this.kubernetesNavBar.getByLabel(name);\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog, handleEditNetworkDialog } from '/@/utility/operations';\n\nimport { DetailsPage } from './details-page';\nimport { NetworksPage } from './networks-page';\n\nexport class NetworkDetailsPage extends DetailsPage {\n readonly updateButton: Locator;\n readonly deleteButton: Locator;\n\n static readonly SUMMARY_TAB = 'Summary';\n static readonly INSPECT_TAB = 'Inspect';\n\n constructor(page: Page, name: string) {\n super(page, name);\n this.updateButton = this.controlActions.getByRole('button', {\n name: 'Update Network',\n });\n this.deleteButton = this.controlActions.getByRole('button', {\n name: 'Delete Network',\n });\n }\n\n async updateNetwork(options?: {\n dnsServersToAdd?: string;\n dnsServersToRemove?: string;\n action?: 'Cancel' | 'Update';\n }): Promise<NetworkDetailsPage> {\n return test.step('Update network from details page', async () => {\n await playExpect(this.updateButton).toBeEnabled();\n await this.updateButton.click();\n await handleEditNetworkDialog(this.page, this.resourceName, options);\n return this;\n });\n }\n\n async deleteNetwork(): Promise<NetworksPage> {\n return test.step('Delete network from details page', async () => {\n await playExpect(this.deleteButton).toBeEnabled();\n await this.deleteButton.click();\n await handleConfirmationDialog(this.page);\n return new NetworksPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { NetworkDetailsPage } from './network-details-page';\nimport { NetworksPage } from './networks-page';\n\nexport class CreateNetworkPage extends BasePage {\n readonly heading: Locator;\n readonly networkNameBox: Locator;\n readonly subnetBox: Locator;\n readonly createButton: Locator;\n readonly cancelButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = this.page.getByRole('heading', { name: 'Create a network' });\n this.networkNameBox = this.page.getByRole('textbox', { name: 'Name' });\n this.subnetBox = this.page.getByRole('textbox', { name: 'Subnet' });\n this.createButton = this.page.getByRole('button', { name: 'Create' });\n this.cancelButton = this.page.getByRole('button', { name: 'Cancel' });\n }\n\n async createNetwork(name: string, subnet: string): Promise<NetworkDetailsPage> {\n return test.step(`Create network ${name} with subnet ${subnet}`, async () => {\n await playExpect(this.networkNameBox).toBeVisible();\n await this.networkNameBox.clear();\n await playExpect(this.networkNameBox).toHaveValue('');\n await this.networkNameBox.fill(name);\n await playExpect(this.networkNameBox).toHaveValue(name);\n\n await playExpect(this.subnetBox).toBeVisible();\n await this.subnetBox.clear();\n await playExpect(this.subnetBox).toHaveValue('');\n await this.subnetBox.fill(subnet);\n await playExpect(this.subnetBox).toHaveValue(subnet);\n\n await playExpect(this.createButton).toBeEnabled();\n await this.createButton.click();\n return new NetworkDetailsPage(this.page, name);\n });\n }\n\n async cancel(): Promise<NetworksPage> {\n return test.step('Cancel network creation', async () => {\n await playExpect(this.cancelButton).toBeEnabled();\n await this.cancelButton.click();\n return new NetworksPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog, handleEditNetworkDialog } from '/@/utility/operations';\n\nimport { CreateNetworkPage } from './create-network-page';\nimport { MainPage } from './main-page';\nimport { NetworkDetailsPage } from './network-details-page';\n\nexport class NetworksPage extends MainPage {\n readonly createNetworkButton: Locator;\n readonly deleteSelectedButton: Locator;\n\n constructor(page: Page) {\n super(page, 'networks');\n this.createNetworkButton = this.additionalActions.getByRole('button', { name: 'Create' });\n this.deleteSelectedButton = this.bottomAdditionalActions.getByRole('button', { name: 'Delete' });\n }\n\n async getNetworkRowByName(name: string): Promise<Locator | undefined> {\n return this.getRowByName(name);\n }\n\n async networkExists(name: string): Promise<boolean> {\n return test.step(`Check if network: ${name} exists`, async () => {\n const result = await this.getNetworkRowByName(name);\n return result !== undefined;\n });\n }\n\n async countNetworksFromTable(): Promise<number> {\n return this.countRowsFromTable();\n }\n\n async deleteNetwork(networkName: string): Promise<NetworksPage> {\n return test.step(`Delete network: ${networkName}`, async () => {\n const networkDeleteButton = await this.getDeleteNetworkRowButton(networkName);\n await playExpect(networkDeleteButton).toBeEnabled();\n await networkDeleteButton.click();\n await handleConfirmationDialog(this.page);\n return this;\n });\n }\n\n async updateNetwork(\n networkName: string,\n options?: {\n dnsServersToAdd?: string;\n dnsServersToRemove?: string;\n action?: 'Cancel' | 'Update';\n },\n ): Promise<NetworksPage> {\n return test.step(`Update network: ${networkName}`, async () => {\n const networkUpdateButton = await this.getUpdateNetworkRowButton(networkName);\n await playExpect(networkUpdateButton).toBeEnabled();\n await networkUpdateButton.click();\n await handleEditNetworkDialog(this.page, networkName, options);\n return this;\n });\n }\n\n async deleteSelectedNetworks(): Promise<NetworksPage> {\n return test.step('Delete selected networks', async () => {\n await playExpect(this.deleteSelectedButton).toBeEnabled();\n await this.deleteSelectedButton.click();\n await handleConfirmationDialog(this.page);\n return this;\n });\n }\n\n async createNetwork(name: string, subnet: string): Promise<NetworkDetailsPage> {\n return test.step(`Create network: ${name}`, async () => {\n await playExpect(this.createNetworkButton).toBeEnabled();\n await this.createNetworkButton.click();\n const createNetworkPage = new CreateNetworkPage(this.page);\n await playExpect(createNetworkPage.heading).toBeVisible();\n return createNetworkPage.createNetwork(name, subnet);\n });\n }\n\n async openNetworkDetails(networkName: string): Promise<NetworkDetailsPage> {\n return test.step('Open Network Details Page', async () => {\n const networkRow = await this.getNetworkRowByName(networkName);\n if (networkRow === undefined) {\n throw Error(`Network: ${networkName} does not exist`);\n }\n const networkRowNameCell = networkRow.getByRole('cell').nth(3);\n await playExpect(networkRowNameCell).toBeEnabled();\n await networkRowNameCell.click();\n\n return new NetworkDetailsPage(this.page, networkName);\n });\n }\n\n private async getNetworkRowButton(networkName: string, buttonName: string): Promise<Locator> {\n const networkRow = await this.getNetworkRowByName(networkName);\n if (networkRow === undefined) {\n throw Error(`Network: ${networkName} does not exist`);\n }\n return networkRow.getByRole('button', { name: buttonName });\n }\n\n private async getDeleteNetworkRowButton(networkName: string): Promise<Locator> {\n return this.getNetworkRowButton(networkName, 'Delete Network');\n }\n private async getUpdateNetworkRowButton(networkName: string): Promise<Locator> {\n return this.getNetworkRowButton(networkName, 'Update Network');\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport { ContainersPage } from '/@/model/pages/containers-page';\nimport { DashboardPage } from '/@/model/pages/dashboard-page';\nimport { ExtensionsPage } from '/@/model/pages/extensions-page';\nimport { ImagesPage } from '/@/model/pages/images-page';\nimport { KubernetesBar } from '/@/model/pages/kubernetes-bar';\nimport { NetworksPage } from '/@/model/pages/networks-page';\nimport { PodsPage } from '/@/model/pages/pods-page';\nimport { SettingsBar } from '/@/model/pages/settings-bar';\nimport { VolumesPage } from '/@/model/pages/volumes-page';\n\nexport class NavigationBar {\n readonly page: Page;\n readonly navigationLocator: Locator;\n readonly imagesLink: Locator;\n readonly containersLink: Locator;\n readonly volumesLink: Locator;\n readonly podsLink: Locator;\n readonly dashboardLink: Locator;\n readonly settingsLink: Locator;\n readonly extensionsLink: Locator;\n readonly kubernetesLink: Locator;\n readonly networksLink: Locator;\n\n constructor(page: Page) {\n this.page = page;\n this.navigationLocator = this.page.getByRole('navigation', {\n name: 'AppNavigation',\n });\n this.imagesLink = this.page.getByRole('link', { name: 'Images' });\n this.containersLink = this.page.getByRole('link', { name: 'Containers' }).nth(0);\n this.podsLink = this.page.getByRole('link', { name: 'Pods', exact: true }).nth(0);\n this.volumesLink = this.page.getByRole('link', { name: 'Volumes' });\n this.dashboardLink = this.page.getByRole('link', { name: 'Dashboard' });\n this.settingsLink = this.page.getByRole('link', { name: 'Settings', exact: true });\n this.extensionsLink = this.navigationLocator.getByRole('link', {\n name: 'Extensions',\n exact: true,\n });\n this.kubernetesLink = this.navigationLocator.getByRole('link', {\n name: 'Kubernetes',\n });\n this.networksLink = this.navigationLocator.getByRole('link', {\n name: 'Networks',\n });\n }\n\n async openDashboard(): Promise<DashboardPage> {\n return test.step('Open Dashboard page', async () => {\n await playExpect(this.dashboardLink).toBeVisible({ timeout: 10_000 });\n await this.dashboardLink.click({ force: true });\n return new DashboardPage(this.page);\n });\n }\n\n async openImages(): Promise<ImagesPage> {\n return test.step('Open Images page', async () => {\n await playExpect(this.imagesLink).toBeVisible({ timeout: 10_000 });\n await this.imagesLink.click({ force: true });\n return new ImagesPage(this.page);\n });\n }\n\n async openContainers(): Promise<ContainersPage> {\n return test.step('Open Containers page', async () => {\n await playExpect(this.containersLink).toBeVisible({ timeout: 10_000 });\n await this.containersLink.click({ force: true });\n return new ContainersPage(this.page);\n });\n }\n\n async openPods(): Promise<PodsPage> {\n return test.step('Open Pods page', async () => {\n await playExpect(this.podsLink).toBeVisible({ timeout: 10_000 });\n await this.podsLink.click({ force: true });\n return new PodsPage(this.page);\n });\n }\n\n async openSettings(): Promise<SettingsBar> {\n return test.step('Open Settings Page ', async () => {\n const settingsBar = new SettingsBar(this.page);\n if (!(await settingsBar.settingsNavBar.isVisible())) {\n await playExpect(this.settingsLink).toBeVisible({ timeout: 10_000 });\n await this.settingsLink.click({ force: true });\n }\n return settingsBar;\n });\n }\n\n async openVolumes(): Promise<VolumesPage> {\n return test.step('Open Volumes page', async () => {\n await playExpect(this.volumesLink).toBeVisible({ timeout: 10_000 });\n await this.volumesLink.click({ force: true });\n return new VolumesPage(this.page);\n });\n }\n\n async openKubernetes(): Promise<KubernetesBar> {\n return test.step('Open Kubernetes Page ', async () => {\n const kubernetesBar = new KubernetesBar(this.page);\n if (!(await kubernetesBar.kubernetesNavBar.isVisible())) {\n await playExpect(this.kubernetesLink).toBeVisible({ timeout: 10_000 });\n await this.kubernetesLink.click({ force: true });\n }\n return kubernetesBar;\n });\n }\n\n async openExtensions(): Promise<ExtensionsPage> {\n return test.step('Open Extensions page', async () => {\n await playExpect(this.extensionsLink).toBeVisible({ timeout: 10_000 });\n await this.extensionsLink.click({ force: true });\n return new ExtensionsPage(this.page);\n });\n }\n\n async openNetworks(): Promise<NetworksPage> {\n return test.step('Open Networks page', async () => {\n await playExpect(this.networksLink).toBeVisible({ timeout: 10_000 });\n await this.networksLink.click({ force: true });\n return new NetworksPage(this.page);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { NavigationBar } from '/@/model/workbench/navigation';\nimport { createPodmanMachineFromCLI, resetPodmanMachinesFromCLI } from '/@/utility/operations';\n\nexport async function wait(\n waitFunction: () => Promise<boolean>,\n until: boolean,\n timeout: number,\n diff: number,\n sendError: boolean,\n errorMessage: string,\n): Promise<void> {\n let time = timeout;\n while (time > 0) {\n const waitFuncResult = await waitFunction();\n if (waitFuncResult === until) {\n return;\n }\n time = time - diff;\n await delay(diff);\n }\n const message =\n errorMessage.length === 0\n ? `Timeout (${timeout} ms) was reach while waiting for condition (${waitFunction.name}) to become '${String(\n until,\n )}'`\n : errorMessage;\n if (sendError) {\n throw Error(message);\n }\n}\n\n/**\n * Waiting function that tests the condition (callback) to become true until timeout is reached,\n * error is thrown if not fulfilled\n * @param waitFunction a callback returning Promise<boolean>\n * @param timeout timeout in ms\n * @param diff a diff (number) in ms defining the delay between each cycle\n *\n * Example: await waitUntil(() => dialogIsOpen(), 1000, 250, 'Dialog window was not openend as expected in 1 s');\n */\nexport async function waitUntil(\n waitFunction: () => Promise<boolean>,\n {\n timeout = 5_000,\n diff = 500,\n sendError = true,\n message = '',\n }: {\n timeout?: number;\n diff?: number;\n sendError?: boolean;\n message?: string;\n } = {},\n): Promise<void> {\n await wait(waitFunction, true, timeout, diff, sendError, message);\n}\n\n/**\n * Waiting function that tests the condition (callback) to become false until timeout is reached,\n * error is thrown if not fulfilled\n * @param waitFunction a callback returning Promise<boolean>\n * @param timeout timeout in ms\n * @param diff a diff (number) in ms defining the delay between each cycle\n *\n * Example: await waitWhile(() => dialogIsOpen(), 1000, 250, 'Dialog window was not closed as expected in 1 s');\n */\nexport async function waitWhile(\n waitFunction: () => Promise<boolean>,\n {\n timeout = 5_000,\n diff = 500,\n sendError = true,\n message = '',\n }: {\n timeout?: number;\n diff?: number;\n sendError?: boolean;\n message?: string;\n } = {},\n): Promise<void> {\n await wait(waitFunction, false, timeout, diff, sendError, message);\n}\n\n/**\n * Standard delay function\n * @param ms number of ms to sleep for\n * @returns promise void\n */\nexport async function delay(ms: number): Promise<void> {\n return new Promise(resolve => {\n setTimeout(resolve, ms);\n });\n}\n\nexport async function waitForPodmanMachineStartup(page: Page, timeout = 30_000): Promise<void> {\n return test.step('Wait for Podman machine to be running', async () => {\n await createPodmanMachineFromCLI();\n\n const dashboardPage = await new NavigationBar(page).openDashboard();\n await playExpect(dashboardPage.heading).toBeVisible();\n await playExpect(dashboardPage.podmanStatusLabel).toBeVisible({ timeout });\n\n try {\n // sometimes the podman machine is stuck in STARTING state, so we try to reset it once\n await playExpect(dashboardPage.podmanStatusLabel).not.toHaveText('STARTING', { timeout });\n } catch (error) {\n console.error('Podman machine stuck in STARTING state, trying to restart it', error);\n await resetPodmanMachinesFromCLI();\n await createPodmanMachineFromCLI();\n }\n\n await playExpect(dashboardPage.podmanStatusLabel).toHaveText('RUNNING', { timeout });\n });\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nexport class RunnerOptions {\n public readonly _profile: string;\n public readonly _customFolder: string;\n public readonly _customOutputFolder: string;\n public readonly _openDevTools: string;\n public readonly _autoUpdate: boolean;\n public readonly _autoCheckUpdates: boolean;\n public readonly _extensionsDisabled: string[];\n public readonly _aiLabModelUploadDisabled: boolean;\n public readonly _binaryPath: string | undefined;\n public readonly _saveTracesOnPass: boolean;\n public readonly _saveVideosOnPass: boolean;\n public readonly _customSettings: { [key: string]: unknown } = {};\n\n constructor({\n profile = '',\n customFolder = 'podman-desktop',\n customOutputFolder = 'tests/playwright/output/',\n openDevTools = 'none',\n autoUpdate = true,\n autoCheckUpdates = true,\n extensionsDisabled = [],\n aiLabModelUploadDisabled = false,\n binaryPath = undefined,\n saveTracesOnPass = false,\n saveVideosOnPass = false,\n customSettings = {},\n }: {\n profile?: string;\n customFolder?: string;\n customOutputFolder?: string;\n openDevTools?: string;\n autoUpdate?: boolean;\n autoCheckUpdates?: boolean;\n extensionsDisabled?: string[];\n aiLabModelUploadDisabled?: boolean;\n binaryPath?: string;\n saveTracesOnPass?: boolean;\n saveVideosOnPass?: boolean;\n customSettings?: { [key: string]: unknown };\n } = {}) {\n this._profile = profile;\n this._customFolder = customFolder;\n this._customOutputFolder = customOutputFolder;\n this._openDevTools = openDevTools;\n this._autoUpdate = autoUpdate;\n this._autoCheckUpdates = autoCheckUpdates;\n this._extensionsDisabled = extensionsDisabled;\n this._aiLabModelUploadDisabled = aiLabModelUploadDisabled;\n this._binaryPath = binaryPath;\n this._saveTracesOnPass = saveTracesOnPass;\n this._saveVideosOnPass = saveVideosOnPass;\n this._customSettings = customSettings;\n }\n\n public createSettingsJson(): string {\n console.log(`Binary path: ${this._binaryPath}`);\n\n if (this._binaryPath) {\n return JSON.stringify({\n 'preferences.OpenDevTools': this._openDevTools,\n 'extensions.autoUpdate': this._autoUpdate,\n 'extensions.autoCheckUpdates': this._autoCheckUpdates,\n 'extensions.disabled': this._extensionsDisabled,\n 'ai-lab.modelUploadDisabled': this._aiLabModelUploadDisabled,\n 'podman.binary.path': this._binaryPath,\n ...this._customSettings,\n });\n }\n\n return JSON.stringify({\n 'preferences.OpenDevTools': this._openDevTools,\n 'extensions.autoUpdate': this._autoUpdate,\n 'extensions.autoCheckUpdates': this._autoCheckUpdates,\n 'extensions.disabled': this._extensionsDisabled,\n 'ai-lab.modelUploadDisabled': this._aiLabModelUploadDisabled,\n ...this._customSettings,\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { existsSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';\nimport { dirname, join, resolve } from 'node:path';\n\nimport type { ElectronApplication, JSHandle, Page } from '@playwright/test';\nimport { _electron as electron, test } from '@playwright/test';\nimport type { BrowserWindow } from 'electron';\n\nimport { isLinux } from '/@/utility/platform';\nimport { waitWhile } from '/@/utility/wait';\n\nimport { RunnerOptions } from './runner-options';\n\ntype WindowState = {\n isVisible: boolean;\n isDevToolsOpened: boolean;\n isCrashed: boolean;\n};\n\nexport class Runner {\n private _options: object;\n private _running: boolean;\n private _app: ElectronApplication | undefined;\n private _page: Page | undefined;\n private readonly _profile: string;\n private readonly _customFolder;\n private readonly _testOutput: string;\n private _videoAndTraceName: string | undefined;\n private _runnerOptions: RunnerOptions;\n private _saveTracesOnPass: boolean;\n private _saveVideosOnPass: boolean;\n\n private static _instance: Runner | undefined;\n\n static async getInstance({\n runnerOptions = new RunnerOptions(),\n }: {\n runnerOptions?: RunnerOptions;\n } = {}): Promise<Runner> {\n if (!Runner._instance) {\n Runner._instance = new Runner({ runnerOptions });\n await Runner._instance.start();\n }\n return Runner._instance;\n }\n\n private constructor({\n runnerOptions = new RunnerOptions(),\n }: {\n runnerOptions?: RunnerOptions;\n } = {}) {\n this._running = false;\n this._runnerOptions = runnerOptions;\n this._profile = this._runnerOptions._profile;\n this._saveTracesOnPass = this._runnerOptions._saveTracesOnPass;\n this._saveVideosOnPass = this._runnerOptions._saveVideosOnPass;\n this._testOutput = join(this._runnerOptions._customOutputFolder, this._profile);\n this._customFolder = join(this._testOutput, this._runnerOptions._customFolder);\n this._videoAndTraceName = undefined;\n\n // Options setting always needs to be last action in constructor in order to apply settings correctly\n this._options = this.defaultOptions();\n }\n\n public async start(): Promise<Page> {\n if (this.isRunning()) {\n console.log('Podman Desktop is already running');\n return this.getPage();\n }\n\n try {\n // start the app with given properties\n this._running = true;\n console.log('Starting Podman Desktop');\n console.log('Electron app launch options: ');\n Object.keys(this._options).forEach(key => {\n console.log(`${key}: ${(this._options as { [k: string]: string })[key]}`);\n });\n this._app = await electron.launch({\n ...this._options,\n });\n // setup state\n this._page = await this.getElectronApp().firstWindow();\n const exe = this.getElectronApp().evaluate(async ({ app }) => {\n return app.getPath('exe');\n });\n const filePath = await exe;\n console.log(`The Executable Electron app. file: ${filePath}`);\n\n // Evaluate that the main window is visible\n // at the same time, the function also makes sure that event 'ready-to-show' was triggered\n // keeping this call meeses up communication between playwright and electron app on linux\n // did not have time to investigate why is this occasionally happening\n // const windowState = await this.getBrowserWindowState();\n } catch (err) {\n console.log(`Caught exception in startup: ${err}`);\n throw Error(`Podman Desktop could not be started correctly with error: ${err}`);\n }\n\n // Direct Electron console to Node terminal.\n this.getPage().on('console', console.log);\n\n // Start playwright tracing\n await this.startTracing();\n\n // also get stderr from the node process\n this._app.process().stderr?.on('data', data => {\n console.log(`STDERR: ${data}`);\n });\n\n return this._page;\n }\n\n public getPage(): Page {\n if (this._page) {\n return this._page;\n }\n\n throw Error('Application was not started yet');\n }\n\n public getElectronApp(): ElectronApplication {\n if (this._app) {\n return this._app;\n }\n\n throw Error('Application was not started yet');\n }\n\n public async getBrowserWindow(): Promise<JSHandle<BrowserWindow>> {\n return await this.getElectronApp().browserWindow(this.getPage());\n }\n\n public async screenshot(filename: string): Promise<void> {\n await this.getPage().screenshot({ path: join(this._testOutput, 'screenshots', filename) });\n }\n\n public async startTracing(): Promise<void> {\n await this.getPage().context().tracing.start({ screenshots: true, snapshots: true, sources: true });\n }\n\n public async stopTracing(): Promise<void> {\n let name = '';\n if (this._videoAndTraceName) name = this._videoAndTraceName;\n\n name = name + '_trace.zip';\n await this.getPage()\n .context()\n .tracing.stop({ path: join(this._testOutput, 'traces', name) });\n }\n\n public async getBrowserWindowState(): Promise<WindowState> {\n return await (await this.getBrowserWindow()).evaluate((mainWindow): Promise<WindowState> => {\n const getState = (): { isVisible: boolean; isDevToolsOpened: boolean; isCrashed: boolean } => {\n return {\n isVisible: mainWindow.isVisible(),\n isDevToolsOpened: mainWindow.webContents.isDevToolsOpened(),\n isCrashed: mainWindow.webContents.isCrashed(),\n };\n };\n\n return new Promise(resolve => {\n /**\n * The main window is created hidden, and is shown only when it is ready.\n * See {@link ../packages/main/src/mainWindow.ts} function\n */\n if (mainWindow.isVisible()) {\n resolve(getState());\n } else\n mainWindow.once('ready-to-show', () => {\n resolve(getState());\n });\n });\n });\n }\n\n async saveVideoAs(path: string): Promise<void> {\n const video = this.getPage().video();\n if (video) {\n await video.saveAs(path);\n await video.delete();\n } else {\n console.log('Video file associated was not found');\n }\n }\n\n public async close(timeout = 30_000): Promise<void> {\n // Stop playwright tracing\n await this.stopTracing();\n\n if (!this.isRunning()) {\n throw Error('Podman Desktop is not running');\n }\n\n if (this.getElectronApp()) {\n const pid = this.getElectronApp()?.process()?.pid;\n console.log(`Closing Podman Desktop with a timeout of ${timeout} ms`);\n try {\n await Promise.race([\n waitWhile(async () => this.isRunning(), { timeout: timeout, diff: 100 }),\n this.getElectronApp().close(),\n ]);\n } catch (err: unknown) {\n console.log(`Caught exception in closing: ${err}`);\n console.log('Trying to kill the electron app process');\n if (pid) {\n console.log(`Killing the electron app process with PID: ${pid}`);\n try {\n process.kill(pid as number);\n } catch (error: unknown) {\n console.log(`Exception thrown when killing the process: ${error}`);\n }\n }\n }\n }\n this._running = false;\n Runner._instance = undefined;\n\n if (this._videoAndTraceName) {\n const videoPath = join(this._testOutput, 'videos', `${this._videoAndTraceName}.webm`);\n const elapsed = await this.trackTime(async () => await this.saveVideoAs(videoPath));\n console.log(`Saving a video file took: ${elapsed} ms`);\n console.log(`Video file saved as: ${videoPath}`);\n }\n await this.removeTracesOnFinished();\n }\n\n async removeTracesOnFinished(): Promise<void> {\n const rawTracesPath = join(this._testOutput, 'traces', 'raw');\n\n if (existsSync(rawTracesPath)) {\n console.log(`Removing raw traces folder: ${rawTracesPath}`);\n rmSync(rawTracesPath, { recursive: true, force: true, maxRetries: 5 });\n }\n\n try {\n const testStatus = test.info().status;\n console.log(`Test finished with status:${testStatus}`);\n if (testStatus !== 'passed' && testStatus !== 'skipped') return;\n } catch (err) {\n console.log(`Caught exception in removing traces: ${err}`);\n return;\n }\n\n if (!process.env.KEEP_TRACES_ON_PASS && !this._saveTracesOnPass) {\n const tracesPath = join(this._testOutput, 'traces', `${this._videoAndTraceName}_trace.zip`);\n if (existsSync(tracesPath)) {\n console.log(`Removing traces folder: ${tracesPath}`);\n rmSync(tracesPath, { recursive: true, force: true, maxRetries: 5 });\n }\n }\n\n if (!process.env.KEEP_VIDEOS_ON_PASS && !this._saveVideosOnPass) {\n const videoPath = join(this._testOutput, 'videos', `${this._videoAndTraceName}.webm`);\n if (existsSync(videoPath)) {\n console.log(`Removing video folder: ${videoPath}`);\n rmSync(videoPath, { recursive: true, force: true, maxRetries: 5 });\n }\n }\n }\n\n protected async trackTime(fn: () => Promise<void>): Promise<number> {\n const start = performance.now();\n return await fn\n .call(() => {\n /* no actual logic */\n })\n .then(() => {\n return performance.now() - start;\n });\n }\n\n private defaultOptions(): object {\n const pdArgs = process.env.PODMAN_DESKTOP_ARGS;\n const pdBinary = process.env.PODMAN_DESKTOP_BINARY;\n if (pdArgs && pdBinary) {\n throw new Error(\n 'PODMAN_DESKTOP_ARGS and PODMAN_DESKTOP_BINARY are both set, cannot run tests in development and production mode at the same time...',\n );\n }\n const directory = join(this._testOutput, 'videos');\n const tracesDir = join(this._testOutput, 'traces', 'raw');\n console.log(`video will be written to: ${directory}`);\n const env = this.setupPodmanDesktopCustomFolder();\n const recordVideo = {\n dir: directory,\n size: {\n width: 1050,\n height: 700,\n },\n };\n const args = pdArgs ? [pdArgs] : ['.'];\n // executablePath defaults to this package's installation location: node_modules/.bin/electron\n const executablePath = pdArgs ? join(pdArgs, 'node_modules', '.bin', 'electron') : (pdBinary ?? undefined);\n const timeout = 45000;\n return {\n args,\n executablePath,\n env,\n recordVideo,\n timeout,\n tracesDir,\n };\n }\n\n private setupPodmanDesktopCustomFolder(): object {\n const env: { [key: string]: string } = process.env as { [key: string]: string };\n const dir = join(this._customFolder);\n console.log(`podman desktop custom config will be written to: ${dir}`);\n env.PODMAN_DESKTOP_HOME_DIR = dir;\n\n // required to get dashboard opened, https://github.com/podman-desktop/podman-desktop/issues/15220\n if (isLinux) {\n env.XDG_SESSION_TYPE = 'x11';\n }\n\n // add a custom config file by disabling OpenDevTools\n const settingsFile = resolve(dir, 'configuration', 'settings.json');\n\n // create parent folder if missing\n const parentDir = dirname(settingsFile);\n if (!existsSync(parentDir)) {\n mkdirSync(parentDir, { recursive: true });\n }\n\n const settingsContent = this._runnerOptions.createSettingsJson();\n\n // write the file\n console.log(`disabling OpenDevTools in configuration file ${settingsFile}`);\n writeFileSync(settingsFile, settingsContent);\n\n return env;\n }\n\n public isRunning(): boolean {\n return this._running;\n }\n\n public setOptions(value: object): void {\n this._options = value;\n }\n\n public setVideoAndTraceName(name: string): void {\n this._videoAndTraceName = name;\n\n if (test.info().retry > 0) {\n this._videoAndTraceName += `_retry-${test.info().retry}`;\n }\n }\n\n public getTestOutput(): string {\n return this._testOutput;\n }\n\n public get options(): object {\n return this._options;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nexport function setupRegistry(): string[] {\n const urlDefault = 'ghcr.io';\n const registryUrl = process.env.REGISTRY_URL ?? urlDefault;\n const ciDefault = process.env.CI ? 'podmandesktop-ci' : '';\n const registryUsername = process.env.REGISTRY_USERNAME ?? ciDefault;\n const tokenDef = process.env.PODMANDESKTOP_CI_BOT_TOKEN ?? '';\n const pwsdDefault = process.env.CI ? tokenDef : '';\n const registryPswdSecret = process.env.REGISTRY_PASSWD ?? pwsdDefault;\n return [registryUrl, registryUsername, registryPswdSecret];\n}\n\nexport function canTestRegistry(): boolean {\n const [registry, username, passwd] = setupRegistry();\n return !!registry && !!username && !!passwd;\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { join } from 'node:path';\n\nimport type { Browser, Locator, Page } from '@playwright/test';\nimport { chromium, expect as playExpect } from '@playwright/test';\n\nimport { waitUntil } from './wait';\n\nexport type ConfirmInputValue = {\n inputLocator: Locator;\n inputValue: string;\n confirmLocator: Locator;\n};\n\nexport async function findPageWithTitleInBrowser(browser: Browser, expectedTitle: string): Promise<Page | undefined> {\n await waitUntil(async () => browser.contexts().length > 0, {\n timeout: 10_000,\n message: 'Waiting for browser contexts to be available',\n sendError: false,\n });\n const pages = browser.contexts().flatMap(context => context.pages());\n const pagesTitles = await Promise.all(pages.map(async page => ({ page, title: await page.title() })));\n\n const chromePage = pagesTitles.find(p => p.title.includes(expectedTitle))?.page;\n if (!chromePage) {\n console.error(`No page found with title: ${expectedTitle}`);\n }\n return chromePage;\n}\n\nexport async function performBrowserLogin(\n page: Page,\n title: string | RegExp,\n usernameAction: ConfirmInputValue,\n passwordAction: ConfirmInputValue,\n postLoginAction: (myPage: Page) => Promise<void>,\n options: {\n screenshotsPath: string | undefined;\n } = { screenshotsPath: '' },\n): Promise<void> {\n console.log('Performing browser login...');\n const path = options.screenshotsPath;\n if (path) {\n await page.screenshot({ path: join(path, 'screenshots', 'initial_page.png'), type: 'png', fullPage: true });\n }\n // title\n await playExpect(page).toHaveTitle(title);\n // username\n await playExpect(usernameAction.inputLocator).toBeVisible();\n await usernameAction.inputLocator.fill(usernameAction.inputValue);\n await playExpect(usernameAction.confirmLocator).toBeEnabled();\n await usernameAction.confirmLocator.click();\n if (path) {\n await page.screenshot({ path: join(path, 'screenshots', 'after_username_page.png'), type: 'png', fullPage: true });\n }\n // password\n await playExpect(passwordAction.inputLocator).toBeVisible();\n await passwordAction.inputLocator.fill(passwordAction.inputValue);\n await playExpect(passwordAction.confirmLocator).toBeEnabled();\n await passwordAction.confirmLocator.click();\n if (path) {\n await page.screenshot({ path: join(path, 'screenshots', 'after_password_page.png'), type: 'png', fullPage: true });\n }\n // custom doing...\n await postLoginAction(page);\n}\n\nexport async function startChromium(port: string, tracesPath: string, args: string[] = []): Promise<Browser> {\n console.log('Starting a web server on port 9222');\n const browserLaunch = await chromium.launch({\n headless: false,\n args: [`--remote-debugging-port=${port}`, ...args],\n tracesDir: tracesPath,\n slowMo: 200,\n });\n\n // hard wait\n await waitUntil(async () => browserLaunch?.isConnected(), {\n timeout: 10_000,\n message: 'Waiting for browser to be connected',\n sendError: false,\n });\n // Connect to the same Chrome instance via CDP\n // possible option is to use chromium.connectOverCDP(`http://localhost:${port}`);\n if (!browserLaunch) {\n throw new Error('Browser object was not initialized properly');\n }\n console.log(`Browser is launched. Executable path: ${browserLaunch.browserType().executablePath()}`);\n return browserLaunch;\n}\n\n// to be deprecated, use getEntryFromConsoleLogs instead\nexport async function getEntryFromLogs(\n page: Page,\n filter: RegExp,\n regex: RegExp,\n lineContains = '',\n): Promise<string | undefined> {\n return await getEntryFromConsoleLogs(page, filter, regex, lineContains, 10_000);\n}\n\n// get a page's console log entry filtered by a regexp filter argument and matched by a regex\nexport async function getEntryFromConsoleLogs(\n page: Page,\n filter: RegExp,\n regex: RegExp,\n checkString: string,\n timeout = 10_000,\n): Promise<string | undefined> {\n const consoleLogPromise = page.waitForEvent('console', {\n predicate: msg => {\n return msg.type() === 'log' && filter.test(msg.text());\n },\n timeout: timeout,\n });\n const consoleMsg = await consoleLogPromise;\n const logLine = consoleMsg.text();\n if (checkString) {\n playExpect(logLine).toContain(checkString);\n }\n const parsedString = regex.exec(logLine);\n const urlMatch = parsedString ? parsedString[1] : undefined;\n console.log(`Matched string: ${urlMatch}`);\n return urlMatch;\n}\n\n// Accept/Refuse the cooking in the iframe element\nexport async function handleCookies(\n page: Page,\n iframTitle: string,\n buttonName: string,\n timeout: number,\n): Promise<void> {\n const iframe = page.frameLocator(`iframe[title=\"${iframTitle}\"]`);\n const button = iframe.getByRole('button', { name: buttonName });\n const buttonVisible = await checkLocatorExistence(button, timeout);\n if (buttonVisible) {\n await playExpect(button).toBeVisible();\n await button.click();\n console.log(`Clicked on the button: ${buttonName}`);\n } else {\n console.log(`${buttonName} button is not visible, skipping confirmation...`);\n }\n}\n\n// function is dedicated to verify if some locator exists, depending on external circumstances\nexport async function checkLocatorExistence(locator: Locator, timeout = 5000): Promise<boolean> {\n try {\n await playExpect(locator).toBeVisible({ timeout: timeout });\n } catch (error: unknown) {\n console.log(`Locator not found: ${error}`);\n return false;\n }\n return true;\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport abstract class CreateClusterBasePage extends BasePage {\n readonly header: Locator;\n readonly content: Locator;\n readonly clusterPropertiesInformation: Locator;\n readonly clusterCreationButton: Locator;\n readonly goBackButton: Locator;\n readonly logsButton: Locator;\n readonly errorMessage: Locator;\n\n constructor(page: Page) {\n super(page);\n this.header = this.page.getByRole('region', { name: 'Header' });\n this.content = this.page.getByRole('region', { name: 'Tab Content' });\n this.clusterPropertiesInformation = this.content.getByRole('form', {\n name: 'Properties Information',\n });\n this.clusterCreationButton = this.clusterPropertiesInformation.getByRole('button', { name: 'Create', exact: true });\n this.logsButton = this.content.getByRole('button', { name: 'Show Logs' });\n this.goBackButton = this.page.getByRole('button', {\n name: 'Go back to resources',\n });\n this.errorMessage = this.content.getByRole('alert', {\n name: 'Error Message Content',\n });\n }\n\n async createCluster(timeout: number = 300_000): Promise<void> {\n return test.step('Create cluster', async () => {\n try {\n await playExpect(this.clusterCreationButton).toBeEnabled();\n await this.clusterCreationButton.click();\n await this.logsButton.scrollIntoViewIfNeeded();\n await this.logsButton.click();\n await playExpect(this.goBackButton).toBeVisible({ timeout: timeout });\n await this.goBackButton.click();\n } catch (error) {\n let errorText = '';\n if (await this.errorMessage.count()) errorText = (await this.errorMessage.textContent()) ?? '';\n\n if (error instanceof Error) {\n throw new Error(`Failed to create cluster: ${error.message} with dialog error: ${errorText}`);\n }\n\n throw new Error(`Failed to create cluster: ${error} with dialog error: ${errorText}`);\n }\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport type { KindClusterOptions } from '/@/model/core/types';\nimport { fillTextbox } from '/@/utility/operations';\n\nimport { CreateClusterBasePage } from './cluster-creation-base-page';\n\nexport class CreateKindClusterPage extends CreateClusterBasePage {\n readonly clusterNameField: Locator;\n readonly controllerCheckbox: Locator;\n readonly providerType: Locator;\n readonly httpPort: Locator;\n readonly httpsPort: Locator;\n readonly containerImage: Locator;\n readonly configFileInput: Locator;\n readonly warning: Locator;\n\n constructor(page: Page) {\n super(page);\n this.clusterNameField = this.clusterPropertiesInformation.getByRole('textbox', { name: 'Name', exact: true });\n // Locator for the parent element of the ingress controller checkbox, used to change its value\n this.controllerCheckbox = this.clusterPropertiesInformation\n .getByRole('checkbox', {\n name: 'Setup an ingress controller',\n })\n .locator('..');\n this.providerType = this.clusterPropertiesInformation.getByLabel('Provider Type');\n this.httpPort = this.clusterPropertiesInformation.getByLabel('HTTP Port');\n this.httpsPort = this.clusterPropertiesInformation.getByLabel('HTTPS Port');\n this.containerImage = this.clusterPropertiesInformation.getByPlaceholder('Leave empty for using latest.');\n this.configFileInput = this.clusterPropertiesInformation.getByRole('textbox', {\n name: 'Custom path to Kind config file (Default is blank)',\n exact: true,\n });\n this.warning = this.page.getByRole('alert', { name: 'warning' });\n }\n\n private async validateKindClusterDefaultSettings(): Promise<void> {\n return test.step('Validate kind cluster default settings', async () => {\n await playExpect(this.configFileInput).toBeEmpty();\n await playExpect(this.clusterNameField).toHaveValue('kind-cluster');\n await playExpect(this.providerType).toHaveText('podman');\n await playExpect(this.httpPort).toHaveValue('9090');\n await playExpect(this.httpsPort).toHaveValue('9443');\n await playExpect(this.controllerCheckbox).toBeChecked();\n await playExpect(this.containerImage).toBeEmpty();\n });\n }\n\n public async createKindCluster(\n clusterName = 'kind-cluster',\n { configFilePath, providerType, httpPort, httpsPort, useIngressController, containerImage }: KindClusterOptions = {\n useIngressController: true,\n },\n timeout?: number,\n ): Promise<void> {\n return test.step('Create kind cluster', async () => {\n await this.validateKindClusterDefaultSettings();\n\n // Use the default cluster name if a custom config file is used; the default cluster name should be ignored in this case.\n if (configFilePath) {\n await this.configFileInput.evaluate(node => node.removeAttribute('readonly'));\n await this.configFileInput.fill(configFilePath);\n await playExpect(this.warning).toBeVisible();\n await playExpect(this.warning).toContainText(\n 'By specifying a config file, all other options will be ignored except for ingress controller deployment.',\n );\n } else {\n await fillTextbox(this.clusterNameField, clusterName);\n }\n\n if (providerType && providerType !== 'podman') {\n await this.providerType.click();\n const providerTypeButton = this.clusterPropertiesInformation.getByRole('button', {\n name: providerType,\n exact: true,\n });\n await playExpect(providerTypeButton).toBeEnabled();\n await providerTypeButton.click();\n await playExpect(this.providerType).toHaveText(providerType);\n }\n\n if (httpPort) {\n await fillTextbox(this.httpPort, httpPort);\n await playExpect(this.httpPort).toHaveText(httpPort);\n }\n if (httpsPort) {\n await fillTextbox(this.httpsPort, httpsPort);\n await playExpect(this.httpsPort).toHaveText(httpsPort);\n }\n\n await playExpect(this.controllerCheckbox).toBeEnabled();\n if (!useIngressController) {\n await this.controllerCheckbox.uncheck();\n await playExpect(this.controllerCheckbox).not.toBeChecked();\n } else {\n await this.controllerCheckbox.check();\n await playExpect(this.controllerCheckbox).toBeChecked();\n }\n\n if (containerImage) {\n await fillTextbox(this.containerImage, containerImage);\n await playExpect(this.containerImage).toHaveText(containerImage);\n }\n await this.createCluster(timeout);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport test, { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport type { ResourceElementActions } from '/@/model/core/operations';\nimport { DetailsPage } from '/@/model/pages/details-page';\n\nexport class ResourceDetailsPage extends DetailsPage {\n readonly resourceStatus: Locator;\n\n constructor(page: Page, title: string) {\n super(page, title);\n this.resourceStatus = this.header.getByLabel('Connection Status Label');\n }\n\n public async performConnectionActionDetails(operation: ResourceElementActions, timeout = 25_000): Promise<void> {\n return test.step(`Perform connection action '${operation}' on resource element '${this.resourceName}' from details page`, async () => {\n const button = this.controlActions.getByRole('button', {\n name: operation,\n exact: true,\n });\n await playExpect(button).toBeEnabled({ timeout: timeout });\n await button.click();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { BasePage } from './base-page';\n\nexport class TasksPage extends BasePage {\n readonly tasksManagerWindow: Locator;\n readonly header: Locator;\n readonly heading: Locator;\n readonly clearAllButton: Locator;\n readonly closeButton: Locator;\n readonly tasksSearchBar: Locator;\n readonly tasksSearchInput: Locator;\n readonly tasksSearchClearButton: Locator;\n readonly allTasksButton: Locator;\n readonly inProgressTasksButton: Locator;\n readonly successTasksButton: Locator;\n readonly failureTasksButton: Locator;\n readonly cancelledTasksButton: Locator;\n readonly content: Locator;\n readonly noTasksPlaceholder: Locator;\n readonly taskListHeader: Locator;\n readonly selectAllTasksCheckbox: Locator;\n readonly sortByName: Locator;\n readonly sortByProgress: Locator;\n readonly sortByAge: Locator;\n readonly taskList: Locator;\n\n constructor(page: Page) {\n super(page);\n this.tasksManagerWindow = page.getByRole('region', { name: 'Tasks' });\n this.header = this.tasksManagerWindow.getByRole('region', { name: 'header' });\n this.heading = this.header.getByText('Tasks');\n this.clearAllButton = this.header.getByRole('button', { name: 'Clear all' });\n this.closeButton = this.header.getByRole('button', { name: 'Close' });\n this.tasksSearchBar = this.tasksManagerWindow.getByRole('region', { name: 'search' });\n this.tasksSearchInput = this.tasksSearchBar.getByLabel('search Tasks');\n this.tasksSearchClearButton = this.tasksSearchBar.getByRole('button', { name: 'clear' });\n this.allTasksButton = this.tasksManagerWindow.getByRole('button', { name: 'All' });\n this.inProgressTasksButton = this.tasksManagerWindow.getByRole('button', { name: 'In-Progress' });\n this.successTasksButton = this.tasksManagerWindow.getByRole('button', { name: 'Success' });\n this.failureTasksButton = this.tasksManagerWindow.getByRole('button', { name: 'Failure' });\n this.cancelledTasksButton = this.tasksManagerWindow.getByRole('button', { name: 'Cancelled' });\n this.content = this.tasksManagerWindow.getByRole('region', { name: 'content' });\n this.noTasksPlaceholder = this.content.getByRole('table', { name: 'No active tasks' });\n this.taskListHeader = this.content.getByRole('rowgroup').nth(0);\n this.selectAllTasksCheckbox = this.taskListHeader.getByRole('checkbox', { name: 'Toggle all' });\n this.sortByName = this.taskListHeader.getByRole('columnheader', { name: 'Name' });\n this.sortByProgress = this.taskListHeader.getByRole('columnheader', { name: 'Progress' });\n this.sortByAge = this.taskListHeader.getByRole('columnheader', { name: 'Age' });\n this.taskList = this.content.getByRole('rowgroup').nth(1);\n }\n\n async showAllTasks(): Promise<void> {\n await playExpect(this.tasksManagerWindow).toBeVisible();\n await playExpect(this.allTasksButton).toBeVisible();\n await this.allTasksButton.click();\n await playExpect(this.taskList).toBeVisible();\n }\n\n async cancelLatestTask(): Promise<void> {\n const cancelButton = this.taskList.getByRole('button', { name: 'Cancel task' }).first();\n await playExpect(cancelButton).toBeEnabled();\n await cancelButton.click();\n await handleConfirmationDialog(this.page);\n await handleConfirmationDialog(this.page, 'Long task example', true, 'OK');\n }\n\n async getStatusForLatestTask(): Promise<string> {\n return (await this.taskList.getByRole('status').first().textContent()) ?? '';\n }\n\n async clearAllTasks(): Promise<void> {\n await playExpect(this.clearAllButton).toBeEnabled({ timeout: 10_000 });\n await this.clearAllButton.click();\n }\n\n async awaitTaskCompletion(taskName: string, status: string = 'completed', timeout: number = 60_000): Promise<void> {\n const taskRow = this.getTaskRowByName(taskName);\n const taskStatus = taskRow.getByRole('status');\n\n await playExpect(taskRow).toBeVisible();\n await playExpect(taskStatus).toBeVisible();\n await playExpect(taskStatus).toContainText(status, { timeout: timeout });\n }\n\n async navigateToTask(taskName: string): Promise<void> {\n const taskRow = this.getTaskRowByName(taskName);\n const taskLink = taskRow.getByRole('button', { name: 'View action' });\n\n await playExpect(taskRow).toBeVisible();\n await playExpect(taskLink).toBeVisible();\n await taskLink.click();\n }\n\n async removeTaskFromList(taskName: string): Promise<void> {\n const taskRow = this.getTaskRowByName(taskName);\n const deleteTaskButton = taskRow.getByRole('button', { name: 'Archive/delete completed task' });\n\n await playExpect(taskRow).toBeVisible();\n await playExpect(deleteTaskButton).toBeVisible();\n await deleteTaskButton.click();\n await playExpect(taskRow).not.toBeVisible();\n }\n\n private getTaskRowByName(taskName: string): Locator {\n return this.taskList.getByRole('row', { name: taskName });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { expect as playExpect, type Locator, type Page } from '@playwright/test';\n\nimport { BasePage } from '/@/model/pages/base-page';\nimport { TasksPage } from '/@/model/pages/tasks-page';\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nexport class StatusBar extends BasePage {\n readonly content: Locator;\n readonly kindInstallationButton: Locator;\n readonly kubernetesContext: Locator;\n readonly versionButton: Locator;\n readonly updateButtonTitle: Locator;\n readonly shareYourFeedbackButton: Locator;\n readonly troubleshootingButton: Locator;\n readonly tasksButton: Locator;\n readonly helpButton: Locator;\n readonly pinProvidersButton: Locator;\n readonly pinMenu: Locator;\n\n constructor(page: Page) {\n super(page);\n this.content = page.getByRole('contentinfo', { name: 'Status Bar' });\n this.kindInstallationButton = this.content.getByTitle(\n 'Kind not found on your system, click to download and install it',\n );\n this.kubernetesContext = this.content.getByTitle('Current Kubernetes Context');\n this.versionButton = this.content.getByRole('button', { name: /^v\\d+\\.\\d+\\.\\d+(-\\w+)?$/ });\n this.updateButtonTitle = this.content.getByRole('button').and(this.content.getByTitle('Update available'));\n this.shareYourFeedbackButton = this.content.getByRole('button').and(this.content.getByTitle('Share your feedback'));\n this.troubleshootingButton = this.content.getByRole('button').and(this.content.getByTitle('Troubleshooting'));\n this.tasksButton = this.content.getByRole('button').and(this.content.getByTitle('Tasks'));\n this.helpButton = this.content.getByRole('button').and(this.content.getByTitle('Help'));\n this.pinProvidersButton = this.content.getByRole('button', { name: 'Pin' });\n this.pinMenu = this.page.getByTitle('Pin Menu');\n }\n\n public async installKindCLI(): Promise<void> {\n await playExpect(this.kindInstallationButton).toBeVisible();\n await this.kindInstallationButton.click();\n await handleConfirmationDialog(this.page, 'Kind');\n await handleConfirmationDialog(this.page, 'Kind');\n await handleConfirmationDialog(this.page, 'Kind', true, 'OK');\n }\n\n public async validateKubernetesContext(context: string): Promise<void> {\n await playExpect(this.kubernetesContext).toBeVisible();\n await playExpect(this.kubernetesContext).toHaveText(context);\n }\n\n public async kindInstallationButtonIsVisible(): Promise<boolean> {\n return (await this.kindInstallationButton.count()) > 0;\n }\n\n public async openTasksPage(): Promise<TasksPage> {\n await playExpect(this.tasksButton).toBeVisible();\n await this.tasksButton.click();\n return new TasksPage(this.page);\n }\n\n public async getProviderButton(providerName: string): Promise<Locator> {\n await playExpect(this.pinProvidersButton, 'status bar providers must be turned on').toBeVisible();\n return this.content.getByRole('button', { name: providerName, exact: true });\n }\n\n public async pinProvider(providerName: string, pin: boolean): Promise<void> {\n const barProviderButton = await this.getProviderButton(providerName);\n if ((await barProviderButton.isVisible()) === pin) {\n return;\n }\n\n const pinMenuProviderButton = this.pinMenu.getByRole('button', { name: providerName });\n await playExpect(this.pinMenu).not.toBeVisible({ timeout: 5000 });\n\n await playExpect(this.pinProvidersButton).toBeVisible();\n await this.pinProvidersButton.click();\n await playExpect(this.pinMenu).toBeVisible({ timeout: 5000 });\n await playExpect(pinMenuProviderButton).toBeVisible();\n\n await pinMenuProviderButton.click();\n await playExpect.poll(async () => await barProviderButton.isVisible()).toEqual(pin);\n\n //close the menu\n await this.pinProvidersButton.click();\n await playExpect(this.pinMenu).not.toBeVisible({ timeout: 5000 });\n }\n\n public async isProviderResourceRunning(providerName: string, resourceName: string): Promise<boolean> {\n const barProviderButton = await this.getProviderButton(providerName);\n await playExpect(barProviderButton).toBeVisible();\n const providerArea = barProviderButton.locator('..').locator('..');\n const providerTooltip = providerArea.getByLabel('tooltip');\n\n await barProviderButton.hover();\n await playExpect(providerTooltip).toBeVisible();\n return (await providerTooltip.innerText()).includes('Running\\n: ' + resourceName);\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023-2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { ResourceElementActions } from '/@/model/core/operations';\nimport { ContainerState, ResourceElementState } from '/@/model/core/states';\nimport type { KindClusterOptions } from '/@/model/core/types';\nimport { CreateKindClusterPage } from '/@/model/pages/create-kind-cluster-page';\nimport { ResourceConnectionCardPage } from '/@/model/pages/resource-connection-card-page';\nimport { ResourceDetailsPage } from '/@/model/pages/resource-details-page';\nimport { ResourcesPage } from '/@/model/pages/resources-page';\nimport { VolumesPage } from '/@/model/pages/volumes-page';\nimport { NavigationBar } from '/@/model/workbench/navigation';\nimport { StatusBar } from '/@/model/workbench/status-bar';\nimport { getVolumeNameForContainer } from '/@/utility/operations';\n\nexport async function createKindCluster(\n page: Page,\n clusterName: string,\n timeout = 300_000,\n { configFilePath, providerType, httpPort, httpsPort, useIngressController, containerImage }: KindClusterOptions = {},\n): Promise<void> {\n return test.step(`Create Kind cluster with settings: configFilePath=${configFilePath}, \n providerType=${providerType}, httpPort=${httpPort},\n httpsPort=${httpsPort}, ingressController=${useIngressController}`, async () => {\n const navigationBar = new NavigationBar(page);\n const statusBar = new StatusBar(page);\n const kindResourceCard = new ResourceConnectionCardPage(page, 'kind', clusterName);\n const createKindClusterPage = new CreateKindClusterPage(page);\n\n const settingsPage = await navigationBar.openSettings();\n const resourcesPage = await settingsPage.openTabPage(ResourcesPage);\n await playExpect(resourcesPage.heading).toBeVisible({ timeout: 10_000 });\n await playExpect.poll(async () => resourcesPage.resourceCardIsVisible('kind')).toBeTruthy();\n await playExpect(kindResourceCard.createButton).toBeVisible();\n\n if (await kindResourceCard.doesResourceElementExist()) {\n if ((await kindResourceCard.resourceElementConnectionStatus.textContent()) !== ResourceElementState.Running) {\n console.log(`Kind cluster [${clusterName}] already present, but not running. Delete the cluster...`);\n await deleteCluster(page);\n } else {\n console.log(`Kind cluster [${clusterName}] already present, skipping creation.`);\n return;\n }\n }\n\n await kindResourceCard.createButton.click();\n await createKindClusterPage.createKindCluster(\n clusterName,\n {\n configFilePath: configFilePath,\n providerType: providerType,\n httpPort: httpPort,\n httpsPort: httpsPort,\n useIngressController: useIngressController,\n containerImage: containerImage,\n },\n timeout,\n );\n await playExpect(kindResourceCard.resourceElement).toBeVisible();\n await playExpect(kindResourceCard.resourceElementConnectionStatus).toHaveText(ResourceElementState.Running, {\n timeout: 15_000,\n });\n await statusBar.validateKubernetesContext(`kind-${clusterName}`);\n });\n}\n\nexport async function deleteCluster(\n page: Page,\n resourceName = 'kind',\n containerName = 'kind-cluster-control-plane',\n clusterName = 'kind-cluster',\n timeout = 50_000,\n): Promise<void> {\n return test.step(`Delete ${resourceName} cluster`, async () => {\n const volumeName = await getVolumeNameForContainer(page, containerName);\n const navigationBar = new NavigationBar(page);\n const resourceCard = new ResourceConnectionCardPage(page, resourceName, clusterName);\n\n await navigationBar.openSettings();\n const resourcesPage = new ResourcesPage(page);\n await playExpect(resourcesPage.heading).toBeVisible({ timeout: 10_000 });\n if (!(await resourceCard.doesResourceElementExist())) {\n console.log(`Kind cluster [${clusterName}] not present, skipping deletion.`);\n return;\n }\n\n await resourceCard.performConnectionAction(ResourceElementActions.Stop);\n await playExpect(resourceCard.resourceElementConnectionStatus).toHaveText(ResourceElementState.Off, {\n timeout: timeout,\n });\n await resourceCard.performConnectionAction(ResourceElementActions.Delete);\n await playExpect(resourceCard.markdownContent).toBeVisible({\n timeout: timeout,\n });\n await validateClusterResourcesDeletion(page, clusterName, containerName, volumeName);\n });\n}\n\nexport async function checkClusterResources(page: Page, containerName: string): Promise<void> {\n return test.step(`Check container '${containerName}' and volume cluster resources.`, async () => {\n const navigationBar = new NavigationBar(page);\n const containersPage = await navigationBar.openContainers();\n await playExpect.poll(async () => containersPage.containerExists(containerName)).toBeTruthy();\n const containerDetailsPage = await containersPage.openContainersDetails(containerName);\n await playExpect.poll(async () => await containerDetailsPage.getState()).toEqual(ContainerState.Running);\n\n const volumesPage = new VolumesPage(page);\n const volumeName = await getVolumeNameForContainer(page, containerName);\n if (!volumeName) {\n throw new Error(`Volume name for container \"${containerName}\" is not defined.`);\n }\n const volumeDetailsPage = await volumesPage.openVolumeDetails(volumeName);\n await playExpect.poll(async () => await volumeDetailsPage.isUsed()).toBeTruthy();\n });\n}\n\nexport async function resourceConnectionAction(\n page: Page,\n resourceCard: ResourceConnectionCardPage,\n resourceConnectionAction: ResourceElementActions,\n expectedResourceState: ResourceElementState,\n timeout = 30_000,\n): Promise<void> {\n return test.step(`Performs \"${resourceConnectionAction}\" action, expects \"${expectedResourceState}\" state.`, async () => {\n const navigationBar = new NavigationBar(page);\n await navigationBar.openSettings();\n await resourceCard.performConnectionAction(resourceConnectionAction);\n if (resourceConnectionAction === ResourceElementActions.Restart) {\n const stopButton = resourceCard.resourceElementConnectionActions.getByRole('button', {\n name: ResourceElementActions.Stop,\n exact: true,\n });\n await playExpect(stopButton).toBeEnabled({ timeout: timeout });\n }\n await playExpect(resourceCard.resourceElementConnectionStatus).toHaveText(expectedResourceState, {\n timeout: timeout,\n });\n });\n}\n\nexport async function resourceConnectionActionDetails(\n page: Page,\n resourceCard: ResourceConnectionCardPage,\n resourceName: string,\n resourceConnectionAction: ResourceElementActions,\n expectedResourceState: ResourceElementState,\n timeout = 30_000,\n): Promise<void> {\n return test.step(`Performs a connection action '${resourceConnectionAction}' on the resource from the details page, verifies the expected resource state '${expectedResourceState}'`, async () => {\n const navigationBar = new NavigationBar(page);\n const resourceDetailsPage = new ResourceDetailsPage(page, resourceName);\n\n try {\n await playExpect(resourceDetailsPage.heading).toBeVisible();\n } catch {\n const settingsBar = await navigationBar.openSettings();\n const resourcesPage = await settingsBar.openTabPage(ResourcesPage);\n await playExpect(resourcesPage.heading).toBeVisible({ timeout: 10_000 });\n await playExpect(resourceCard.resourceElementDetailsButton).toBeEnabled();\n await resourceCard.resourceElementDetailsButton.click();\n }\n\n await resourceDetailsPage.performConnectionActionDetails(resourceConnectionAction);\n if (resourceConnectionAction === ResourceElementActions.Restart) {\n const stopButton = resourceDetailsPage.controlActions.getByRole('button', {\n name: ResourceElementActions.Stop,\n exact: true,\n });\n await playExpect(stopButton).toBeEnabled({ timeout: timeout });\n }\n await playExpect(resourceDetailsPage.resourceStatus).toHaveText(expectedResourceState, {\n timeout: timeout,\n });\n });\n}\n\nexport async function deleteClusterFromDetails(\n page: Page,\n resourceName = 'kind',\n containerName = 'kind-cluster-control-plane',\n clusterName = 'kind-cluster',\n timeout = 30_000,\n): Promise<void> {\n return test.step(`Deletes the '${clusterName}' cluster from the details page`, async () => {\n const navigationBar = new NavigationBar(page);\n const volumeName = await getVolumeNameForContainer(page, containerName);\n\n const settingsBar = await navigationBar.openSettings();\n const resourcesPage = await settingsBar.openTabPage(ResourcesPage);\n const resourceCard = new ResourceConnectionCardPage(page, resourceName, clusterName);\n await playExpect(resourcesPage.heading).toBeVisible({ timeout: 10_000 });\n if (!(await resourceCard.doesResourceElementExist())) {\n console.log(`Cluster [${clusterName}] not present, skipping deletion.`);\n return;\n }\n await playExpect(resourceCard.resourceElementDetailsButton).toBeEnabled();\n await resourceCard.resourceElementDetailsButton.click();\n\n const resourceDetails = new ResourceDetailsPage(page, clusterName);\n await playExpect(resourceDetails.heading).toBeVisible();\n await resourceDetails.performConnectionActionDetails(ResourceElementActions.Stop);\n await playExpect(resourceDetails.resourceStatus).toHaveText(ResourceElementState.Off, {\n timeout: timeout,\n });\n await resourceDetails.performConnectionActionDetails(ResourceElementActions.Delete);\n\n await validateClusterResourcesDeletion(page, clusterName, containerName, volumeName);\n });\n}\n\nexport async function validateClusterResourcesDeletion(\n page: Page,\n clusterName: string,\n containerName: string,\n volumeName: string,\n timeout = 20_000,\n): Promise<void> {\n return test.step(`Validates that resources associated with the deleted '${clusterName}' cluster are removed`, async () => {\n const navigationBar = new NavigationBar(page);\n const containersPage = await navigationBar.openContainers();\n\n await playExpect(containersPage.heading).toBeVisible();\n await playExpect\n .poll(async () => containersPage.containerExists(containerName), {\n timeout: timeout,\n })\n .toBeFalsy();\n\n const volumePage = await navigationBar.openVolumes();\n await playExpect(volumePage.heading).toBeVisible();\n await playExpect\n .poll(async () => await volumePage.waitForVolumeDelete(volumeName), {\n timeout: timeout,\n })\n .toBeTruthy();\n });\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { waitWhile } from '/@/utility/wait';\n\nimport { BasePage } from './base-page';\nimport { DashboardPage } from './dashboard-page';\n\nexport class WelcomePage extends BasePage {\n readonly welcomeMessage: Locator;\n readonly telemetryConsent: Locator;\n readonly skipOnBoarding: Locator;\n readonly checkLoader: Locator;\n readonly startOnboarding: Locator;\n readonly onboardingMessageStatus: Locator;\n readonly nextStepButton: Locator;\n readonly cancelSetupButton: Locator;\n readonly otherVersionButton: Locator;\n readonly dropDownDialog: Locator;\n readonly latestVersionFromDropDown: Locator;\n readonly confirmationPopUp: Locator;\n readonly okButtonPopup: Locator;\n readonly markdownContentLocator: Locator;\n\n constructor(page: Page) {\n super(page);\n this.welcomeMessage = page.getByText('Welcome to Podman Desktop');\n this.telemetryConsent = page.getByLabel('Enable telemetry');\n this.skipOnBoarding = page.getByRole('button', {\n name: 'Skip',\n exact: true,\n });\n this.checkLoader = this.page.getByRole('heading', {\n name: 'Initializing...',\n });\n this.startOnboarding = page.getByRole('button', {\n name: 'Start onboarding',\n exact: true,\n });\n this.onboardingMessageStatus = this.page.getByLabel('Onboarding Status Message');\n this.nextStepButton = this.page.getByRole('button', { name: 'Next Step' });\n this.cancelSetupButton = this.page.getByRole('button', { name: 'Cancel Setup' });\n this.markdownContentLocator = this.page.getByLabel('markdown-content');\n this.otherVersionButton = this.markdownContentLocator.getByText('Want to download a different version?');\n this.dropDownDialog = this.page.getByLabel('drop-down-dialog');\n this.latestVersionFromDropDown = this.dropDownDialog.getByRole('button').first();\n this.confirmationPopUp = page.getByRole('dialog', { name: 'Skip Setup Popup' });\n this.okButtonPopup = this.confirmationPopUp.getByRole('button', { name: 'OK' });\n }\n\n async turnOffTelemetry(): Promise<void> {\n return test.step('Turn off Telemetry', async () => {\n // Extensions load sequentially (faster speed but can block ui)\n await playExpect(this.startOnboarding).toBeEnabled({ timeout: 45_000 });\n\n if (await this.telemetryConsent.isChecked()) {\n await playExpect(this.telemetryConsent).toBeChecked();\n await this.telemetryConsent.uncheck({ force: true });\n }\n\n await playExpect(this.telemetryConsent).not.toBeChecked();\n });\n }\n\n async closeWelcomePage(): Promise<DashboardPage> {\n return test.step('Close Welcome Page', async () => {\n await playExpect(this.skipOnBoarding).toBeEnabled();\n await this.skipOnBoarding.click({ force: true });\n try {\n await waitWhile(async () => await this.skipOnBoarding.isVisible(), { timeout: 5_000, diff: 250 });\n } catch (err) {\n console.log('Skip Onboarding button is still visible, retrying to press the button');\n await this.skipOnBoarding.click({ force: true });\n }\n return new DashboardPage(this.page);\n });\n }\n\n /**\n * Waits for application to initialize, turn off telemetry and closes welcome page\n */\n async handleWelcomePage(skipIfNotPresent: boolean): Promise<void> {\n return test.step('Handle Welcome Page', async () => {\n if (skipIfNotPresent) {\n try {\n await this.skipOnBoarding.waitFor({ state: 'visible' });\n } catch (err) {\n if ((err as Error).name !== 'TimeoutError') {\n throw err;\n }\n return;\n }\n }\n\n await this.turnOffTelemetry();\n await this.closeWelcomePage();\n await playExpect(this.welcomeMessage).toHaveCount(0);\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Page } from '@playwright/test';\nimport { test as base } from '@playwright/test';\n\nimport { WelcomePage } from '/@/model/pages/welcome-page';\nimport { NavigationBar } from '/@/model/workbench/navigation';\nimport { StatusBar } from '/@/model/workbench/status-bar';\nimport { Runner } from '/@/runner/podman-desktop-runner';\nimport { RunnerOptions } from '/@/runner/runner-options';\n\nexport type TestFixtures = {\n runner: Runner;\n navigationBar: NavigationBar;\n welcomePage: WelcomePage;\n page: Page;\n statusBar: StatusBar;\n};\n\nexport type FixtureOptions = {\n runnerOptions: RunnerOptions;\n};\n\nexport const test = base.extend<TestFixtures & FixtureOptions>({\n runnerOptions: [new RunnerOptions(), { option: true }],\n runner: async ({ runnerOptions }, use) => {\n const runner = await Runner.getInstance({ runnerOptions });\n await use(runner);\n },\n page: async ({ runner }, use) => {\n await use(runner.getPage());\n },\n navigationBar: async ({ page }, use) => {\n const navigationBar = new NavigationBar(page);\n await use(navigationBar);\n },\n welcomePage: async ({ page }, use) => {\n const welcomePage = new WelcomePage(page);\n await use(welcomePage);\n },\n statusBar: async ({ page }, use) => {\n const statusBar = new StatusBar(page);\n await use(statusBar);\n },\n});\nexport { expect } from '@playwright/test';\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { execSync } from 'node:child_process';\n\nimport type { Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport type { KubernetesResourceState } from '/@/model/core/states';\nimport { KubernetesResources } from '/@/model/core/types';\nimport { ContainerDetailsPage } from '/@/model/pages/container-details-page';\nimport { NavigationBar } from '/@/model/workbench/navigation';\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nexport async function deployContainerToCluster(\n page: Page,\n containerName: string,\n kubernetesContext: string,\n deployedPodName: string,\n): Promise<void> {\n return test.step(`Deploy '${containerName}' and verify pod '${deployedPodName}' appears in the Kubernetes environment`, async () => {\n const containerDetailsPage = new ContainerDetailsPage(page, containerName);\n const navigationBar = new NavigationBar(page);\n\n await playExpect(containerDetailsPage.heading).toBeVisible();\n const deployToKubernetesPage = await containerDetailsPage.openDeployToKubernetesPage();\n await deployToKubernetesPage.deployPod(containerName, { useKubernetesServices: true }, kubernetesContext);\n\n const kubernetesBar = await navigationBar.openKubernetes();\n const kubernetesPodsPage = await kubernetesBar.openTabPage(KubernetesResources.Pods);\n await playExpect\n .poll(async () => kubernetesPodsPage.getRowByName(deployedPodName), { timeout: 15_000 })\n .toBeTruthy();\n });\n}\n\nexport async function createKubernetesResource(\n page: Page,\n resourceType: KubernetesResources,\n resourceName: string,\n resourceYamlPath: string,\n): Promise<void> {\n return test.step(`Create ${resourceType} kubernetes resource: ${resourceName}`, async () => {\n const navigationBar = new NavigationBar(page);\n\n // workaround for missing option to deploy kube yaml into cluster via UI\n // test kubectl is present\n try {\n // eslint-disable-next-line sonarjs/no-os-command-from-path\n const version = execSync('kubectl version').toString();\n console.log(`Kubectl version stdout: ${version}`);\n } catch (error) {\n throw new Error(`Kubectl is not installed: ${error}`);\n }\n try {\n // eslint-disable-next-line sonarjs/os-command\n const kubectlApply = execSync(`kubectl apply -f ${resourceYamlPath}`).toString();\n console.log(`Kube yaml ${resourceYamlPath} applied successfully via cli: ${kubectlApply}`);\n } catch (error) {\n throw new Error(`Error encountered when trying to apply kube yaml: ${error}`);\n }\n const kubernetesBar = await navigationBar.openKubernetes();\n const kubernetesResourcePage = await kubernetesBar.openTabPage(resourceType);\n await playExpect(kubernetesResourcePage.heading).toBeVisible();\n await playExpect.poll(async () => kubernetesResourcePage.getRowByName(resourceName)).toBeTruthy();\n });\n}\n\nexport async function deleteKubernetesResource(\n page: Page,\n resourceType: KubernetesResources,\n resourceName: string,\n timeout = 30_000,\n): Promise<void> {\n return test.step(`Delete ${resourceType} kubernetes resource: ${resourceName}`, async () => {\n const navigationBar = new NavigationBar(page);\n\n const kubernetesBar = await navigationBar.openKubernetes();\n const kubernetesResourcePage = await kubernetesBar.openTabPage(resourceType);\n await kubernetesResourcePage.deleteKubernetesResource(resourceName);\n await handleConfirmationDialog(page);\n await playExpect\n .poll(async () => await kubernetesResourcePage.getRowByName(resourceName), { timeout: timeout })\n .not.toBeTruthy();\n });\n}\n\nexport async function checkDeploymentReplicasInfo(\n page: Page,\n resourceType: KubernetesResources,\n resourceName: string,\n expectedReplicaCount: number,\n): Promise<void> {\n const navigationBar = new NavigationBar(page);\n const kubernetesBar = await navigationBar.openKubernetes();\n\n const kubernetesResourcePage = await kubernetesBar.openTabPage(resourceType);\n const kubernetesResourceDetails = await kubernetesResourcePage.openResourceDetails(resourceName, resourceType);\n await playExpect(kubernetesResourceDetails.heading).toBeVisible();\n const summaryTab = await kubernetesResourceDetails.activateTab('Summary');\n await playExpect(summaryTab.tabContent).toContainText(\n `Desired: ${expectedReplicaCount}, Updated: ${expectedReplicaCount}, Total: ${expectedReplicaCount}, Available: ${expectedReplicaCount}, Unavailable: N/A`,\n );\n}\n\nexport async function checkKubernetesResourceState(\n page: Page,\n resourceType: KubernetesResources,\n resourceName: string,\n expectedResourceState: KubernetesResourceState,\n timeout = 90_000,\n): Promise<void> {\n return test.step(`Check ${resourceType} kubernetes resource state, should be ${expectedResourceState}`, async () => {\n const navigationBar = new NavigationBar(page);\n const kubernetesBar = await navigationBar.openKubernetes();\n\n const kubernetesResourcePage = await kubernetesBar.openTabPage(resourceType);\n const kubernetesResourceDetails = await kubernetesResourcePage.openResourceDetails(\n resourceName,\n resourceType,\n timeout,\n );\n await playExpect(kubernetesResourceDetails.heading).toBeVisible();\n await playExpect\n .poll(async () => kubernetesResourceDetails.getState(), { timeout: timeout })\n .toBe(expectedResourceState);\n });\n}\n\nexport async function editDeploymentYamlFile(\n page: Page,\n resourceType: KubernetesResources,\n deploymentName: string,\n currentReplicaCount = 3,\n updatedReplicaCount = 5,\n): Promise<void> {\n return test.step('Change deployment kubernetes cluster resource', async () => {\n const navigationBar = new NavigationBar(page);\n const kubernetesBar = await navigationBar.openKubernetes();\n await playExpect\n .poll(async () => await countKubernetesPodReplicas(page, deploymentName), {\n timeout: 60_000,\n })\n .toBe(currentReplicaCount);\n\n const deploymentsPage = await kubernetesBar.openTabPage(resourceType);\n await playExpect(deploymentsPage.heading).toBeVisible();\n const deploymentDetails = await deploymentsPage.openResourceDetails(deploymentName, resourceType);\n await playExpect(deploymentDetails.heading).toBeVisible();\n await deploymentDetails.editKubernetsYamlFile(\n `replicas: ${currentReplicaCount}`,\n `replicas: ${updatedReplicaCount}`,\n );\n\n await playExpect\n .poll(async () => await countKubernetesPodReplicas(page, deploymentName), {\n timeout: 60_000,\n })\n .toBe(updatedReplicaCount);\n });\n}\n\nexport async function countKubernetesPodReplicas(page: Page, expectedPodName: string): Promise<number> {\n return test.step(`Count pod replicas: ${expectedPodName}`, async () => {\n const navigationBar = new NavigationBar(page);\n const kubernetesBar = await navigationBar.openKubernetes();\n const kubernetesPodsPage = await kubernetesBar.openTabPage(KubernetesResources.Pods);\n\n let counter = 0;\n const rows = await kubernetesPodsPage.getAllTableRows();\n for (let i = rows.length - 1; i > 0; i--) {\n const podName = await rows[i].getByRole('cell').nth(3).getByRole('button').textContent();\n if (podName?.includes(expectedPodName)) {\n counter += 1;\n }\n }\n return counter;\n });\n}\n\nexport async function configurePortForwarding(\n page: Page,\n resourceType: KubernetesResources,\n resourceName: string,\n): Promise<void> {\n return test.step(`Configure port forwarding for ${resourceName} ${resourceType} k8s resource`, async () => {\n const navigationBar = new NavigationBar(page);\n\n const kubernetesBar = await navigationBar.openKubernetes();\n const kubernetesResourcePage = await kubernetesBar.openTabPage(resourceType);\n const kubernetesResourceDetailsPage = await kubernetesResourcePage.openResourceDetails(resourceName, resourceType);\n await kubernetesResourceDetailsPage.activateTab('Summary');\n const forwardButton = page.getByRole('button', { name: 'Forward...' });\n await playExpect(forwardButton).toBeVisible();\n await forwardButton.click();\n\n const openInBrowserButton = page.getByRole('button', { name: 'Open', exact: true });\n const removeConfigurationButton = page.getByRole('button', { name: 'Remove' });\n await playExpect(openInBrowserButton).toBeVisible({ timeout: 10_000 });\n await playExpect(removeConfigurationButton).toBeVisible();\n });\n}\n\nexport async function verifyPortForwardingConfiguration(\n page: Page,\n configurationName: string,\n localPort: number,\n remotePort: number,\n): Promise<void> {\n return test.step(`Verify port forwarding for ${configurationName} configuration: local port ${localPort}, remote port ${remotePort}`, async () => {\n const navigationBar = new NavigationBar(page);\n const kubernetesBar = await navigationBar.openKubernetes();\n const portForwardingPage = await kubernetesBar.openTabPage(KubernetesResources.PortForwarding);\n await playExpect(portForwardingPage.heading).toBeVisible();\n const configurationRow = await portForwardingPage.fetchKubernetesResource(configurationName);\n\n const localPortCell = await portForwardingPage.geAttributeByRow(\n configurationRow,\n 'Local Port',\n KubernetesResources.PortForwarding,\n );\n const remotePortCell = await portForwardingPage.geAttributeByRow(\n configurationRow,\n 'Remote Port',\n KubernetesResources.PortForwarding,\n );\n playExpect(Number(await localPortCell.textContent())).toBe(localPort);\n playExpect(Number(await remotePortCell.textContent())).toBe(remotePort);\n });\n}\n\nexport async function verifyLocalPortResponse(forwardAddress: string, responseMessage: string): Promise<void> {\n return test.step('Verify local port response', async () => {\n playExpect.poll(\n async () => {\n const response: Response = await fetch(forwardAddress, { cache: 'no-store' });\n const blob: Blob = await response.blob();\n const text: string = await blob.text();\n playExpect(text).toContain(responseMessage);\n },\n { timeout: 20_000, intervals: [1_000, 3_000, 5_000, 15_000] },\n );\n });\n}\n\nexport async function monitorPodStatusInClusterContainer(\n page: Page,\n containerName: string,\n command: string,\n timeout = 160_000,\n): Promise<void> {\n const navigationBar = new NavigationBar(page);\n const containersPage = await navigationBar.openContainers();\n await playExpect(containersPage.heading).toBeVisible();\n await playExpect.poll(async () => containersPage.getContainerRowByName(containerName)).toBeTruthy();\n const containerDetailsPage = await containersPage.openContainersDetails(containerName);\n\n await playExpect\n .poll(\n async () => {\n await containerDetailsPage.executeCommandInTerminal(command);\n const result = await checkContourPodsInTerminal(page, containerName);\n await containerDetailsPage.executeCommandInTerminal('clear');\n return result;\n },\n { timeout: timeout },\n )\n .toBeTruthy();\n}\n\nasync function checkContourPodsInTerminal(page: Page, containerName: string): Promise<boolean> {\n const containerDetailsPage = new ContainerDetailsPage(page, containerName);\n await containerDetailsPage.activateTab('Terminal');\n await playExpect(containerDetailsPage.terminalContent).toBeVisible();\n await page.waitForTimeout(2_000);\n\n try {\n await playExpect(containerDetailsPage.terminalContent).toContainText(/contour-\\S+\\s+1\\/1\\s+Running\\s+\\d+\\s+\\S+/);\n await playExpect(containerDetailsPage.terminalContent).toContainText(\n /contour-certgen-\\S+\\s+0\\/1\\s+Completed\\s+\\d+\\s+\\S+/,\n );\n await playExpect(containerDetailsPage.terminalContent).toContainText(/envoy-\\S+\\s+2\\/2\\s+Running\\s+\\d+\\s+\\S+/);\n return true;\n } catch {\n return false;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { PodmanVirtualizationProviders } from '/@/model/core/types';\nimport { isMac, isWindows } from '/@/utility/platform';\n\nexport const envProvider = process.env.CONTAINERS_MACHINE_PROVIDER;\n\nconst PROVIDER_MAP: Record<string, PodmanVirtualizationProviders> = {\n wsl: PodmanVirtualizationProviders.WSL,\n hyperv: PodmanVirtualizationProviders.HyperV,\n applehv: PodmanVirtualizationProviders.AppleHV,\n libkrun: PodmanVirtualizationProviders.LibKrun,\n qemu: PodmanVirtualizationProviders.Qemu,\n};\n\nexport function getVirtualizationProvider(): PodmanVirtualizationProviders | undefined {\n return envProvider ? PROVIDER_MAP[envProvider?.toLowerCase()] : undefined;\n}\n\nexport function getDefaultVirtualizationProvider(): PodmanVirtualizationProviders {\n if (isWindows) {\n return PodmanVirtualizationProviders.WSL;\n }\n\n if (isMac) {\n return PodmanVirtualizationProviders.LibKrun;\n }\n\n return PodmanVirtualizationProviders.Native;\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\n// Extension locators definition\nexport interface ExtensionType {\n extensionName: string;\n extensionFullName: string;\n extensionLabel: string;\n extensionFullLabel: string;\n}\n\n// Catalog/External extensions\nexport const minikubeExtension: ExtensionType = {\n extensionName: 'minikube',\n extensionFullName: 'minikube extension',\n extensionLabel: 'minikube',\n extensionFullLabel: 'podman-desktop.minikube',\n};\n\nexport const podmanAILabExtension: ExtensionType = {\n extensionName: 'Podman AI Lab',\n extensionFullName: 'Podman AI Lab extension',\n extensionLabel: 'ai-lab',\n extensionFullLabel: 'redhat.ai-lab',\n};\n\nexport const extensionsPackExtension: ExtensionType = {\n extensionName: 'Red Hat Extension Pack',\n extensionFullName: 'Red Hat Extension Pack extension',\n extensionLabel: 'redhat-pack',\n extensionFullLabel: 'redhat.redhat-pack',\n};\n\nexport const bootcExtension: ExtensionType = {\n extensionName: 'Bootable Container',\n extensionFullName: 'Bootable Container extension',\n extensionLabel: 'bootc',\n extensionFullLabel: 'redhat.bootc',\n};\n\nexport const developerSandboxExtension: ExtensionType = {\n extensionName: 'Developer Sandbox',\n extensionFullName: 'Developer Sandbox extension',\n extensionLabel: 'redhat-sandbox',\n extensionFullLabel: 'redhat.redhat-sandbox',\n};\n\nexport const imageLayersExplorerExtension: ExtensionType = {\n extensionName: 'Image Layers Explorer',\n extensionFullName: 'Image Layers Explorer extension',\n extensionLabel: 'layers-explorer',\n extensionFullLabel: 'podman-desktop.layers-explorer',\n};\n\nexport const podmanQuadletExtension: ExtensionType = {\n extensionName: 'Podman Quadlet',\n extensionFullName: 'Podman Quadlet extension',\n extensionLabel: 'quadlet',\n extensionFullLabel: 'podman-desktop.quadlet',\n};\n\nexport const ssoExtension: ExtensionType = {\n extensionName: 'Red Hat Authentication',\n extensionFullName: 'Red Hat Authentication extension',\n extensionLabel: 'redhat-authentication',\n extensionFullLabel: 'redhat.redhat-authentication',\n};\n\nexport const openshiftCheckerExtension: ExtensionType = {\n extensionName: 'Red Hat OpenShift Checker',\n extensionFullName: 'Red Hat OpenShift Checker extension',\n extensionLabel: 'openshift-checker',\n extensionFullLabel: 'redhat.openshift-checker',\n};\n\nexport const openshiftLocalExtension: ExtensionType = {\n extensionName: 'Red Hat OpenShift Local',\n extensionFullName: 'Red Hat OpenShift Local extension',\n extensionLabel: 'openshift-local',\n extensionFullLabel: 'redhat.openshift-local',\n};\n\n// external contributor\nexport const headlampExtension: ExtensionType = {\n extensionName: 'Headlamp',\n extensionFullName: 'Headlamp extension',\n extensionLabel: 'Headlamp',\n extensionFullLabel: 'Headlamp',\n};\n\n// Built-in extensions\nexport const composeExtension: ExtensionType = {\n extensionName: 'Compose',\n extensionFullName: 'Compose extension',\n extensionLabel: 'compose',\n extensionFullLabel: 'podman-desktop.compose',\n};\n\nexport const dockerExtension: ExtensionType = {\n extensionName: 'Docker',\n extensionFullName: 'Docker extension',\n extensionLabel: 'docker',\n extensionFullLabel: 'podman-desktop.docker',\n};\n\nexport const kindExtension: ExtensionType = {\n extensionName: 'Kind',\n extensionFullName: 'Kind extension',\n extensionLabel: 'kind',\n extensionFullLabel: 'podman-desktop.kind',\n};\n\nexport const kubeContextExtension: ExtensionType = {\n extensionName: 'Kube Context',\n extensionFullName: 'Kube Context extension',\n extensionLabel: 'kube-context',\n extensionFullLabel: 'podman-desktop.kube-context',\n};\n\nexport const kubectlCLIExtension: ExtensionType = {\n extensionName: 'kubectl CLI',\n extensionFullName: 'kubectl CLI extension',\n extensionLabel: 'podman-desktop.kubectl-cli',\n extensionFullLabel: 'podman-desktop.kubectl-cli',\n};\n\nexport const limaExtension: ExtensionType = {\n extensionName: 'Lima',\n extensionFullName: 'Lima extension',\n extensionLabel: 'lima',\n extensionFullLabel: 'podman-desktop.lima',\n};\n\nexport const podmanExtension: ExtensionType = {\n extensionName: 'Podman',\n extensionFullName: 'Podman extension',\n extensionLabel: 'podman',\n extensionFullLabel: 'podman-desktop.podman',\n};\n\nexport const registriesExtension: ExtensionType = {\n extensionName: 'Registries',\n extensionFullName: 'Registries extension',\n extensionLabel: 'registries',\n extensionFullLabel: 'podman-desktop.registries',\n};\n\nexport const openshiftDockerExtension: ExtensionType = {\n extensionName: 'OpenShift',\n extensionFullName: 'OpenShift extension',\n extensionLabel: 'OpenShift',\n extensionFullLabel: 'OpenShift',\n};\n\nexport const extensionsBuiltInList = [\n composeExtension,\n dockerExtension,\n kindExtension,\n kubeContextExtension,\n kubectlCLIExtension,\n podmanAILabExtension,\n registriesExtension,\n];\nexport const extensionsExternalList = [\n minikubeExtension,\n podmanAILabExtension,\n extensionsPackExtension,\n bootcExtension,\n developerSandboxExtension,\n imageLayersExplorerExtension,\n podmanQuadletExtension,\n ssoExtension,\n openshiftCheckerExtension,\n openshiftLocalExtension,\n];\nexport const extensionsInstallationSmokeList = [\n bootcExtension,\n podmanQuadletExtension,\n openshiftDockerExtension,\n imageLayersExplorerExtension,\n];\nexport const extensionsAllExternalList = [...extensionsExternalList, headlampExtension];\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { SettingsPage } from './settings-page';\n\nexport class AuthenticationPage extends SettingsPage {\n readonly main: Locator;\n readonly header: Locator;\n readonly heading: Locator;\n readonly content: Locator;\n readonly providersList: Locator;\n\n constructor(page: Page) {\n super(page, 'Authentication');\n this.main = page.getByRole('region', { name: 'Authentication' });\n this.header = this.main.getByRole('region', { name: 'Header' });\n this.heading = this.header.getByRole('heading', { name: 'Title', exact: true });\n this.content = this.main.getByRole('region', { name: 'Content' });\n this.providersList = this.content.getByRole('list');\n }\n\n public getProvider(providerName: string): Locator {\n return this.providersList.getByRole('listitem', { name: providerName });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport class CommandPalette extends BasePage {\n readonly commandPaletteInputField: Locator;\n constructor(page: Page) {\n super(page);\n this.commandPaletteInputField = this.page.getByLabel('Command palette command input', { exact: true });\n }\n\n async executeCommand(command: string): Promise<void> {\n if (!command) {\n throw new Error('Command is required');\n }\n\n if (!(await this.commandPaletteInputField.isVisible())) {\n await this.page.keyboard.press('F1');\n }\n\n await playExpect(this.commandPaletteInputField).toBeVisible();\n await this.commandPaletteInputField.pressSequentially(command, { delay: 25 });\n await this.commandPaletteInputField.press('Enter');\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport class OnboardingPage extends BasePage {\n readonly mainPage: Locator;\n readonly header: Locator;\n readonly skipSetupButton: Locator;\n readonly onboardingComponent: Locator;\n readonly onboardingStatusMessage: Locator;\n readonly nextInfoMessage: Locator;\n readonly nextStepButton: Locator;\n readonly cancelSetupButtion: Locator;\n\n constructor(page: Page) {\n super(page);\n this.mainPage = page.getByRole('region', { name: 'Onboarding Body' });\n this.header = this.mainPage.getByRole('heading', { name: 'Header' });\n this.skipSetupButton = this.header.getByRole('button', { name: 'Skip this entire setup' });\n this.onboardingComponent = this.mainPage.getByLabel('Onboarding Component');\n this.onboardingStatusMessage = this.mainPage.getByLabel('Onboarding Status Message');\n this.nextInfoMessage = this.mainPage.getByLabel('Next Info Message');\n this.nextStepButton = this.mainPage.getByRole('button', { name: 'Next Step' });\n this.cancelSetupButtion = this.mainPage.getByRole('button', { name: 'Cancel Setup' });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from 'playwright';\n\nimport { OnboardingPage } from '/@/model/pages/onboarding-page';\n\nexport class ComposeOnboardingPage extends OnboardingPage {\n readonly heading: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = this.page.getByRole('heading', { name: 'Compose Setup Header' });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from 'playwright';\n\nimport { ComposeOnboardingPage } from './compose-onboarding-page';\n\nexport class ComposeFailedPage extends ComposeOnboardingPage {\n readonly tryAgainButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.tryAgainButton = this.mainPage.getByRole('button', { name: 'Try again' });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from 'playwright';\n\nimport { ComposeOnboardingPage } from './compose-onboarding-page';\n\nexport class ComposeLocalInstallPage extends ComposeOnboardingPage {\n readonly wideDownloadAvailableMessage: Locator;\n\n constructor(page: Page) {\n super(page);\n this.wideDownloadAvailableMessage = this.mainPage.getByText(\n 'The next step will install Compose system-wide. You will be prompted for system',\n );\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from 'playwright';\n\nimport { ComposeOnboardingPage } from './compose-onboarding-page';\n\nexport class ComposeVersionPage extends ComposeOnboardingPage {\n readonly versionStatusMessage: Locator;\n\n constructor(page: Page) {\n super(page);\n this.versionStatusMessage = this.mainPage.getByText(\n /Compose will be downloaded in the next step \\(Version v[0-9.]+\\). Want to download/,\n { exact: true },\n );\n }\n\n async getVersion(): Promise<string> {\n const versionInfoText = await this.versionStatusMessage.textContent();\n let composeVersion = '';\n\n const matches = versionInfoText?.match(/v\\d+(\\.\\d+)+/);\n if (matches) {\n composeVersion = matches[0];\n }\n return composeVersion;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from 'playwright';\n\nimport { ComposeOnboardingPage } from './compose-onboarding-page';\n\nexport class ComposeWideInstallPage extends ComposeOnboardingPage {\n readonly composeCommandMessage: Locator;\n\n constructor(page: Page) {\n super(page);\n this.composeCommandMessage = this.mainPage.getByText('$ podman compose up', { exact: true });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\n/**\n * Reusable dropdown component for consistent dropdown interactions across the test suite.\n * Handles the standard dropdown pattern used in Podman Desktop UI based on the Dropdown.svelte component.\n *\n * This component encapsulates the proper interaction patterns for dropdowns that follow the structure:\n * - Container with aria-label\n * - Button for triggering dropdown open/close\n * - Hidden input that holds the actual selected value\n * - Options list that appears when opened\n */\nexport class DropdownComponent {\n private readonly page: Page;\n private readonly containerLocator: Locator;\n private readonly triggerButton: Locator;\n private readonly hiddenInput: Locator;\n private readonly ariaLabel: string;\n\n /**\n * Creates a new DropdownComponent instance\n * @param page - The Playwright page object\n * @param ariaLabel - The aria-label used to identify the dropdown container\n */\n constructor(page: Page, ariaLabel: string) {\n this.page = page;\n this.ariaLabel = ariaLabel;\n\n // Find the dropdown container by its aria-label\n this.containerLocator = page.getByLabel(ariaLabel, { exact: true });\n\n // The trigger button is inside the container - first button element\n this.triggerButton = this.containerLocator.getByRole('button').first();\n\n // The hidden input holds the actual value\n this.hiddenInput = this.containerLocator.getByLabel('hidden input', { exact: true });\n }\n\n /**\n * Get the currently selected value from the dropdown's hidden input\n * @returns The current value stored in the hidden input\n */\n async getCurrentValue(): Promise<string> {\n return await this.hiddenInput.inputValue();\n }\n\n /**\n * Get the currently displayed text (what the user sees on the trigger button)\n * @returns The display text shown on the dropdown trigger\n */\n async getCurrentDisplayText(): Promise<string> {\n return await this.triggerButton.innerText();\n }\n\n /**\n * Select an option from the dropdown\n * @param optionValue - The value to select (used for verification)\n * @param optionText - The text to match when finding the option button (defaults to optionValue)\n * @param exact - Whether to use exact text matching (defaults to false for case-insensitive matching)\n */\n async selectOption(optionValue: string, optionText?: string, exact = false): Promise<void> {\n const displayText = optionText ?? optionValue;\n\n return test.step(`Select dropdown option: ${displayText}`, async () => {\n // Ensure dropdown container is visible\n await playExpect(this.containerLocator).toBeVisible({ timeout: 10_000 });\n await playExpect(this.triggerButton).toBeVisible({ timeout: 10_000 });\n\n // Get current value to check if change is needed\n const currentValue = await this.getCurrentValue();\n\n if (currentValue !== optionValue) {\n // Click to open the dropdown\n await this.triggerButton.scrollIntoViewIfNeeded();\n await this.triggerButton.click();\n\n // Wait until at least one option (beyond the trigger) is visible\n await playExpect(this.containerLocator.getByRole('button').nth(1)).toBeVisible();\n\n // Find and click the option button\n // Options appear as buttons within the container when dropdown is open\n const optionButton = this.containerLocator.getByRole('button', {\n name: displayText,\n exact: exact,\n });\n\n await playExpect(optionButton).toBeVisible({ timeout: 10_000 });\n await optionButton.click();\n\n // Verify the selection was applied (case-insensitive due to windows options)\n await playExpect\n .poll(\n async () => {\n const actualValue = await this.hiddenInput.inputValue();\n return actualValue.toLowerCase();\n },\n { timeout: 5_000 },\n )\n .toBe(optionValue.toLowerCase());\n }\n });\n }\n\n /**\n * Check if the dropdown is currently open using ARIA semantics with fallback\n * @returns True if the dropdown options are visible\n */\n async isOpen(): Promise<boolean> {\n const expanded = await this.triggerButton.getAttribute('aria-expanded');\n if (expanded !== null) return expanded === 'true';\n // Fallback: when open, there should be more than one button (trigger + options)\n return (await this.containerLocator.getByRole('button').count()) > 1;\n }\n\n /**\n * Get all available options from the dropdown\n * Note: This will open and close the dropdown to retrieve options\n * @returns Array of option texts available in the dropdown\n */\n async getAvailableOptions(): Promise<string[]> {\n return test.step('Get available dropdown options', async () => {\n // Open dropdown if not already open\n const wasOpen = await this.isOpen();\n if (!wasOpen) {\n await this.triggerButton.click();\n await playExpect(this.containerLocator.getByRole('button').nth(1)).toBeVisible();\n }\n\n // Get all button texts (excluding the trigger button)\n const allButtons = this.containerLocator.getByRole('button');\n const buttonTexts = await allButtons.allInnerTexts();\n\n // Exclude the trigger button (first entry)\n const [, ...options] = buttonTexts;\n\n // Close dropdown if we opened it\n if (!wasOpen) {\n await this.triggerButton.click();\n }\n\n return options;\n });\n }\n\n /**\n * Verify the dropdown is in the expected state\n * @param expectedValue - The expected value in the hidden input\n * @param expectedDisplayText - Optional expected display text on the trigger button\n */\n async verifyState(expectedValue: string, expectedDisplayText?: string): Promise<void> {\n return test.step(`Verify dropdown state: ${expectedValue}`, async () => {\n // Verify the hidden input value (case-insensitive due to windows options)\n await playExpect\n .poll(\n async () => {\n const actualValue = await this.hiddenInput.inputValue();\n return actualValue.toLowerCase();\n },\n { timeout: 5_000 },\n )\n .toBe(expectedValue.toLowerCase());\n\n if (expectedDisplayText) {\n await playExpect(this.triggerButton).toContainText(expectedDisplayText, {\n ignoreCase: true,\n timeout: 5_000,\n });\n }\n });\n }\n\n /**\n * Wait for the dropdown to be ready for interaction\n * @param timeout - Maximum time to wait in milliseconds\n */\n async waitForReady(timeout = 10_000): Promise<void> {\n return test.step(`Wait for dropdown to be ready: ${this.ariaLabel}`, async () => {\n await playExpect(this.containerLocator).toBeVisible({ timeout });\n await playExpect(this.triggerButton).toBeVisible({ timeout });\n await playExpect(this.hiddenInput).toBeAttached({ timeout });\n });\n }\n\n /**\n * Get the dropdown container locator for advanced operations\n * @returns The container locator for this dropdown\n */\n getContainer(): Locator {\n return this.containerLocator;\n }\n\n /**\n * Get the trigger button locator for advanced operations\n * @returns The trigger button locator for this dropdown\n */\n getTriggerButton(): Locator {\n return this.triggerButton;\n }\n\n /**\n * Get the hidden input locator for advanced operations\n * @returns The hidden input locator for this dropdown\n */\n getHiddenInput(): Locator {\n return this.hiddenInput;\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { DropdownComponent } from '/@/model/components/dropdown-component';\nimport type { PodmanVirtualizationProviders } from '/@/model/core/types';\nimport { matchesProviderVariant, PodmanVirtualizationProviderVariants } from '/@/model/core/types';\nimport { BasePage } from '/@/model/pages/base-page';\nimport { isWindows } from '/@/utility/platform';\nimport { getDefaultVirtualizationProvider } from '/@/utility/provider';\n\nexport class MachineCreationForm extends BasePage {\n readonly podmanMachineConfiguration: Locator;\n readonly podmanMachineName: Locator;\n readonly imagePathBox: Locator;\n readonly browseImagesButton: Locator;\n readonly podmanMachineCPUs: Locator;\n readonly podmanMachineMemory: Locator;\n readonly podmanMachineDiskSize: Locator;\n readonly rootPriviledgesCheckbox: Locator;\n readonly userModeNetworkingCheckbox: Locator;\n readonly providerTypeDropdown: DropdownComponent;\n readonly startNowCheckbox: Locator;\n readonly createMachineButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.podmanMachineConfiguration = this.page.getByRole('form', {\n name: 'Properties Information',\n });\n this.podmanMachineName = this.podmanMachineConfiguration.getByRole('textbox', { name: 'Name' });\n this.imagePathBox = this.podmanMachineConfiguration.getByRole('textbox', {\n name: 'Image Path (Optional) ',\n });\n this.browseImagesButton = this.podmanMachineConfiguration.getByRole('button', {\n name: 'button-Image Path (Optional)',\n });\n this.podmanMachineCPUs = this.podmanMachineConfiguration.getByRole('slider', { name: 'CPU(s)' });\n this.podmanMachineMemory = this.podmanMachineConfiguration.getByRole('slider', { name: 'Memory' });\n this.podmanMachineDiskSize = this.podmanMachineConfiguration.getByRole('slider', { name: 'Disk size' });\n this.rootPriviledgesCheckbox = this.podmanMachineConfiguration.getByRole('checkbox', {\n name: 'Machine with root privileges',\n });\n this.userModeNetworkingCheckbox = this.podmanMachineConfiguration.getByRole('checkbox', {\n name: 'User mode networking',\n });\n this.providerTypeDropdown = new DropdownComponent(page, 'Provider Type');\n\n this.startNowCheckbox = this.podmanMachineConfiguration.getByRole('checkbox', { name: 'Start the machine now' });\n this.createMachineButton = this.podmanMachineConfiguration.getByRole('button', { name: 'Create' });\n }\n\n async setupAndCreateMachine(\n machineName: string,\n {\n isRootful = true,\n enableUserNet = false,\n startNow = true,\n virtualizationProvider,\n }: {\n isRootful?: boolean;\n enableUserNet?: boolean;\n startNow?: boolean;\n virtualizationProvider?: PodmanVirtualizationProviders;\n } = {},\n ): Promise<void> {\n return test.step(`Create Podman Machine '${machineName}' with settings: ${isRootful ? 'rootful' : 'rootless'}, ${enableUserNet ? 'usernet enabled' : 'usernet disabled'}, ${startNow ? 'startnow enabled' : 'startnow disabled'}${virtualizationProvider ? ', and ' + virtualizationProvider : ''}`, async () => {\n await playExpect(this.podmanMachineConfiguration).toBeVisible({\n timeout: 10_000,\n });\n await this.podmanMachineName.clear();\n await playExpect(this.podmanMachineName).toHaveValue('');\n\n await this.podmanMachineName.fill(machineName);\n await playExpect(this.podmanMachineName).toHaveValue(machineName);\n\n await this.ensureCheckboxState(isRootful, this.rootPriviledgesCheckbox);\n if (isWindows) {\n await this.ensureCheckboxState(enableUserNet, this.userModeNetworkingCheckbox);\n }\n if (virtualizationProvider) {\n await this.specifyVirtualizationProvider(virtualizationProvider);\n }\n await this.ensureCheckboxState(startNow, this.startNowCheckbox);\n\n await playExpect(this.createMachineButton).toBeEnabled();\n await this.createMachineButton.click();\n });\n }\n\n async ensureCheckboxState(desiredState: boolean, checkbox: Locator): Promise<void> {\n return test.step(`Ensure checkbox is ${desiredState ? 'checked' : 'unchecked'}`, async () => {\n if (desiredState !== (await checkbox.isChecked())) {\n await checkbox.locator('..').click();\n }\n\n await playExpect.poll(async () => await checkbox.isChecked()).toBe(desiredState);\n });\n }\n\n async specifyVirtualizationProvider(\n virtualizationProvider: PodmanVirtualizationProviders | undefined,\n ): Promise<void> {\n return test.step(`Set Podman Provider to ${virtualizationProvider ?? getDefaultVirtualizationProvider()}`, async () => {\n if (!virtualizationProvider) return;\n // Only select if the dropdown is actually present/visible\n if (!(await this.providerTypeDropdown.getContainer().isVisible())) return;\n await this.providerTypeDropdown.waitForReady();\n // Compare by the hidden input value using variant matching to handle version differences\n const currentValue = await this.providerTypeDropdown.getCurrentValue();\n if (!matchesProviderVariant(virtualizationProvider, currentValue)) {\n // Try to find which variant actually exists in the dropdown\n const availableOptions = await this.providerTypeDropdown.getAvailableOptions();\n const variants = PodmanVirtualizationProviderVariants[virtualizationProvider];\n // Find the first variant that matches any available option\n const matchingVariant = variants.find(variant =>\n availableOptions.some(option => option.toLowerCase().trim() === variant.toLowerCase().trim()),\n );\n if (!matchingVariant) {\n throw new Error(\n `No matching variant found for provider ${virtualizationProvider}. Available options: ${availableOptions.join(', ')}. Expected variants: ${variants.join(', ')}`,\n );\n }\n await this.providerTypeDropdown.selectOption(matchingVariant, matchingVariant, false);\n await this.providerTypeDropdown.verifyState(matchingVariant, matchingVariant);\n }\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2023 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport type { PodmanVirtualizationProviders } from '/@/model/core/types';\n\nimport { BasePage } from './base-page';\nimport { MachineCreationForm } from './forms/machine-creation-form';\nimport { ResourcesPage } from './resources-page';\n\nexport class CreateMachinePage extends BasePage {\n readonly heading: Locator;\n readonly machineCreationForm: MachineCreationForm;\n readonly closeButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.heading = this.page.getByRole('heading', {\n name: 'Create Podman Machine',\n });\n this.machineCreationForm = new MachineCreationForm(this.page);\n this.closeButton = this.page.getByRole('button', { name: 'Close' });\n }\n\n async createMachine(\n machineName: string,\n {\n isRootful = true,\n enableUserNet = false,\n startNow = true,\n setAsDefault = true,\n virtualizationProvider,\n }: {\n isRootful?: boolean;\n enableUserNet?: boolean;\n startNow?: boolean;\n setAsDefault?: boolean;\n virtualizationProvider?: PodmanVirtualizationProviders;\n },\n ): Promise<ResourcesPage> {\n return test.step(`Create Podman Machine: ${machineName}`, async () => {\n await this.machineCreationForm.setupAndCreateMachine(machineName, {\n isRootful,\n enableUserNet,\n startNow,\n virtualizationProvider,\n });\n\n const successfulCreationMessage = this.page.getByText('Successful operation');\n const goBackToResourcesButton = this.page.getByRole('button', {\n name: 'Go back to resources',\n });\n\n await playExpect(successfulCreationMessage).toBeVisible({\n timeout: 120_000,\n });\n await playExpect(goBackToResourcesButton).toBeVisible();\n\n try {\n await this.handleConnectionDialog(machineName, setAsDefault);\n } catch (error) {\n console.log('No handling dialog displayed', error);\n }\n\n await playExpect(goBackToResourcesButton).toBeEnabled();\n await goBackToResourcesButton.click();\n return new ResourcesPage(this.page);\n });\n }\n\n async handleConnectionDialog(machineName: string, setAsDefault: boolean): Promise<void> {\n return test.step('Handle Podman Machine connection dialog', async () => {\n const connectionDialog = this.page.getByRole('dialog', {\n name: 'Podman',\n });\n await playExpect(connectionDialog).toBeVisible({ timeout: 10_000 });\n\n const dialogMessage = connectionDialog.getByLabel('Dialog Message');\n await playExpect(dialogMessage).toHaveText(\n new RegExp(\n `Podman Machine '${machineName}' is running but not the default machine .+ Do you want to set it as default?`,\n ),\n );\n\n const handleButtonName = setAsDefault ? 'Yes' : 'Ignore';\n const handleButton = connectionDialog.getByRole('button', {\n name: handleButtonName,\n });\n await handleButton.click();\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { SettingsPage } from './settings-page';\n\nexport class DockerCompatibilityPage extends SettingsPage {\n readonly heading: Locator;\n readonly serverInformationBox: Locator;\n readonly podmanComposeCLICard: Locator;\n readonly dockerCLICard: Locator;\n readonly dockerContextDropdownMenu: Locator;\n readonly podmanListeningLabel: Locator;\n\n constructor(page: Page) {\n super(page, 'Docker Compatibility');\n this.heading = this.header\n .getByRole('heading', { name: 'Title' })\n .and(this.header.getByText('Docker Compatibility'));\n this.serverInformationBox = this.content.getByRole('status', { name: 'Server information' });\n this.podmanComposeCLICard = this.content.getByRole('list', { name: 'podman-desktop.podman' });\n this.dockerCLICard = this.content.getByRole('list', { name: 'podman-desktop.docker' });\n this.dockerContextDropdownMenu = this.dockerCLICard.getByRole('button', {\n name: 'select-property-docker.cli.context',\n });\n this.podmanListeningLabel = this.content.getByText('podman is listening');\n }\n\n public async socketIsReachable(): Promise<boolean> {\n try {\n await playExpect(this.podmanListeningLabel).toBeVisible();\n return await this.podmanListeningLabel.isVisible();\n } catch (_error) {\n return false;\n }\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport test, { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\nimport { ExtensionDetailsPage } from './extension-details-page';\n\nexport class ExtensionCatalogCardPage extends BasePage {\n readonly parent: Locator;\n readonly extensionName: string;\n readonly detailsButton: Locator;\n readonly downloadButton: Locator;\n readonly alreadyInstalledText: Locator;\n\n constructor(page: Page, extensionName: string) {\n super(page);\n this.extensionName = extensionName;\n this.parent = this.page.getByRole('group', { name: this.extensionName });\n this.detailsButton = this.parent.getByRole('button', {\n name: 'More details',\n });\n this.downloadButton = this.parent.getByRole('button', { name: 'Install' });\n this.alreadyInstalledText = this.parent.getByText('Already installed', {\n exact: true,\n });\n }\n\n public async openDetails(): Promise<ExtensionDetailsPage> {\n return test.step(`Open details for extension: ${this.extensionName}`, async () => {\n await this.parent.scrollIntoViewIfNeeded();\n await playExpect(this.detailsButton).toBeVisible();\n await this.detailsButton.click();\n return new ExtensionDetailsPage(this.page, this.extensionName);\n });\n }\n\n public async isInstalled(): Promise<boolean> {\n return test.step(`Check if extension ${this.extensionName} is installed`, async () => {\n await this.parent.scrollIntoViewIfNeeded();\n const downloadButton = this.parent.getByRole('button', {\n name: 'Install',\n });\n return (await this.alreadyInstalledText.count()) > 0 && (await downloadButton.count()) === 0;\n });\n }\n\n public async install(timeout: number): Promise<void> {\n return test.step(`Install extension ${this.extensionName}`, async () => {\n if (await this.isInstalled()) {\n console.log(`Extension ${this.extensionName} is already installed`);\n return;\n }\n await playExpect(this.downloadButton).toBeEnabled();\n await this.downloadButton.click();\n await playExpect(this.alreadyInstalledText).toBeVisible({\n timeout: timeout,\n });\n });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { handleConfirmationDialog } from '/@/utility/operations';\n\nimport { SettingsPage } from './settings-page';\n\nexport class KubeContextPage extends SettingsPage {\n readonly heading: Locator;\n readonly content: Locator;\n readonly contextTable: Locator;\n readonly editContextDialog: Locator;\n\n constructor(page: Page) {\n super(page, 'Kubernetes');\n this.heading = this.page.getByLabel('Title', { exact: true });\n this.content = this.page.getByLabel('Content');\n this.contextTable = this.content.getByLabel('Contexts');\n this.editContextDialog = this.page.getByRole('dialog', { name: 'Edit Context' });\n }\n\n async pageIsEmpty(): Promise<boolean> {\n const emptyHeading = this.page.getByRole('heading', { name: 'No Kubernetes contexts found', exact: true });\n return (await emptyHeading.count()) > 0;\n }\n\n async getContextRowByName(name: string): Promise<Locator> {\n return this.contextTable.getByLabel(name, { exact: true });\n }\n\n async isContextDefault(name: string): Promise<boolean> {\n const row = await this.getContextRowByName(name);\n if (row === undefined) {\n throw Error(`Context: '${name}' does not exist`);\n }\n\n const bannerText = await row.getByLabel('Current Context').textContent();\n return bannerText === 'Current Context';\n }\n\n async isContextReachable(name: string): Promise<boolean> {\n const row = await this.getContextRowByName(name);\n if (row === undefined) {\n throw Error(`Context: '${name}' does not exist`);\n }\n const contextReachable = row.getByLabel('Context Reachable');\n\n return (await contextReachable.count()) > 0;\n }\n\n async setDefaultContext(name: string): Promise<void> {\n const contextRow = await this.getContextRowByName(name);\n if (contextRow === undefined) {\n throw Error(`Context: '${name}' does not exist`);\n }\n const switchButton = contextRow.getByLabel('Set as Current Context');\n await playExpect(switchButton).toBeEnabled();\n await switchButton.click();\n }\n\n async deleteContext(name: string, handleConfirmation = true): Promise<void> {\n const contextRow = await this.getContextRowByName(name);\n if (contextRow === undefined) {\n throw Error(`Context: '${name}' does not exist`);\n }\n const deleteButton = contextRow.getByLabel('Delete Context');\n await playExpect(deleteButton).toBeEnabled();\n await deleteButton.click();\n if (handleConfirmation) {\n await handleConfirmationDialog(this.page, 'Delete Context');\n }\n }\n\n async duplicateContext(name: string): Promise<void> {\n const contextRow = await this.getContextRowByName(name);\n if (contextRow === undefined) {\n throw Error(`Context: '${name}' does not exist`);\n }\n const duplicateButton = contextRow.getByLabel('Duplicate Context');\n await playExpect(duplicateButton).toBeEnabled();\n await duplicateButton.click();\n }\n\n async editContext(name: string, newName: string): Promise<void> {\n const contextRow = await this.getContextRowByName(name);\n if (contextRow === undefined) {\n throw Error(`Context: '${name}' does not exist`);\n }\n\n if (newName === name) {\n throw Error(`New context name must be different from the current one: ${name}`);\n }\n\n const editButton = contextRow.getByLabel('Edit Context');\n await playExpect(editButton).toBeEnabled();\n await editButton.click();\n\n await playExpect(this.editContextDialog).toBeVisible({ timeout: 10_000 });\n\n const nameInput = this.editContextDialog.getByLabel('contextName', { exact: true });\n await playExpect(nameInput).toBeVisible();\n await nameInput.clear();\n await playExpect(nameInput).toHaveValue('');\n await nameInput.fill(newName);\n await playExpect(nameInput).toHaveValue(newName);\n\n const saveButton = this.editContextDialog.getByRole('button', { name: 'Save' });\n await playExpect(saveButton).toBeEnabled();\n await saveButton.click();\n }\n\n async getContextName(context: string): Promise<string> {\n const row = await this.getContextRowByName(context);\n return row.getByLabel('Context Name', { exact: true }).innerText();\n }\n\n async getContextCluster(context: string): Promise<string> {\n const row = await this.getContextRowByName(context);\n return row.getByLabel('Context Cluster').innerText();\n }\n\n async getContextServer(context: string): Promise<string> {\n const row = await this.getContextRowByName(context);\n return row.getByLabel('Context Server').innerText();\n }\n\n async getContextUser(context: string): Promise<string> {\n const row = await this.getContextRowByName(context);\n return row.getByLabel('Context User').innerText();\n }\n\n async getContextNamespace(context: string): Promise<string> {\n const row = await this.getContextRowByName(context);\n return row.getByLabel('Context Namespace').innerText();\n }\n\n async getSetCurrentContextButton(context: string): Promise<Locator> {\n const row = await this.getContextRowByName(context);\n return row.getByLabel('Set as Current Context');\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { ResourcesPage } from './resources-page';\n\nexport class PodmanMachineDetails extends ResourcesPage {\n readonly podmanMachineName: Locator;\n readonly podmanMachineStatus: Locator;\n readonly podmanMachineConnectionActions: Locator;\n readonly podmanMachineStartButton: Locator;\n readonly podmanMachineRestartButton: Locator;\n readonly podmanMachineStopButton: Locator;\n readonly podmanMachineDeleteButton: Locator;\n\n readonly tabs: Locator;\n readonly summaryTab: Locator;\n readonly logsTab: Locator;\n readonly terminalTab: Locator;\n readonly tabContent: Locator;\n readonly terminalInput: Locator;\n readonly terminalContent: Locator;\n\n constructor(page: Page, podmanMachineName: string) {\n super(page);\n this.podmanMachineName = page.getByRole('heading', { name: podmanMachineName });\n this.podmanMachineStatus = page.getByLabel('Connection Status Label');\n this.podmanMachineConnectionActions = page.getByRole('group', { name: 'Connection Actions' });\n this.podmanMachineStartButton = this.podmanMachineConnectionActions.getByRole('button', {\n name: 'Start',\n exact: true,\n });\n this.podmanMachineRestartButton = this.podmanMachineConnectionActions.getByRole('button', { name: 'Restart' });\n this.podmanMachineStopButton = this.podmanMachineConnectionActions.getByRole('button', { name: 'Stop' });\n this.podmanMachineDeleteButton = this.podmanMachineConnectionActions.getByRole('button', { name: 'Delete' });\n\n this.tabs = page.getByRole('region', { name: 'Tabs' });\n this.summaryTab = this.tabs.getByText('Summary');\n this.logsTab = this.tabs.getByText('Logs');\n this.terminalTab = this.tabs.getByText('Terminal', { exact: true });\n this.tabContent = page.getByRole('region', { name: 'Tab Content' });\n this.terminalInput = this.tabContent.getByLabel('Terminal input');\n this.terminalContent = this.tabContent.locator('.xterm-rows');\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\n\nimport { MachineCreationForm } from './forms/machine-creation-form';\nimport { OnboardingPage } from './onboarding-page';\n\nexport class PodmanOnboardingPage extends OnboardingPage {\n readonly podmanAutostartToggle: Locator;\n readonly createMachinePageTitle: Locator;\n readonly machineCreationForm: MachineCreationForm;\n readonly podmanMachineShowLogsButton: Locator;\n readonly goBackButton: Locator;\n\n constructor(page: Page) {\n super(page);\n this.podmanAutostartToggle = this.mainPage.getByRole('checkbox', {\n name: 'Autostart Podman engine when launching Podman Desktop',\n });\n this.createMachinePageTitle = this.onboardingComponent.getByLabel('title');\n this.machineCreationForm = new MachineCreationForm(this.page);\n this.podmanMachineShowLogsButton = this.mainPage.getByRole('button', { name: 'Show Logs' });\n this.goBackButton = this.page.getByRole('button', { name: 'Go back to resources' });\n }\n}\n","/**********************************************************************\n * Copyright (C) 2024 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport { ResourceCardPage } from './resource-card-page';\n\nexport class ResourceCliCardPage extends ResourceCardPage {}\n","/**********************************************************************\n * Copyright (C) 2025 Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n ***********************************************************************/\n\nimport type { Locator, Page } from '@playwright/test';\nimport { expect as playExpect } from '@playwright/test';\n\nimport { BasePage } from './base-page';\n\nexport class TroubleshootingPage extends BasePage {\n readonly heading: Locator;\n readonly header: Locator;\n readonly tabs: Locator;\n readonly tabContent: Locator;\n readonly containerConnectionsStatus: Locator;\n readonly storesStatus: Locator;\n readonly logsText: Locator;\n readonly logsList: Locator;\n readonly storesList: Locator;\n readonly gatherLogsText: Locator;\n readonly reconnectProvidersButton: Locator;\n readonly reconnectProvidersStatus: Locator;\n\n constructor(page: Page) {\n super(page);\n this.header = this.page.getByRole('region', { name: 'Header' });\n this.heading = this.header.getByRole('heading', { name: 'Troubleshooting' });\n this.tabs = this.page.getByRole('region', { name: 'Tabs' });\n this.tabContent = this.page.getByRole('region', { name: 'Tab Content' });\n // only available when specific tab is opened\n this.containerConnectionsStatus = this.tabContent.getByRole('status', { name: 'Container Connections' });\n this.storesStatus = this.tabContent.getByRole('status', { name: 'stores' });\n this.logsText = this.tabContent.getByText('Logs', { exact: true });\n this.gatherLogsText = this.tabContent.getByText('Gather Log Files');\n this.logsList = this.tabContent.getByRole('list', { name: 'logs', exact: true });\n this.storesList = this.tabContent.getByRole('list', { name: 'stores' });\n this.reconnectProvidersButton = this.tabContent.getByRole('button', { name: 'Reconnect providers' });\n this.reconnectProvidersStatus = this.tabContent.getByRole('status', { name: 'Reconnect Providers' });\n }\n\n public async openRepairConnections(): Promise<void> {\n await this.openTab('Repair & Connections');\n await playExpect(this.containerConnectionsStatus).toBeVisible();\n }\n\n public async openStores(): Promise<void> {\n await this.openTab('Stores');\n await playExpect(this.storesStatus).toBeVisible();\n }\n\n public async openLogs(): Promise<void> {\n await this.openTab('Logs');\n await playExpect(this.logsText).toBeVisible();\n }\n\n public async openGatherLogs(): Promise<void> {\n await this.openTab('Gather Logs');\n await playExpect(this.gatherLogsText).toBeVisible();\n }\n\n private async openTab(tabName: string): Promise<void> {\n const link = this.tabs.getByRole('link', { name: tabName, exact: true });\n await playExpect(link, `Tab Link ${tabName} is not visible`).toBeVisible();\n await link.click();\n }\n\n // return locator for better processing in playwright assertions\n public async getLogs(): Promise<Locator> {\n await this.openLogs();\n await playExpect(this.logsList).toBeVisible();\n return this.logsList;\n }\n\n public async refreshStore(storeName: string): Promise<void> {\n await this.openStores();\n const store = this.storesList.getByRole('listitem', { name: storeName });\n await playExpect(store).toBeVisible();\n await store.scrollIntoViewIfNeeded();\n const refreshButton = store.getByRole('button', { name: 'Refresh' });\n await playExpect(refreshButton).toBeEnabled();\n await refreshButton.click();\n }\n\n public async getContainerConnectionsStatus(): Promise<string> {\n await this.openRepairConnections();\n await playExpect(this.containerConnectionsStatus).toBeVisible();\n return await this.containerConnectionsStatus.innerText();\n }\n\n public async reconnectProviders(): Promise<string> {\n await this.openRepairConnections();\n await playExpect(this.reconnectProvidersButton).toBeEnabled();\n await this.reconnectProvidersButton.click();\n await playExpect(this.reconnectProvidersStatus).toBeVisible();\n return await this.reconnectProvidersStatus.innerText();\n }\n}\n"],"names":["removeFolderIfExists","path","existsSync","rmSync","setupCalled","setup","teardown","isLinux","os","isMac","isWindows","archType","isCI","ContainerState","PodState","VolumeState","ResourceElementState","KubernetesResourceState","ExtensionState","ImageState","TaskState","ResourceElementActions","PodmanKubePlayOptions","KubernetesResources","KubernetesResourceAttributes","PodmanVirtualizationProviders","PodmanVirtualizationProviderVariants","matchesProviderVariant","provider","value","variants","normalizedValue","variant","getProviderFromVariant","PodmanMachinePrivileges","ProxyTypes","BasePage","page","SettingsPage","tabName","CLIToolsPage","toolName","version","test","timeout","playExpect","confirmationDialog","handleConfirmationDialog","currentVersion","versionToSelect","waitUntil","versionSplitInParts","versionNumber","msg","ExperimentalPage","checkbox","enable","isEnabled","PreferencesPage","name","resetButton","appearancePreferenceRow","preferenceInput","selectionButton","option","pathToKube","RegistriesPage","url","username","pswd","title","newUsername","newPswd","registryBox","registryUsername","registryPswd","loginButton","dropdownMenu","err","ResourceCardPage","resourceName","ResourceConnectionCardPage","resourceElementVisibleName","operation","button","label","ResourcesPage","resourceCardAriaLabel","newResourceName","buttonName","SettingsBar","type","desiredPage","tab","href","DetailsPage","tabItem","CreateVolumePage","VolumesPage","MainPage","status","rows","filteredRows","rowNum","exact","locator","toggle","controlRow","checkboxColumnHeader","volumeName","volumeRow","VolumeDetailsPage","containerRowDeleteButton","waitWhile","deleteContainer","containers","NavigationBar","container","stopButton","error","deleteImage","images","row","deleteButton","deleteRegistry","failIfNotExist","registryPage","registryRecord","deletePod","pods","pod","deleteNetwork","networksPage","dialogTitle","confirm","confirmationButton","cancelButton","moreThanOneConsecutiveDialogs","dialog","doneButton","handleEditNetworkDialog","networkName","options","editDialog","inputFields","dnsServersToAddInput","dnsServersToRemoveInput","updateButton","deletePodmanMachine","machineVisibleName","RESOURCE_NAME","navigationBar","dashboardPage","resourcesPage","podmanResourceCard","ensurePodmanMachineStopped","currentStatus","stopPodmanMachineViaCLI","waitForPodmanMachineStoppedState","execSync","getVolumeNameForContainer","containerName","volumeSummaryContent","volumePage","i","volumeDetails","content","ensureCliInstalled","cliToolsPage","createPodmanMachineFromCLI","podmanMachineMode","userModeNetworking","deletePodmanMachineFromCLI","podmanMachineName","resetPodmanMachinesFromCLI","fillTextbox","textbox","text","runComposeUpFromCLI","composeFilePath","untagImagesFromPodman","tag","setDockerCompatibilityFeature","settingsBar","DCPreferencesLink","DCPreferencesPage","experimentalTitle","dockerCompatibilityCheckbox","DCSettingsLink","setStatusBarProvidersFeature","experimentalPage","isRootlessPodman","output","getPodmanVolumePath","fileName","relativePath","isRootless","readFileInVolumeFromCLI","fullPath","command","verifyVirtualizationProvider","resourceConnectionCardPage","virtualizationProvider","connectionTypeText","matchesVariant","verifyMachinePrivileges","machinePrivileges","parseVersion","part","compareVersions","current","reference","maxLength","currentPart","referencePart","getPodmanCliVersion","match","isPodmanCliVersionAtLeast","referenceVersion","currentVersionArray","referenceVersionArray","ArchitectureType","ImageEditPage","ImagesPage","DeployToKubernetesPage","useKubernetesServices","useRestrictedSecurityContext","useKubernetesIngress","containerExposedPort","isOpenShiftCluster","useOpenShiftRoutes","context","namespace","ContainerDetailsPage","currentState","state","ContainersPage","portsCell","RunImagePage","exposedPort","port","portMapping","customName","detailsPageLocator","heading","optionalParams","message","customPortMapping","hostPort","containerPort","ImageDetailsPage","outputPath","node","kebabMenuButton","pushToKindButton","pushToKindName","PullImagePage","imageName","fullImageName","searchForVersion","imageTag","resultsExpected","searchString","stringToAppend","resultList","resultRows","result","pattern","getExactButtonLocator","image","pullImagePage","oldname","newname","newtag","imageDetailsPage","containersParams","imageRow","BuildImagePage","archivePath","currentRows","count","manifestName","manifest","extendManifestButton","deleteManifestButton","pushManifestButton","locators","badge","containerFilePath","contextDirectory","cancelAfterTimeout","buttonText","archTypeButton","logs","logRows","logRow","architecture","PodmanKubePlayPage","jsonResourceDefinition","codeSection","pathToYaml","buildImage","errorMessage","PodsPage","PodDetailsPage","podRow","openPodDetailsButton","names","podName","environment","deployedContainerRow","CreatePodsPage","SelectImagePage","actionButton","containerRow","containerRowStartButton","containerRowStopButton","containerDetailsPage","DashboardPage","ExtensionDetailsPage","extensionName","disableBeforeRemove","ExtensionsPage","ExtensionCardPage","extensionLabel","extension","imageInput","installButton","extensionCard","KubernetesDashboardPage","namespaceLocator","currentResource","countLocator","countText","KubernetesResourceDetailsPage","textToBeChanged","newText","presentation","KubernetesResourcePage","attributeName","resourceType","attrIndex","resourceRow","resourceRowName","KubernetesBar","kubernetesResource","NetworkDetailsPage","NetworksPage","CreateNetworkPage","subnet","networkDeleteButton","networkUpdateButton","createNetworkPage","networkRow","networkRowNameCell","kubernetesBar","wait","waitFunction","until","diff","sendError","time","delay","ms","resolve","waitForPodmanMachineStartup","RunnerOptions","profile","customFolder","customOutputFolder","openDevTools","autoUpdate","autoCheckUpdates","extensionsDisabled","aiLabModelUploadDisabled","binaryPath","saveTracesOnPass","saveVideosOnPass","customSettings","Runner","runnerOptions","join","key","electron","filePath","app","data","filename","mainWindow","getState","video","pid","videoPath","elapsed","rawTracesPath","testStatus","tracesPath","fn","start","pdArgs","pdBinary","directory","tracesDir","env","recordVideo","args","executablePath","dir","settingsFile","parentDir","dirname","mkdirSync","settingsContent","writeFileSync","setupRegistry","registryUrl","ciDefault","tokenDef","pwsdDefault","registryPswdSecret","canTestRegistry","registry","passwd","findPageWithTitleInBrowser","browser","expectedTitle","pages","chromePage","p","performBrowserLogin","usernameAction","passwordAction","postLoginAction","startChromium","browserLaunch","chromium","getEntryFromLogs","filter","regex","lineContains","getEntryFromConsoleLogs","checkString","logLine","parsedString","urlMatch","handleCookies","iframTitle","checkLocatorExistence","CreateClusterBasePage","errorText","CreateKindClusterPage","clusterName","configFilePath","providerType","httpPort","httpsPort","useIngressController","containerImage","providerTypeButton","ResourceDetailsPage","TasksPage","taskName","taskRow","taskStatus","taskLink","deleteTaskButton","StatusBar","providerName","pin","barProviderButton","pinMenuProviderButton","providerTooltip","createKindCluster","statusBar","kindResourceCard","createKindClusterPage","deleteCluster","resourceCard","validateClusterResourcesDeletion","checkClusterResources","containersPage","volumesPage","volumeDetailsPage","resourceConnectionAction","expectedResourceState","resourceConnectionActionDetails","resourceDetailsPage","deleteClusterFromDetails","resourceDetails","WelcomePage","skipIfNotPresent","base","use","runner","welcomePage","deployContainerToCluster","kubernetesContext","deployedPodName","kubernetesPodsPage","createKubernetesResource","resourceYamlPath","kubectlApply","kubernetesResourcePage","deleteKubernetesResource","checkDeploymentReplicasInfo","expectedReplicaCount","kubernetesResourceDetails","summaryTab","checkKubernetesResourceState","editDeploymentYamlFile","deploymentName","currentReplicaCount","updatedReplicaCount","countKubernetesPodReplicas","deploymentsPage","deploymentDetails","expectedPodName","counter","configurePortForwarding","forwardButton","openInBrowserButton","removeConfigurationButton","verifyPortForwardingConfiguration","configurationName","localPort","remotePort","portForwardingPage","configurationRow","localPortCell","remotePortCell","verifyLocalPortResponse","forwardAddress","responseMessage","monitorPodStatusInClusterContainer","checkContourPodsInTerminal","envProvider","PROVIDER_MAP","getVirtualizationProvider","getDefaultVirtualizationProvider","minikubeExtension","podmanAILabExtension","extensionsPackExtension","bootcExtension","developerSandboxExtension","imageLayersExplorerExtension","podmanQuadletExtension","ssoExtension","openshiftCheckerExtension","openshiftLocalExtension","headlampExtension","composeExtension","dockerExtension","kindExtension","kubeContextExtension","kubectlCLIExtension","limaExtension","podmanExtension","registriesExtension","openshiftDockerExtension","extensionsBuiltInList","extensionsExternalList","extensionsInstallationSmokeList","extensionsAllExternalList","AuthenticationPage","CommandPalette","OnboardingPage","ComposeOnboardingPage","ComposeFailedPage","ComposeLocalInstallPage","ComposeVersionPage","versionInfoText","composeVersion","matches","ComposeWideInstallPage","DropdownComponent","ariaLabel","optionValue","optionText","displayText","optionButton","expanded","wasOpen","buttonTexts","expectedValue","expectedDisplayText","MachineCreationForm","machineName","isRootful","enableUserNet","startNow","desiredState","currentValue","availableOptions","matchingVariant","CreateMachinePage","setAsDefault","successfulCreationMessage","goBackToResourcesButton","connectionDialog","dialogMessage","handleButtonName","DockerCompatibilityPage","ExtensionCatalogCardPage","downloadButton","KubeContextPage","contextRow","switchButton","handleConfirmation","duplicateButton","newName","editButton","nameInput","saveButton","PodmanMachineDetails","PodmanOnboardingPage","ResourceCliCardPage","TroubleshootingPage","link","storeName","store","refreshButton"],"mappings":";;;;;;AAwBA,eAAsBA,GAAqBC,GAA6B;AACtE,UAAQ,IAAI,uBAAuBA,CAAI,EAAE,GAErCC,EAAWD,CAAI,MACjB,QAAQ,IAAI,2BAA2B,GACvCE,EAAOF,GAAM,EAAE,WAAW,IAAM,OAAO,IAAM,YAAY,GAAG;AAEhE;ACXA,IAAIG,KAAc;AAGlB,eAAsBC,KAAuB;AAC3C,EAAKD,OAIC,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,IAAI,qBAClC,MAAMJ,GAAqB,cAAc,IAEzC,QAAQ;AAAA,IACN;AAAA,EAAA,GAGJI,KAAc;A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