@vibe/testkit
Version:
Vibe e2e testing toolkit
40 lines • 1.35 kB
TypeScript
import { Page, Locator } from "@playwright/test";
import { Button } from "./Button";
import { Menu } from "./Menu";
/**
* Class representing a menu button that extends the Button class.
*/
export declare class MenuButton extends Button {
button: Button;
menu: Menu;
/**
* Create a MenuButton.
* @param {Page} page - The Playwright page object.
* @param {Locator} locator - The locator for the MenuButton element.
* @param {string} elementReportName - The name for reporting purposes.
* @param {any} menuType - The type of menu associated with the button.
*/
constructor(page: Page, locator: Locator, elementReportName: string, menuType: Menu);
/**
* Select an item from the menu.
* @param {string} item - The item to select.
* @returns {Promise<void>}
*/
selectItem(item: string): Promise<void>;
/**
* Open the menu if it is not already expanded.
* @returns {Promise<void>}
*/
openMenu(): Promise<void>;
/**
* Close the menu if it is currently expanded.
* @returns {Promise<void>}
*/
closeMenu(): Promise<void>;
/**
* Check if the menu is expanded.
* @returns {Promise<boolean>} True if the menu is expanded, false otherwise.
*/
isExpanded(): Promise<boolean>;
}
//# sourceMappingURL=MenuButton.d.ts.map