import { Locator, Page } from '@playwright/test'; /** * Reusable dropdown component for consistent dropdown interactions across the test suite. * Handles the standard dropdown pattern used in Podman Desktop UI based on the Dropdown.svelte component. * * This component encapsulates the proper interaction patterns for dropdowns that follow the structure: * - Container with aria-label * - Button for triggering dropdown open/close * - Hidden input that holds the actual selected value * - Options list that appears when opened */ export declare class DropdownComponent { private readonly page; private readonly containerLocator; private readonly triggerButton; private readonly hiddenInput; private readonly ariaLabel; /** * Creates a new DropdownComponent instance * @param page - The Playwright page object * @param ariaLabel - The aria-label used to identify the dropdown container */ constructor(page: Page, ariaLabel: string); /** * Get the currently selected value from the dropdown's hidden input * @returns The current value stored in the hidden input */ getCurrentValue(): Promise; /** * Get the currently displayed text (what the user sees on the trigger button) * @returns The display text shown on the dropdown trigger */ getCurrentDisplayText(): Promise; /** * Select an option from the dropdown * @param optionValue - The value to select (used for verification) * @param optionText - The text to match when finding the option button (defaults to optionValue) * @param exact - Whether to use exact text matching (defaults to false for case-insensitive matching) */ selectOption(optionValue: string, optionText?: string, exact?: boolean): Promise; /** * Check if the dropdown is currently open using ARIA semantics with fallback * @returns True if the dropdown options are visible */ isOpen(): Promise; /** * Get all available options from the dropdown * Note: This will open and close the dropdown to retrieve options * @returns Array of option texts available in the dropdown */ getAvailableOptions(): Promise; /** * Verify the dropdown is in the expected state * @param expectedValue - The expected value in the hidden input * @param expectedDisplayText - Optional expected display text on the trigger button */ verifyState(expectedValue: string, expectedDisplayText?: string): Promise; /** * Wait for the dropdown to be ready for interaction * @param timeout - Maximum time to wait in milliseconds */ waitForReady(timeout?: number): Promise; /** * Get the dropdown container locator for advanced operations * @returns The container locator for this dropdown */ getContainer(): Locator; /** * Get the trigger button locator for advanced operations * @returns The trigger button locator for this dropdown */ getTriggerButton(): Locator; /** * Get the hidden input locator for advanced operations * @returns The hidden input locator for this dropdown */ getHiddenInput(): Locator; }