declare global { namespace Cypress { interface Chainable { /** * Types a value into a ui5-webcomponent that offers a typeable input field. * * @param {string} text Text that will be typed into the input. * @example cy.get('[ui5-input]').typeIntoUi5Input('Hello World'); */ typeIntoUi5Input(text: string, options?: Partial): Chainable; /** * Clears a value from ui5-webcomponent that offers a typeable input field. * * @example cy.get('[ui5-input]').clearUi5Input(); */ clearUi5Input(options?: Partial): Chainable; /** * Types a value with a delay into an ui5-webcomponent that offers a typeable input field. * * __Note:__ Use this command if you render a component that should show suggestions while typing (e.g. `ComboBox`) but the corresponding popover does not open. * This command waits for the appropriate delay (in ms), giving the web component time to define all necessary customElements and boot web components. * The delay time can vary from environment to environment. * * @param {string} text Text that will be typed into the input. * @param {number} [delay=500] Delay in ms to wait for the web-component to be ready. Default: 500 * @example cy.get('[ui5-combobox]').typeIntoUi5InputWithDelay('Hello World', 1000); */ typeIntoUi5InputWithDelay(text: string, delay?: number, options?: Partial): Chainable; /** * Types a value into `ui5-textarea`. * @param {string} text Text that will be typed into the text-area. * @example cy.get('[ui5-textarea]').typeIntoUi5TextArea('Hello World'); */ typeIntoUi5TextArea(text: string, options?: Partial): Chainable; /** * Toggles the state of a `ui5-checkbox`. * @example cy.get('[ui5-checkbox]').toggleUi5Checkbox(); */ toggleUi5Checkbox(): Chainable; /** * Toggles the state of a `ui5-switch` * @example cy.get('[ui5-switch]').toggleUi5Switch(); */ toggleUi5Switch(): Chainable; /** * Click on a `ui5-radio-button` * @example cy.get('[ui5-radio-button]').clickUi5RadioButton(); */ clickUi5RadioButton(): Chainable; /** * Close ui5-webcomponents popups like `ui5-dialog` or `ui5-popover` by pressing the "Escape" key. * @example cy.closeUi5PopupWithEsc() */ closeUi5PopupWithEsc(): Chainable; /** * Click on a list item of the `ui5-list` component by text. * * __Note:__ Chaining this command to a `ui5-list` selector is recommended. * * @param {string} text The text of the list item that should be clicked. * @param {Partial} [options] ClickOptions (without `force`) * @example * cy.get('[ui5-list]').clickUi5ListItemByText("List Item") * cy.clickUi5ListItemByText("List Item") */ clickUi5ListItemByText(text: string, options?: Partial>): Chainable; /** * Click on an `ui5-option` of the `ui5-select` component by text. * * __Note:__ The select popover must be visible, otherwise it can lead to unwanted side effects. * * @param text text of the ui5-option that should be clicked * @param options ClickOptions * * @deprecated This command is deprecated. Please use `clickDropdownMenuItemByText` instead. * * @example cy.get('[ui5-select]').clickUi5SelectOptionByText('Option2'); */ clickUi5SelectOptionByText(text: string, options?: Partial): Chainable; /** * Click on chained `ui5-option`. * * __Note:__ The select popover must be visible, otherwise it can lead to unwanted side effects. * * @deprecated This command is deprecated. Please use `clickDropdownMenuItem` instead. * * @example cy.get('[ui5-option]').clickUi5SelectOption(); */ clickUi5SelectOption(options?: Partial): Chainable; /** * Click on an option of "select-like" components by text. * Currently supported components: `ui5-select`, `ui5-combobox` and `ui5-multi-combobox`. * * __Note:__ The popover must be visible, otherwise it can lead to unwanted side effects. * * __Note:__ `ui5-select` currently does not support `cy.click()` on `ui5-options` (or elements in the shadow root). * Instead, the `ui5-option` is selected via an "Enter" press (`.trigger`). * Therefore, for `ui5-select`, the `options` parameter only accepts `TriggerOptions`. * * @param text The text of the item inside the popover that should be clicked. * @param options Default:`Cypress.ClickOptions`. For `ui5-select`, use `Cypress.TriggerOptions` (you can use the generic type to adjust accordingly). * * @example * cy.get('[ui5-select]').clickDropdownMenuItemByText('Option2'); * cy.get('[ui5-multi-combobox]').clickDropdownMenuItemByText('Option2'); * */ clickDropdownMenuItemByText(text: string, options?: Partial): Chainable; /** * Click on a chained option of "select-like" components. * Currently supported components: `ui5-option`, `ui5-mcb-item` and `ui5-cb-item` (since v1.24.3 of `@ui5/webcomponents`). * * __Note:__ The popover must be visible, otherwise it can lead to unwanted side effects. * * __Note:__ `ui5-select` currently does not support `cy.click()` on `ui5-options` (or elements in the shadow root). * Instead, the `ui5-option` is selected via an "Enter" press (`.trigger`). * Therefore, for `ui5-option`, the `options` parameter only accepts `TriggerOptions`. * * @param options Default: `Cypress.ClickOptions`. For `ui5-option`, use `Cypress.TriggerOptions` (you can use the generic type to adjust accordingly). * * @example * cy.get('[ui5-option]').clickDropdownMenuItem(); * cy.get('[ui5-mcb-item]').clickDropdownMenuItem(); */ clickDropdownMenuItem(options?: Partial): Chainable; /** * Click on the open button in "select-like" components to open the popover. Currently supported components are `ui5-select`, `ui5-combobox` and `ui5-multi-combobox`. * * @example cy.get('[ui5-select]').openDropDownByClick(); */ openDropDownByClick(options?: Partial): Chainable; } } } export {};