UNPKG

idea-at

Version:

Automated Testing suite for IDEA projects

74 lines (73 loc) 3.68 kB
import { Locator, Page } from '@playwright/test'; /** * Gets an ion-input element by its test ID * @param page - The Playwright Page object * @param testId - The test ID value to search for * @param testIdAttribute - The attribute name used for test IDs (defaults to 'testId') * @returns Locator for the input element inside the ion-input */ export declare const getIonInputByTestId: (page: Page, testId: string, testIdAttribute?: string) => Locator; /** * Gets an ion-button element that contains an ion-icon with the specified icon name * @param page - The Playwright Page object * @param icon - The icon name to search for (matches either icon or name attribute) * @returns Locator for the ion-button element containing the specified icon */ export declare const getIonButtonByIcon: (page: Page, icon: string) => Locator; /** * Gets the input element within an ion-searchbar component * @param page - The Playwright Page object * @returns Locator for the input element inside the ion-searchbar */ export declare const getIonSearchbarInput: (page: Page) => Locator; /** * Gets the count of ion-item elements within an ion-list * @param page - The Playwright Page object * @param timeout - Maximum time in ms to wait for items to appear (defaults to 10000) * @returns Promise that resolves to the number of ion-items found */ export declare const getItemCountInIonList: (page: Page, timeout?: number) => Promise<number>; /** * Selects an ion-item element in an ion-list by matching its text content * @param page - The Playwright Page object * @param text - The text content to search for within the ion-item * @param timeout - Maximum time in ms to wait for items to appear (defaults to 10000) * @returns Promise that resolves when the item is clicked */ export declare const selectItemInListByText: (page: Page, text: string, timeout?: number) => Promise<void>; /** * Clicks on an ion-select element and selects an option by its text content * @param page - The Playwright Page object * @param input - Locator for the ion-select element to click * @param text - The text content of the option to select * @returns Promise that resolves when the option is selected */ export declare const clickOnIonSelectByText: (page: Page, input: Locator, text: string) => Promise<void>; /** * Clicks on a button within an ion-alert dialog by matching its text content * @param page - The Playwright Page object * @param text - The text content of the button to click * @returns Promise that resolves when the button is clicked */ export declare const clickOnIonAlertButtonByText: (page: Page, text: string) => Promise<void>; /** * Checks for the presence and subsequent hiding of a loading spinner element * @param page - The Playwright Page object * @param timeout - Maximum time in ms to wait for spinner to hide (defaults to 29000) * @returns Promise that resolves when spinner is hidden */ export declare const checkLoadingSpinner: (page: Page, timeout?: number) => Promise<void>; /** * Checks for the presence of a success toast message on the page * @param page - The Playwright Page object * @returns Promise that resolves when success toast is visible */ export declare const expectSuccessMessage: (page: Page) => Promise<void>; /** * Checks that no error toast message is visible on the page * @param page - The Playwright Page object * @param timeout - Maximum time in ms to wait for error toast (defaults to 1000); * must be small, to avoid the message to disappear normally * @returns Promise that resolves if no error toast is found */ export declare const failIfErrorMessage: (page: Page, timeout?: number) => Promise<void>;