import { Locator, Page } from '@playwright/test'; import { PodmanVirtualizationProviders, PodmanMachinePrivileges } from '../model/core/types'; import { DashboardPage } from '../model/pages/dashboard-page'; import { ResourceConnectionCardPage } from '../model/pages/resource-connection-card-page'; import { NavigationBar } from '../model/workbench/navigation'; /** * Stop and delete container defined by its name * @param page playwright's page object * @param name name of container to be removed */ export declare function deleteContainer(page: Page, name: string): Promise; /** * Delete image defined by its name * @param page playwright's page object * @param name name of image to be removed */ export declare function deleteImage(page: Page, name: string): Promise; export declare function deleteRegistry(page: Page, name: string, failIfNotExist?: boolean): Promise; export declare function createRegistryAndVerify(page: Page, url: string, username: string, pswd: string, registryLabel: string, handleUntrustedCert?: boolean): Promise; export declare function removeRegistryAndVerify(page: Page, registryLabel: string, username: string): Promise; export declare function pushImageExpectFailure(page: Page, pushButton: Locator): Promise; export declare function deletePod(page: Page, name: string, timeout?: number): Promise; /** * Delete network defined by its name * @param page playwright's page object * @param name name of network to be removed */ export declare function deleteNetwork(page: Page, name: string): Promise; export declare function handleConfirmationDialog(page: Page, dialogTitle: string, confirm?: boolean, confirmationButton?: string, cancelButton?: string, timeout?: number, moreThanOneConsecutiveDialogs?: boolean): Promise; /** * Handles the Update Network dialog by filling DNS server fields and clicking Cancel or Update button. * @param page playwright's page object * @param networkName name of the network being updated * @param options optional configuration for DNS servers and action */ export declare function handleEditNetworkDialog(page: Page, networkName: string, options?: { dnsServersToAdd?: string; dnsServersToRemove?: string; action?: 'Cancel' | 'Update'; }): Promise; /** * Async function that stops and deletes Podman Machine through Settings -> Resources page * @param page playwright's page object * @param machineVisibleName Name of the Podman Machine to delete */ export declare function deletePodmanMachine(page: Page, machineVisibleName: string): Promise; export declare function getVolumeNameForContainer(page: Page, containerName: string): Promise; export declare function ensureCliInstalled(page: Page, resourceName: string, timeout?: number): Promise; export declare function createPodmanMachineFromCLI(): Promise; export declare function deletePodmanMachineFromCLI(podmanMachineName: string): Promise; export declare function resetPodmanMachinesFromCLI(): Promise; export declare function fillTextbox(textbox: Locator, text: string): Promise; export declare function runComposeUpFromCLI(composeFilePath: string): Promise; export declare function removeAllImagesCLI(engine?: 'podman' | 'docker', timeout?: number): Promise; export declare function ensureNoImagesPresentCLI(page: Page): Promise; export declare function untagImagesFromPodman(name: string, tag?: string): Promise; export declare function setDockerCompatibilityFeature(page: Page, enable: boolean): Promise; export declare function setStatusBarProvidersFeature(page: Page, navigationBar: NavigationBar, enable: boolean): Promise; export declare function setEnhancedDashboardFeature(page: Page, navigationBar: NavigationBar, enable: boolean): Promise; export declare function waitForDashboardState(navigationBar: NavigationBar, enable: boolean): Promise; export declare function readFileInVolumeFromCLI(volumeName: string, fileName: string): Promise; /** * Verifies that a Podman machine has the specified virtualization provider type. * This method checks that the machine card exists and displays the correct connection type. * * @param resourceConnectionCardPage - The resource connection card page to verify * @param virtualizationProvider - The expected virtualization provider type (e.g., PodmanVirtualizationProviders.WSL, PodmanVirtualizationProviders.HyperV...) * @returns A Promise that resolves when the verification is complete * @throws Will throw an error if the expected virtualization provider is not found or doesn't match */ export declare function verifyVirtualizationProvider(resourceConnectionCardPage: ResourceConnectionCardPage, virtualizationProvider: PodmanVirtualizationProviders): Promise; /** * Verifies that a Podman machine has the specified machine privileges (rootful or rootless). * This method checks that the machine card exists and displays the correct machine privileges. * * @param resourceConnectionCardPage - The resource connection card page to verify * @param machinePrivileges - The expected machine privileges (e.g., PodmanMachinePrivileges.Rootful, PodmanMachinePrivileges.Rootless) * @returns A Promise that resolves when the verification is complete * @throws Will throw an error if the expected machine privileges are not found or doesn't match */ export declare function verifyMachinePrivileges(resourceConnectionCardPage: ResourceConnectionCardPage, machinePrivileges: PodmanMachinePrivileges): Promise; /** * Gets the current Podman CLI version by running `podman -v`. * @returns The version string (e.g., "5.7.0") * @throws Error if the version cannot be determined */ export declare function getPodmanCliVersion(): string; /** * Checks if the installed Podman CLI version is equal to or greater than the reference version. * @param referenceVersion - The minimum required version (e.g., "5.7.0", "5.7", "6.0") * @returns true if the installed version is >= the reference version, false if podman is not available or version cannot be determined */ export declare function isPodmanCliVersionAtLeast(referenceVersion: string): boolean;