@awsui/components-react
Version:
On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en
45 lines (44 loc) • 2.09 kB
TypeScript
import { ComponentWrapper, ElementWrapper } from '@awsui/test-utils-core/dom';
import ButtonWrapper from '../button/index.js';
export default class ButtonDropdownWrapper extends ComponentWrapper {
static rootSelector: string;
findNativeButton(): ElementWrapper<HTMLButtonElement>;
findTriggerButton(): ButtonWrapper | null;
findMainAction(): null | ButtonWrapper;
findOpenDropdown(): ElementWrapper | null;
/**
* Finds an item in the open dropdown by item id. Returns null if there is no open dropdown.
*
* This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
*/
findItemById(id: string): ElementWrapper | null;
/**
* Finds `checked` value of item in the open dropdown by item id. Returns null if there is no open dropdown or the item is not a checkbox item.
*
* This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
*/
findItemCheckedById(id: string): string | null;
/**
* Finds an expandable category in the open dropdown by category id. Returns null if there is no open dropdown.
*
* This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
*/
findExpandableCategoryById(id: string): ElementWrapper | null;
/**
* Finds the highlighted item in the open dropdown. Returns null if there is no open dropdown.
*
* This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
*/
findHighlightedItem(): ElementWrapper | null;
/**
* Finds all the items in the open dropdown. Returns empty array if there is no open dropdown.
*
* This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
*/
findItems(): Array<ElementWrapper>;
/**
* Finds the disabled reason tooltip for a dropdown item. Returns null if no disabled item with `disabledReason` is highlighted.
*/
findDisabledReason(): ElementWrapper | null;
openDropdown(): void;
}