UNPKG

@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

70 lines 3.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const input_1 = require("../input"); const dropdown_host_1 = require("../internal/dropdown-host"); const token_group_1 = require("../token-group"); const styles_selectors_js_1 = require("../../../input/styles.selectors.js"); const styles_selectors_js_2 = require("../../../internal/components/button-trigger/styles.selectors.js"); const styles_selectors_js_3 = require("../../../internal/components/dropdown-status/styles.selectors.js"); const styles_selectors_js_4 = require("../../../internal/components/dropdown-status/styles.selectors.js"); const styles_selectors_js_5 = require("../../../multiselect/styles.selectors.js"); const styles_selectors_js_6 = require("../../../token-group/styles.selectors.js"); class MultiselectWrapper extends dropdown_host_1.default { /** * @param options * * expandToViewport (boolean) - Use this when the component under test is rendered with an `expandToViewport` flag. */ findErrorRecoveryButton(options = { expandToViewport: false }) { return this.findDropdown(options).findByClassName(styles_selectors_js_4.default.recovery); } /** * Returns the input that is used for filtering. * @param options * * expandToViewport (boolean) - Use this when the component under test is rendered with an `expandToViewport` flag. */ findFilteringInput(options = { expandToViewport: false }) { return this.findDropdown(options).findComponent(`.${styles_selectors_js_1.default['input-container']}`, input_1.default); } findPlaceholder() { return this.findByClassName(styles_selectors_js_2.default.placeholder); } /** * @param options * * expandToViewport (boolean) - Use this when the component under test is rendered with an `expandToViewport` flag. */ findStatusIndicator(options = { expandToViewport: false }) { return this.findDropdown(options).findByClassName(styles_selectors_js_3.default.root); } /** * Returns a token. * * @param tokenIndex 1-based index of the token to return */ findToken(tokenIndex) { const tokenGroup = this.findComponent(`.${styles_selectors_js_6.default.root}`, token_group_1.default); return tokenGroup.findToken(tokenIndex); } /** * Returns a token toggle button. */ findTokenToggle() { const tokenGroup = this.findComponent(`.${styles_selectors_js_6.default.root}`, token_group_1.default); return tokenGroup.findTokenToggle(); } findTokens() { const tokenGroup = this.findComponent(`.${styles_selectors_js_6.default.root}`, token_group_1.default); return (tokenGroup === null || tokenGroup === void 0 ? void 0 : tokenGroup.findTokens()) || []; } findTrigger() { return this.findByClassName(styles_selectors_js_2.default['button-trigger']); } } exports.default = MultiselectWrapper; MultiselectWrapper.rootSelector = styles_selectors_js_5.default.root; //# sourceMappingURL=index.js.map