@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
44 lines • 2.34 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChartPopoverSeriesWrapper = exports.ChartPopoverSeriesItemWrapper = void 0;
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
const selectors_1 = require("@awsui/test-utils-core/selectors");
const button_1 = require("../button");
const styles_selectors_js_1 = require("../../../expandable-section/styles.selectors.js");
const styles_selectors_js_2 = require("../../../internal/components/chart-popover/styles.selectors.js");
const styles_selectors_js_3 = require("../../../internal/components/chart-series-details/styles.selectors.js");
const styles_selectors_js_4 = require("../../../popover/styles.selectors.js");
class ChartPopoverSeriesItemWrapper extends selectors_1.ComponentWrapper {
findKey() {
// If a series has sub-items and is expandable, the key will be inside the header of an expandable section.
return (this.findByClassName(styles_selectors_js_1.default['header-text']) || this.findByClassName(styles_selectors_js_3.default.key));
}
findValue() {
return this.findByClassName(styles_selectors_js_3.default.value);
}
}
exports.ChartPopoverSeriesItemWrapper = ChartPopoverSeriesItemWrapper;
class ChartPopoverSeriesWrapper extends ChartPopoverSeriesItemWrapper {
findSubItems() {
return this.findAll(`.${styles_selectors_js_3.default['inner-list-item']}`).map(wrapper => new ChartPopoverSeriesItemWrapper(wrapper.getElement()));
}
}
exports.ChartPopoverSeriesWrapper = ChartPopoverSeriesWrapper;
class ChartPopoverWrapper extends selectors_1.ComponentWrapper {
findHeader() {
return this.findByClassName(styles_selectors_js_4.default.header);
}
findContent() {
return this.findByClassName(styles_selectors_js_4.default.content);
}
findDismissButton() {
return this.findComponent(`.${styles_selectors_js_4.default['dismiss-control']}`, button_1.default);
}
findSeries() {
return this.findAll(`.${styles_selectors_js_3.default['list-item']}`).map(wrapper => new ChartPopoverSeriesWrapper(wrapper.getElement()));
}
}
ChartPopoverWrapper.rootSelector = styles_selectors_js_2.default.root;
exports.default = ChartPopoverWrapper;
//# sourceMappingURL=chart-popover.js.map