UNPKG

@awsui/components-react

Version:

AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A

62 lines (61 loc) 3.41 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.AttributeEditorRowWrapper = void 0; var selectors_1 = require("@awsui/test-utils-core/selectors"); var styles_selectors_js_1 = require("../../../attribute-editor/styles.selectors.js"); var styles_selectors_js_2 = require("../../../grid/styles.selectors.js"); var __1 = require(".."); var AttributeEditorRowWrapper = (function (_super) { __extends(AttributeEditorRowWrapper, _super); function AttributeEditorRowWrapper() { return _super !== null && _super.apply(this, arguments) || this; } AttributeEditorRowWrapper.prototype.findFields = function () { return this.findAllByClassName(styles_selectors_js_1.default.field).map(function (f) { return new __1.FormFieldWrapper(f.getElement()); }); }; AttributeEditorRowWrapper.prototype.findField = function (column) { return this.findComponent("." + styles_selectors_js_1.default['row-control'] + " > ." + styles_selectors_js_2.default.grid + " > ." + styles_selectors_js_2.default['grid-column'] + ":nth-child(" + column + ") > ." + styles_selectors_js_1.default.field, __1.FormFieldWrapper); }; AttributeEditorRowWrapper.prototype.findRemoveButton = function () { return this.findComponent("." + styles_selectors_js_1.default['remove-button'], __1.ButtonWrapper); }; return AttributeEditorRowWrapper; }(selectors_1.ElementWrapper)); exports.AttributeEditorRowWrapper = AttributeEditorRowWrapper; var AttributeEditorWrapper = (function (_super) { __extends(AttributeEditorWrapper, _super); function AttributeEditorWrapper() { return _super !== null && _super.apply(this, arguments) || this; } AttributeEditorWrapper.prototype.findEmptySlot = function () { return this.findByClassName(styles_selectors_js_1.default.empty); }; AttributeEditorWrapper.prototype.findRow = function (row) { return this.findComponent("." + styles_selectors_js_1.default.row + ":nth-child(" + row + ")", AttributeEditorRowWrapper); }; AttributeEditorWrapper.prototype.findRows = function () { return this.findAllByClassName(styles_selectors_js_1.default.row).map(function (i) { return new AttributeEditorRowWrapper(i.getElement()); }); }; AttributeEditorWrapper.prototype.findAddButton = function () { return this.findComponent("." + styles_selectors_js_1.default['add-button'], __1.ButtonWrapper); }; AttributeEditorWrapper.prototype.findAdditionalInfo = function () { return this.findByClassName(styles_selectors_js_1.default['additional-info']); }; AttributeEditorWrapper.rootSelector = styles_selectors_js_1.default.root; return AttributeEditorWrapper; }(selectors_1.ComponentWrapper)); exports.default = AttributeEditorWrapper;