@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
54 lines • 2.3 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
const dom_1 = require("@awsui/test-utils-core/dom");
const button_1 = require("../button");
const styles_selectors_js_1 = require("../../../split-panel/test-classes/styles.selectors.js");
class SplitPanelWrapper extends dom_1.ComponentWrapper {
findHeader() {
return this.find(`.${styles_selectors_js_1.default['header-text']}`);
}
findPreferencesButton() {
return this.findComponent(`.${styles_selectors_js_1.default['preferences-button']}`, button_1.default);
}
findCloseButton() {
return this.findComponent(`.${styles_selectors_js_1.default['close-button']}`, button_1.default);
}
findOpenButton() {
const wrapper = (0, dom_1.createWrapper)();
return wrapper.findComponent(`.${styles_selectors_js_1.default['open-button']}`, button_1.default);
}
findSlider() {
return this.findByClassName(styles_selectors_js_1.default.slider);
}
findHeaderActions() {
return this.findByClassName(styles_selectors_js_1.default['header-actions']);
}
findHeaderBefore() {
return this.findByClassName(styles_selectors_js_1.default['header-before']);
}
findHeaderDescription() {
return this.findByClassName(styles_selectors_js_1.default['header-description']);
}
findHeaderInfo() {
return this.findByClassName(styles_selectors_js_1.default['header-info']);
}
/**
* Returns the same panel if it's currently open in bottom position. If not, it returns null.
* Use this method to assert the panel position.
*/
findOpenPanelBottom() {
return this.matches(`.${styles_selectors_js_1.default['open-position-bottom']}`);
}
/**
* Returns the same panel if it's currently open in side position. If not, it returns null.
* Use this method to assert the panel position.
*/
findOpenPanelSide() {
return this.matches(`.${styles_selectors_js_1.default['open-position-side']}`);
}
}
SplitPanelWrapper.rootSelector = styles_selectors_js_1.default.root;
exports.default = SplitPanelWrapper;
//# sourceMappingURL=index.js.map