@skbkontur/playwright-react-ui-components 1.13.1 → 1.14.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/assertions/AutocompleteAssertions.js +10 -10
- package/build/src/assertions/BaseComponentAssertions.js +11 -11
- package/build/src/assertions/ButtonAssertions.js +9 -9
- package/build/src/assertions/CheckboxAssertions.js +13 -13
- package/build/src/assertions/ComboBoxAssertions.js +17 -111
- package/build/src/assertions/ComponentListAssertions.js +6 -6
- package/build/src/assertions/CurrencyInputAssertions.js +11 -61
- package/build/src/assertions/DateInputAssertions.js +9 -9
- package/build/src/assertions/DatePickerAssertions.js +9 -9
- package/build/src/assertions/DateRangePickerAssertions.js +4 -25
- package/build/src/assertions/DropdownAssertions.js +13 -63
- package/build/src/assertions/DropdownMenuAssertions.js +11 -61
- package/build/src/assertions/FileUploaderAssertions.d.ts +1 -3
- package/build/src/assertions/FileUploaderAssertions.js +5 -22
- package/build/src/assertions/FxInputAssertions.js +11 -14
- package/build/src/assertions/InputAssertions.js +10 -10
- package/build/src/assertions/KebabAssertions.js +7 -58
- package/build/src/assertions/LabelAssertions.js +7 -7
- package/build/src/assertions/LinkAssertions.js +11 -12
- package/build/src/assertions/LoaderAssertions.js +2 -2
- package/build/src/assertions/MenuItemAssertations.js +5 -5
- package/build/src/assertions/PagingAssertions.js +5 -40
- package/build/src/assertions/PortalAssertions.js +3 -3
- package/build/src/assertions/RadioAssertions.js +13 -13
- package/build/src/assertions/RadioGroupAssertions.js +10 -81
- package/build/src/assertions/SelectAssertions.js +15 -64
- package/build/src/assertions/SpinnerAssertions.js +2 -2
- package/build/src/assertions/TabAssertions.js +11 -12
- package/build/src/assertions/TabsAssertions.js +4 -32
- package/build/src/assertions/TextareaAssertions.js +9 -9
- package/build/src/assertions/ToastAssertions.js +2 -2
- package/build/src/assertions/ToggleAssertions.js +11 -11
- package/build/src/assertions/TokenAssertions.js +8 -14
- package/build/src/assertions/TokenInputAssertions.js +8 -28
- package/build/src/assertions/TooltipAssertions.js +5 -5
- package/build/src/components/Autocomplete.d.ts +4 -0
- package/build/src/components/Autocomplete.js +52 -50
- package/build/src/components/BaseComponent.d.ts +4 -0
- package/build/src/components/BaseComponent.js +37 -30
- package/build/src/components/Button.d.ts +4 -0
- package/build/src/components/Button.js +25 -19
- package/build/src/components/Checkbox.d.ts +6 -0
- package/build/src/components/Checkbox.js +28 -36
- package/build/src/components/ComboBox.d.ts +9 -2
- package/build/src/components/ComboBox.js +68 -54
- package/build/src/components/ComponentList.d.ts +25 -3
- package/build/src/components/ComponentList.js +58 -50
- package/build/src/components/CurrencyInput.d.ts +4 -0
- package/build/src/components/CurrencyInput.js +39 -37
- package/build/src/components/DateInput.d.ts +4 -0
- package/build/src/components/DateInput.js +34 -32
- package/build/src/components/DatePicker.d.ts +4 -0
- package/build/src/components/DatePicker.js +35 -33
- package/build/src/components/DateRangePicker.d.ts +2 -0
- package/build/src/components/DateRangePicker.js +14 -10
- package/build/src/components/Dropdown.d.ts +8 -2
- package/build/src/components/Dropdown.js +69 -65
- package/build/src/components/DropdownMenu.d.ts +7 -2
- package/build/src/components/DropdownMenu.js +68 -65
- package/build/src/components/FileUploader.d.ts +3 -1
- package/build/src/components/FileUploader.js +39 -39
- package/build/src/components/FxInput.d.ts +4 -0
- package/build/src/components/FxInput.js +44 -42
- package/build/src/components/Input.d.ts +4 -0
- package/build/src/components/Input.js +37 -35
- package/build/src/components/Kebab.d.ts +6 -2
- package/build/src/components/Kebab.js +50 -48
- package/build/src/components/Label.d.ts +2 -0
- package/build/src/components/Label.js +9 -13
- package/build/src/components/Link.d.ts +4 -0
- package/build/src/components/Link.js +19 -25
- package/build/src/components/Loader.d.ts +2 -0
- package/build/src/components/Loader.js +15 -10
- package/build/src/components/MenuComponent.d.ts +9 -0
- package/build/src/components/MenuComponent.js +78 -0
- package/build/src/components/MenuItem.d.ts +2 -0
- package/build/src/components/MenuItem.js +7 -3
- package/build/src/components/Paging.d.ts +2 -0
- package/build/src/components/Paging.js +59 -52
- package/build/src/components/Portal.d.ts +2 -0
- package/build/src/components/Portal.js +14 -10
- package/build/src/components/Radio.d.ts +6 -0
- package/build/src/components/Radio.js +31 -27
- package/build/src/components/RadioGroup.d.ts +2 -0
- package/build/src/components/RadioGroup.js +51 -47
- package/build/src/components/Select.d.ts +5 -0
- package/build/src/components/Select.js +92 -76
- package/build/src/components/Spinner.d.ts +2 -0
- package/build/src/components/Spinner.js +13 -9
- package/build/src/components/Tab.d.ts +4 -0
- package/build/src/components/Tab.js +17 -27
- package/build/src/components/Textarea.d.ts +4 -0
- package/build/src/components/Textarea.js +33 -39
- package/build/src/components/Toast.d.ts +2 -0
- package/build/src/components/Toast.js +7 -3
- package/build/src/components/Toggle.d.ts +5 -0
- package/build/src/components/Toggle.js +24 -33
- package/build/src/components/Token.d.ts +3 -0
- package/build/src/components/Token.js +14 -9
- package/build/src/components/TokenInput.d.ts +4 -0
- package/build/src/components/TokenInput.js +61 -59
- package/build/src/components/Tooltip.d.ts +2 -0
- package/build/src/components/Tooltip.js +9 -9
- package/build/src/components/index.d.ts +1 -0
- package/build/src/components/index.js +3 -1
- package/build/src/extensions/index.d.ts +1 -0
- package/build/src/extensions/index.js +17 -0
- package/build/src/extensions/mergedExpects.d.ts +5 -0
- package/build/src/extensions/mergedExpects.js +7 -0
- package/build/src/index.d.ts +2 -0
- package/build/src/index.js +2 -0
- package/build/src/matchers/component/LocatorSymbols.d.ts +43 -0
- package/build/src/matchers/component/LocatorSymbols.js +13 -0
- package/build/src/matchers/component/toBeActiveEx.d.ts +3 -0
- package/build/src/matchers/component/toBeActiveEx.js +56 -0
- package/build/src/matchers/component/toBeAutoEx.d.ts +3 -0
- package/build/src/matchers/component/toBeAutoEx.js +62 -0
- package/build/src/matchers/component/toBeCheckedByIndexEx.d.ts +3 -0
- package/build/src/matchers/component/toBeCheckedByIndexEx.js +62 -0
- package/build/src/matchers/component/toBeCheckedByTextEx.d.ts +3 -0
- package/build/src/matchers/component/toBeCheckedByTextEx.js +62 -0
- package/build/src/matchers/component/toBeCheckedByValueEx.d.ts +3 -0
- package/build/src/matchers/component/toBeCheckedByValueEx.js +62 -0
- package/build/src/matchers/component/toBeCheckedEx.d.ts +3 -0
- package/build/src/matchers/component/toBeCheckedEx.js +56 -0
- package/build/src/matchers/component/toBeDisabledEx.d.ts +3 -0
- package/build/src/matchers/component/toBeDisabledEx.js +172 -0
- package/build/src/matchers/component/toBeEmptyEx.d.ts +3 -0
- package/build/src/matchers/component/toBeEmptyEx.js +137 -0
- package/build/src/matchers/component/toBeEnabledEx.d.ts +3 -0
- package/build/src/matchers/component/toBeEnabledEx.js +206 -0
- package/build/src/matchers/component/toBeFocusedEx.d.ts +3 -0
- package/build/src/matchers/component/toBeFocusedEx.js +56 -0
- package/build/src/matchers/component/toBeHiddenEx.d.ts +3 -0
- package/build/src/matchers/component/toBeHiddenEx.js +68 -0
- package/build/src/matchers/component/toBeInactiveEx.d.ts +3 -0
- package/build/src/matchers/component/toBeInactiveEx.js +56 -0
- package/build/src/matchers/component/toBeUncheckedByIndexEx.d.ts +3 -0
- package/build/src/matchers/component/toBeUncheckedByIndexEx.js +62 -0
- package/build/src/matchers/component/toBeUncheckedByTextEx.d.ts +3 -0
- package/build/src/matchers/component/toBeUncheckedByTextEx.js +57 -0
- package/build/src/matchers/component/toBeUncheckedByValueEx.d.ts +3 -0
- package/build/src/matchers/component/toBeUncheckedByValueEx.js +57 -0
- package/build/src/matchers/component/toBeUncheckedEx.d.ts +3 -0
- package/build/src/matchers/component/toBeUncheckedEx.js +56 -0
- package/build/src/matchers/component/toBeVisibleEx.d.ts +3 -0
- package/build/src/matchers/component/toBeVisibleEx.js +68 -0
- package/build/src/matchers/component/toContainFormattedTextEx.d.ts +3 -0
- package/build/src/matchers/component/toContainFormattedTextEx.js +55 -0
- package/build/src/matchers/component/toContainItemEx.d.ts +4 -0
- package/build/src/matchers/component/toContainItemEx.js +79 -0
- package/build/src/matchers/component/toContainItemsEx.d.ts +3 -0
- package/build/src/matchers/component/toContainItemsEx.js +63 -0
- package/build/src/matchers/component/toContainTabsEx.d.ts +3 -0
- package/build/src/matchers/component/toContainTabsEx.js +80 -0
- package/build/src/matchers/component/toContainTextEx.d.ts +3 -0
- package/build/src/matchers/component/toContainTextEx.js +56 -0
- package/build/src/matchers/component/toContainTokensEx.d.ts +4 -0
- package/build/src/matchers/component/toContainTokensEx.js +80 -0
- package/build/src/matchers/component/toContainUploadedFilesEx.d.ts +4 -0
- package/build/src/matchers/component/toContainUploadedFilesEx.js +75 -0
- package/build/src/matchers/component/toContainValueEx.d.ts +3 -0
- package/build/src/matchers/component/toContainValueEx.js +55 -0
- package/build/src/matchers/component/toHaveActivePageEx.d.ts +4 -0
- package/build/src/matchers/component/toHaveActivePageEx.js +78 -0
- package/build/src/matchers/component/toHaveActiveTabEx.d.ts +2 -0
- package/build/src/matchers/component/toHaveActiveTabEx.js +62 -0
- package/build/src/matchers/component/toHaveAttributeEx.d.ts +3 -0
- package/build/src/matchers/component/toHaveAttributeEx.js +62 -0
- package/build/src/matchers/component/toHaveCountEx.d.ts +3 -0
- package/build/src/matchers/component/toHaveCountEx.js +56 -0
- package/build/src/matchers/component/toHaveErrorEx.d.ts +3 -0
- package/build/src/matchers/component/toHaveErrorEx.js +57 -0
- package/build/src/matchers/component/toHaveFormattedTextEx.d.ts +3 -0
- package/build/src/matchers/component/toHaveFormattedTextEx.js +56 -0
- package/build/src/matchers/component/toHaveFormattedValueEx.d.ts +3 -0
- package/build/src/matchers/component/toHaveFormattedValueEx.js +56 -0
- package/build/src/matchers/component/toHaveHrefEx.d.ts +3 -0
- package/build/src/matchers/component/toHaveHrefEx.js +55 -0
- package/build/src/matchers/component/toHaveItemsEx.d.ts +3 -0
- package/build/src/matchers/component/toHaveItemsEx.js +63 -0
- package/build/src/matchers/component/toHavePageCountEx.d.ts +4 -0
- package/build/src/matchers/component/toHavePageCountEx.js +71 -0
- package/build/src/matchers/component/toHaveTextEx.d.ts +3 -0
- package/build/src/matchers/component/toHaveTextEx.js +56 -0
- package/build/src/matchers/component/toHaveValueEx.d.ts +6 -0
- package/build/src/matchers/component/toHaveValueEx.js +198 -0
- package/build/src/matchers/component/toHaveWarningEx.d.ts +3 -0
- package/build/src/matchers/component/toHaveWarningEx.js +57 -0
- package/build/src/matchers/componentMatchers.d.ts +104 -0
- package/build/src/matchers/componentMatchers.js +83 -0
- package/build/src/matchers/createAsyncMatcher.d.ts +47 -0
- package/build/src/matchers/createAsyncMatcher.js +155 -0
- package/build/src/matchers/formattedMatchers.d.ts +15 -31
- package/build/src/matchers/formattedMatchers.js +19 -15
- package/build/src/matchers/index.d.ts +1 -1
- package/build/src/matchers/index.js +1 -3
- package/build/src/utils/getMarcherResult.d.ts +13 -0
- package/build/src/utils/getMarcherResult.js +13 -0
- package/build/src/utils/index.d.ts +3 -0
- package/build/src/utils/index.js +3 -0
- package/build/src/utils/is.d.ts +3 -0
- package/build/src/utils/is.js +5 -0
- package/build/src/utils/makeMatcher.d.ts +5 -0
- package/build/src/utils/makeMatcher.js +65 -0
- package/build/src/utils/toMatchMessage.d.ts +12 -0
- package/build/src/utils/toMatchMessage.js +78 -0
- package/package.json +1 -1
- package/build/src/matchers/mergedExpects.d.ts +0 -15
- package/build/src/matchers/mergedExpects.js +0 -6
|
@@ -53,7 +53,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
53
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
54
|
exports.TokenInputAssertions = void 0;
|
|
55
55
|
var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
|
|
56
|
-
var
|
|
56
|
+
var extensions_1 = require("../extensions");
|
|
57
57
|
var TokenInputAssertions = /** @class */ (function (_super) {
|
|
58
58
|
__extends(TokenInputAssertions, _super);
|
|
59
59
|
function TokenInputAssertions(tokenInput) {
|
|
@@ -65,7 +65,7 @@ var TokenInputAssertions = /** @class */ (function (_super) {
|
|
|
65
65
|
return __awaiter(this, void 0, void 0, function () {
|
|
66
66
|
return __generator(this, function (_a) {
|
|
67
67
|
switch (_a.label) {
|
|
68
|
-
case 0: return [4 /*yield*/, (0,
|
|
68
|
+
case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.tokenInput).toBeEnabledEx(options)];
|
|
69
69
|
case 1:
|
|
70
70
|
_a.sent();
|
|
71
71
|
return [2 /*return*/];
|
|
@@ -77,7 +77,7 @@ var TokenInputAssertions = /** @class */ (function (_super) {
|
|
|
77
77
|
return __awaiter(this, void 0, void 0, function () {
|
|
78
78
|
return __generator(this, function (_a) {
|
|
79
79
|
switch (_a.label) {
|
|
80
|
-
case 0: return [4 /*yield*/, (0,
|
|
80
|
+
case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.tokenInput).toBeDisabledEx(options)];
|
|
81
81
|
case 1:
|
|
82
82
|
_a.sent();
|
|
83
83
|
return [2 /*return*/];
|
|
@@ -89,7 +89,7 @@ var TokenInputAssertions = /** @class */ (function (_super) {
|
|
|
89
89
|
return __awaiter(this, void 0, void 0, function () {
|
|
90
90
|
return __generator(this, function (_a) {
|
|
91
91
|
switch (_a.label) {
|
|
92
|
-
case 0: return [4 /*yield*/, (0,
|
|
92
|
+
case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.tokenInput).toBeEmptyEx(options)];
|
|
93
93
|
case 1:
|
|
94
94
|
_a.sent();
|
|
95
95
|
return [2 /*return*/];
|
|
@@ -101,7 +101,7 @@ var TokenInputAssertions = /** @class */ (function (_super) {
|
|
|
101
101
|
return __awaiter(this, void 0, void 0, function () {
|
|
102
102
|
return __generator(this, function (_a) {
|
|
103
103
|
switch (_a.label) {
|
|
104
|
-
case 0: return [4 /*yield*/, (0,
|
|
104
|
+
case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.tokenInput).not.toBeEmptyEx(options)];
|
|
105
105
|
case 1:
|
|
106
106
|
_a.sent();
|
|
107
107
|
return [2 /*return*/];
|
|
@@ -113,7 +113,7 @@ var TokenInputAssertions = /** @class */ (function (_super) {
|
|
|
113
113
|
return __awaiter(this, void 0, void 0, function () {
|
|
114
114
|
return __generator(this, function (_a) {
|
|
115
115
|
switch (_a.label) {
|
|
116
|
-
case 0: return [4 /*yield*/, (0,
|
|
116
|
+
case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.tokenInput).toBeFocusedEx(options)];
|
|
117
117
|
case 1:
|
|
118
118
|
_a.sent();
|
|
119
119
|
return [2 /*return*/];
|
|
@@ -125,7 +125,7 @@ var TokenInputAssertions = /** @class */ (function (_super) {
|
|
|
125
125
|
return __awaiter(this, void 0, void 0, function () {
|
|
126
126
|
return __generator(this, function (_a) {
|
|
127
127
|
switch (_a.label) {
|
|
128
|
-
case 0: return [4 /*yield*/, (0,
|
|
128
|
+
case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.tokenInput).not.toBeFocusedEx(options)];
|
|
129
129
|
case 1:
|
|
130
130
|
_a.sent();
|
|
131
131
|
return [2 /*return*/];
|
|
@@ -135,29 +135,9 @@ var TokenInputAssertions = /** @class */ (function (_super) {
|
|
|
135
135
|
};
|
|
136
136
|
TokenInputAssertions.prototype.toContainTokens = function (tokenNames, options) {
|
|
137
137
|
return __awaiter(this, void 0, void 0, function () {
|
|
138
|
-
var _this = this;
|
|
139
138
|
return __generator(this, function (_a) {
|
|
140
139
|
switch (_a.label) {
|
|
141
|
-
case 0: return [4 /*yield*/,
|
|
142
|
-
.poll(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
143
|
-
var tokens;
|
|
144
|
-
var _this = this;
|
|
145
|
-
return __generator(this, function (_a) {
|
|
146
|
-
switch (_a.label) {
|
|
147
|
-
case 0: return [4 /*yield*/, this.tokenInput.tokens.getItems()];
|
|
148
|
-
case 1:
|
|
149
|
-
tokens = _a.sent();
|
|
150
|
-
return [4 /*yield*/, Promise.all(tokens.map(function (x) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
151
|
-
switch (_a.label) {
|
|
152
|
-
case 0: return [4 /*yield*/, x.getText()];
|
|
153
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
154
|
-
}
|
|
155
|
-
}); }); }))];
|
|
156
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}); }, options)
|
|
160
|
-
.toEqual(matchers_1.mergedExpects.arrayContaining(tokenNames))];
|
|
140
|
+
case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.tokenInput).toContainTokensEx(tokenNames, options)];
|
|
161
141
|
case 1:
|
|
162
142
|
_a.sent();
|
|
163
143
|
return [2 /*return*/];
|
|
@@ -53,7 +53,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
53
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
54
|
exports.TooltipAssertions = void 0;
|
|
55
55
|
var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
|
|
56
|
-
var
|
|
56
|
+
var extensions_1 = require("../extensions");
|
|
57
57
|
var TooltipAssertions = /** @class */ (function (_super) {
|
|
58
58
|
__extends(TooltipAssertions, _super);
|
|
59
59
|
function TooltipAssertions(tooltip) {
|
|
@@ -65,7 +65,7 @@ var TooltipAssertions = /** @class */ (function (_super) {
|
|
|
65
65
|
return __awaiter(this, void 0, void 0, function () {
|
|
66
66
|
return __generator(this, function (_a) {
|
|
67
67
|
switch (_a.label) {
|
|
68
|
-
case 0: return [4 /*yield*/, (0,
|
|
68
|
+
case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.tooltip).toHaveTextEx(text, options)];
|
|
69
69
|
case 1:
|
|
70
70
|
_a.sent();
|
|
71
71
|
return [2 /*return*/];
|
|
@@ -77,7 +77,7 @@ var TooltipAssertions = /** @class */ (function (_super) {
|
|
|
77
77
|
return __awaiter(this, void 0, void 0, function () {
|
|
78
78
|
return __generator(this, function (_a) {
|
|
79
79
|
switch (_a.label) {
|
|
80
|
-
case 0: return [4 /*yield*/, (0,
|
|
80
|
+
case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.tooltip).not.toHaveTextEx(text, options)];
|
|
81
81
|
case 1:
|
|
82
82
|
_a.sent();
|
|
83
83
|
return [2 /*return*/];
|
|
@@ -89,7 +89,7 @@ var TooltipAssertions = /** @class */ (function (_super) {
|
|
|
89
89
|
return __awaiter(this, void 0, void 0, function () {
|
|
90
90
|
return __generator(this, function (_a) {
|
|
91
91
|
switch (_a.label) {
|
|
92
|
-
case 0: return [4 /*yield*/, (0,
|
|
92
|
+
case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.tooltip).toContainTextEx(text, options)];
|
|
93
93
|
case 1:
|
|
94
94
|
_a.sent();
|
|
95
95
|
return [2 /*return*/];
|
|
@@ -101,7 +101,7 @@ var TooltipAssertions = /** @class */ (function (_super) {
|
|
|
101
101
|
return __awaiter(this, void 0, void 0, function () {
|
|
102
102
|
return __generator(this, function (_a) {
|
|
103
103
|
switch (_a.label) {
|
|
104
|
-
case 0: return [4 /*yield*/, (0,
|
|
104
|
+
case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.tooltip).not.toContainTextEx(text, options)];
|
|
105
105
|
case 1:
|
|
106
106
|
_a.sent();
|
|
107
107
|
return [2 /*return*/];
|
|
@@ -3,9 +3,13 @@ import { BaseComponent } from './BaseComponent';
|
|
|
3
3
|
import { type TooltipType } from '../utils';
|
|
4
4
|
import { AutocompleteAssertions } from '../assertions';
|
|
5
5
|
import type { BlurOptions, ClearOptions, ClickOptions, FillOptions, FocusOptions, InputValueOptions, IsDisabledOptions, PressOptions, PressSequentiallyOptions } from '../options';
|
|
6
|
+
import { toControlElementLocator, toValueElementLocator, toFocusableElementLocator } from '../matchers/component/LocatorSymbols';
|
|
6
7
|
export declare class Autocomplete extends BaseComponent {
|
|
7
8
|
private readonly portal;
|
|
8
9
|
readonly inputLocator: Locator;
|
|
10
|
+
readonly [toControlElementLocator]: () => Locator;
|
|
11
|
+
readonly [toValueElementLocator]: () => Locator;
|
|
12
|
+
readonly [toFocusableElementLocator]: () => Locator;
|
|
9
13
|
constructor(rootLocator: Locator);
|
|
10
14
|
isDisabled(options?: IsDisabledOptions): Promise<boolean>;
|
|
11
15
|
getValue(options?: InputValueOptions): Promise<string>;
|
|
@@ -50,6 +50,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
50
50
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
+
var _a, _b, _c;
|
|
53
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
55
|
exports.Autocomplete = void 0;
|
|
55
56
|
var test_1 = require("@playwright/test");
|
|
@@ -59,47 +60,51 @@ var Portal_1 = require("./Portal");
|
|
|
59
60
|
var utils_1 = require("../utils");
|
|
60
61
|
var assertions_1 = require("../assertions");
|
|
61
62
|
var dataTidSelector_1 = require("../utils/dataTidSelector");
|
|
63
|
+
var LocatorSymbols_1 = require("../matchers/component/LocatorSymbols");
|
|
62
64
|
var Autocomplete = /** @class */ (function (_super) {
|
|
63
65
|
__extends(Autocomplete, _super);
|
|
64
66
|
function Autocomplete(rootLocator) {
|
|
65
67
|
var _this = _super.call(this, rootLocator) || this;
|
|
68
|
+
_this[_a] = function () { return _this.inputLocator; };
|
|
69
|
+
_this[_b] = function () { return _this.inputLocator; };
|
|
70
|
+
_this[_c] = function () { return _this.inputLocator; };
|
|
66
71
|
_this.portal = new Portal_1.Portal(rootLocator.locator('noscript'));
|
|
67
72
|
_this.inputLocator = rootLocator.locator('input');
|
|
68
73
|
return _this;
|
|
69
74
|
}
|
|
70
75
|
Autocomplete.prototype.isDisabled = function (options) {
|
|
71
76
|
return __awaiter(this, void 0, void 0, function () {
|
|
72
|
-
return __generator(this, function (
|
|
73
|
-
switch (
|
|
77
|
+
return __generator(this, function (_d) {
|
|
78
|
+
switch (_d.label) {
|
|
74
79
|
case 0: return [4 /*yield*/, this.inputLocator.isDisabled(options)];
|
|
75
|
-
case 1: return [2 /*return*/,
|
|
80
|
+
case 1: return [2 /*return*/, _d.sent()];
|
|
76
81
|
}
|
|
77
82
|
});
|
|
78
83
|
});
|
|
79
84
|
};
|
|
80
85
|
Autocomplete.prototype.getValue = function (options) {
|
|
81
86
|
return __awaiter(this, void 0, void 0, function () {
|
|
82
|
-
return __generator(this, function (
|
|
83
|
-
switch (
|
|
87
|
+
return __generator(this, function (_d) {
|
|
88
|
+
switch (_d.label) {
|
|
84
89
|
case 0: return [4 /*yield*/, this.inputLocator.inputValue(options)];
|
|
85
|
-
case 1: return [2 /*return*/,
|
|
90
|
+
case 1: return [2 /*return*/, _d.sent()];
|
|
86
91
|
}
|
|
87
92
|
});
|
|
88
93
|
});
|
|
89
94
|
};
|
|
90
95
|
Autocomplete.prototype.fill = function (value, options) {
|
|
91
96
|
return __awaiter(this, void 0, void 0, function () {
|
|
92
|
-
return __generator(this, function (
|
|
93
|
-
switch (
|
|
97
|
+
return __generator(this, function (_d) {
|
|
98
|
+
switch (_d.label) {
|
|
94
99
|
case 0: return [4 /*yield*/, this.focus()];
|
|
95
100
|
case 1:
|
|
96
|
-
|
|
101
|
+
_d.sent();
|
|
97
102
|
return [4 /*yield*/, this.clear()];
|
|
98
103
|
case 2:
|
|
99
|
-
|
|
104
|
+
_d.sent();
|
|
100
105
|
return [4 /*yield*/, this.inputLocator.fill(value, options)];
|
|
101
106
|
case 3:
|
|
102
|
-
|
|
107
|
+
_d.sent();
|
|
103
108
|
return [2 /*return*/];
|
|
104
109
|
}
|
|
105
110
|
});
|
|
@@ -107,11 +112,11 @@ var Autocomplete = /** @class */ (function (_super) {
|
|
|
107
112
|
};
|
|
108
113
|
Autocomplete.prototype.press = function (value, options) {
|
|
109
114
|
return __awaiter(this, void 0, void 0, function () {
|
|
110
|
-
return __generator(this, function (
|
|
111
|
-
switch (
|
|
115
|
+
return __generator(this, function (_d) {
|
|
116
|
+
switch (_d.label) {
|
|
112
117
|
case 0: return [4 /*yield*/, this.inputLocator.press(value, options)];
|
|
113
118
|
case 1:
|
|
114
|
-
|
|
119
|
+
_d.sent();
|
|
115
120
|
return [2 /*return*/];
|
|
116
121
|
}
|
|
117
122
|
});
|
|
@@ -119,11 +124,11 @@ var Autocomplete = /** @class */ (function (_super) {
|
|
|
119
124
|
};
|
|
120
125
|
Autocomplete.prototype.pressSequentially = function (value, options) {
|
|
121
126
|
return __awaiter(this, void 0, void 0, function () {
|
|
122
|
-
return __generator(this, function (
|
|
123
|
-
switch (
|
|
127
|
+
return __generator(this, function (_d) {
|
|
128
|
+
switch (_d.label) {
|
|
124
129
|
case 0: return [4 /*yield*/, this.inputLocator.pressSequentially(value, options)];
|
|
125
130
|
case 1:
|
|
126
|
-
|
|
131
|
+
_d.sent();
|
|
127
132
|
return [2 /*return*/];
|
|
128
133
|
}
|
|
129
134
|
});
|
|
@@ -131,11 +136,11 @@ var Autocomplete = /** @class */ (function (_super) {
|
|
|
131
136
|
};
|
|
132
137
|
Autocomplete.prototype.clear = function (options) {
|
|
133
138
|
return __awaiter(this, void 0, void 0, function () {
|
|
134
|
-
return __generator(this, function (
|
|
135
|
-
switch (
|
|
139
|
+
return __generator(this, function (_d) {
|
|
140
|
+
switch (_d.label) {
|
|
136
141
|
case 0: return [4 /*yield*/, this.inputLocator.clear(options)];
|
|
137
142
|
case 1:
|
|
138
|
-
|
|
143
|
+
_d.sent();
|
|
139
144
|
return [2 /*return*/];
|
|
140
145
|
}
|
|
141
146
|
});
|
|
@@ -143,14 +148,14 @@ var Autocomplete = /** @class */ (function (_super) {
|
|
|
143
148
|
};
|
|
144
149
|
Autocomplete.prototype.focus = function (options) {
|
|
145
150
|
return __awaiter(this, void 0, void 0, function () {
|
|
146
|
-
return __generator(this, function (
|
|
147
|
-
switch (
|
|
151
|
+
return __generator(this, function (_d) {
|
|
152
|
+
switch (_d.label) {
|
|
148
153
|
case 0: return [4 /*yield*/, (0, test_1.expect)(this.inputLocator).toBeEnabled()];
|
|
149
154
|
case 1:
|
|
150
|
-
|
|
155
|
+
_d.sent();
|
|
151
156
|
return [4 /*yield*/, this.inputLocator.focus(options)];
|
|
152
157
|
case 2:
|
|
153
|
-
|
|
158
|
+
_d.sent();
|
|
154
159
|
return [2 /*return*/];
|
|
155
160
|
}
|
|
156
161
|
});
|
|
@@ -158,11 +163,11 @@ var Autocomplete = /** @class */ (function (_super) {
|
|
|
158
163
|
};
|
|
159
164
|
Autocomplete.prototype.blur = function (options) {
|
|
160
165
|
return __awaiter(this, void 0, void 0, function () {
|
|
161
|
-
return __generator(this, function (
|
|
162
|
-
switch (
|
|
166
|
+
return __generator(this, function (_d) {
|
|
167
|
+
switch (_d.label) {
|
|
163
168
|
case 0: return [4 /*yield*/, this.inputLocator.blur(options)];
|
|
164
169
|
case 1:
|
|
165
|
-
|
|
170
|
+
_d.sent();
|
|
166
171
|
return [2 /*return*/];
|
|
167
172
|
}
|
|
168
173
|
});
|
|
@@ -170,34 +175,30 @@ var Autocomplete = /** @class */ (function (_super) {
|
|
|
170
175
|
};
|
|
171
176
|
Autocomplete.prototype.click = function (options) {
|
|
172
177
|
return __awaiter(this, void 0, void 0, function () {
|
|
173
|
-
return __generator(this, function (
|
|
174
|
-
switch (
|
|
178
|
+
return __generator(this, function (_d) {
|
|
179
|
+
switch (_d.label) {
|
|
175
180
|
case 0: return [4 /*yield*/, this.inputLocator.click(options)];
|
|
176
181
|
case 1:
|
|
177
|
-
|
|
182
|
+
_d.sent();
|
|
178
183
|
return [2 /*return*/];
|
|
179
184
|
}
|
|
180
185
|
});
|
|
181
186
|
});
|
|
182
187
|
};
|
|
183
188
|
Autocomplete.prototype.getTooltip = function (type) {
|
|
184
|
-
return
|
|
185
|
-
return __generator(this, function (_a) {
|
|
186
|
-
return [2 /*return*/, (0, utils_1.getTooltip)(type, this)];
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
+
return (0, utils_1.getTooltip)(type, this);
|
|
189
190
|
};
|
|
190
191
|
Autocomplete.prototype.selectFirstSuggestion = function (options) {
|
|
191
192
|
return __awaiter(this, void 0, void 0, function () {
|
|
192
193
|
var suggestions;
|
|
193
|
-
return __generator(this, function (
|
|
194
|
-
switch (
|
|
194
|
+
return __generator(this, function (_d) {
|
|
195
|
+
switch (_d.label) {
|
|
195
196
|
case 0: return [4 /*yield*/, this.getSuggestions()];
|
|
196
197
|
case 1:
|
|
197
|
-
suggestions =
|
|
198
|
+
suggestions = _d.sent();
|
|
198
199
|
return [4 /*yield*/, suggestions.first().click(options)];
|
|
199
200
|
case 2:
|
|
200
|
-
|
|
201
|
+
_d.sent();
|
|
201
202
|
return [2 /*return*/];
|
|
202
203
|
}
|
|
203
204
|
});
|
|
@@ -206,14 +207,14 @@ var Autocomplete = /** @class */ (function (_super) {
|
|
|
206
207
|
Autocomplete.prototype.selectSuggestionByIndex = function (index, options) {
|
|
207
208
|
return __awaiter(this, void 0, void 0, function () {
|
|
208
209
|
var suggestions;
|
|
209
|
-
return __generator(this, function (
|
|
210
|
-
switch (
|
|
210
|
+
return __generator(this, function (_d) {
|
|
211
|
+
switch (_d.label) {
|
|
211
212
|
case 0: return [4 /*yield*/, this.getSuggestions()];
|
|
212
213
|
case 1:
|
|
213
|
-
suggestions =
|
|
214
|
+
suggestions = _d.sent();
|
|
214
215
|
return [4 /*yield*/, suggestions.nth(index).click(options)];
|
|
215
216
|
case 2:
|
|
216
|
-
|
|
217
|
+
_d.sent();
|
|
217
218
|
return [2 /*return*/];
|
|
218
219
|
}
|
|
219
220
|
});
|
|
@@ -222,14 +223,14 @@ var Autocomplete = /** @class */ (function (_super) {
|
|
|
222
223
|
Autocomplete.prototype.selectSuggestionByText = function (text, options) {
|
|
223
224
|
return __awaiter(this, void 0, void 0, function () {
|
|
224
225
|
var suggestions;
|
|
225
|
-
return __generator(this, function (
|
|
226
|
-
switch (
|
|
226
|
+
return __generator(this, function (_d) {
|
|
227
|
+
switch (_d.label) {
|
|
227
228
|
case 0: return [4 /*yield*/, this.getSuggestions()];
|
|
228
229
|
case 1:
|
|
229
|
-
suggestions =
|
|
230
|
+
suggestions = _d.sent();
|
|
230
231
|
return [4 /*yield*/, suggestions.getByText(text).click(options)];
|
|
231
232
|
case 2:
|
|
232
|
-
|
|
233
|
+
_d.sent();
|
|
233
234
|
return [2 /*return*/];
|
|
234
235
|
}
|
|
235
236
|
});
|
|
@@ -241,11 +242,11 @@ var Autocomplete = /** @class */ (function (_super) {
|
|
|
241
242
|
Autocomplete.prototype.getSuggestions = function () {
|
|
242
243
|
return __awaiter(this, void 0, void 0, function () {
|
|
243
244
|
var container;
|
|
244
|
-
return __generator(this, function (
|
|
245
|
-
switch (
|
|
245
|
+
return __generator(this, function (_d) {
|
|
246
|
+
switch (_d.label) {
|
|
246
247
|
case 0: return [4 /*yield*/, this.portal.getContainer()];
|
|
247
248
|
case 1:
|
|
248
|
-
container =
|
|
249
|
+
container = _d.sent();
|
|
249
250
|
return [2 /*return*/, container.locator((0, dataTidSelector_1.getDataTidSelector)(react_ui_1.MenuItemDataTids.root))];
|
|
250
251
|
}
|
|
251
252
|
});
|
|
@@ -254,3 +255,4 @@ var Autocomplete = /** @class */ (function (_super) {
|
|
|
254
255
|
return Autocomplete;
|
|
255
256
|
}(BaseComponent_1.BaseComponent));
|
|
256
257
|
exports.Autocomplete = Autocomplete;
|
|
258
|
+
_a = LocatorSymbols_1.toControlElementLocator, _b = LocatorSymbols_1.toValueElementLocator, _c = LocatorSymbols_1.toFocusableElementLocator;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { Locator, Page } from '@playwright/test';
|
|
2
2
|
import { BaseComponentAssertions } from '../assertions';
|
|
3
3
|
import type { ClickOptions, GetAttributeOptions, HoverOptions, IsVisibleOptions, ScrollIntoViewIfNeededOptions, WaitForOptions } from '../options';
|
|
4
|
+
import { toVisibleElementLocator, toRootElementLocator, toHaveAttributeElementLocator } from '../matchers/component/LocatorSymbols';
|
|
4
5
|
export declare abstract class BaseComponent {
|
|
5
6
|
readonly rootLocator: Locator;
|
|
6
7
|
readonly page: Page;
|
|
8
|
+
readonly [toVisibleElementLocator]: () => Locator;
|
|
9
|
+
readonly [toRootElementLocator]: () => Locator;
|
|
10
|
+
readonly [toHaveAttributeElementLocator]: () => Locator;
|
|
7
11
|
protected constructor(rootLocator: Locator);
|
|
8
12
|
isVisible(options?: IsVisibleOptions): Promise<boolean>;
|
|
9
13
|
hasError(options?: GetAttributeOptions): Promise<boolean>;
|
|
@@ -35,58 +35,64 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
+
var _a, _b, _c;
|
|
38
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
40
|
exports.BaseComponent = void 0;
|
|
40
41
|
var assertions_1 = require("../assertions");
|
|
41
42
|
var utils_1 = require("../utils");
|
|
43
|
+
var LocatorSymbols_1 = require("../matchers/component/LocatorSymbols");
|
|
42
44
|
var BaseComponent = /** @class */ (function () {
|
|
43
45
|
function BaseComponent(rootLocator) {
|
|
46
|
+
var _this = this;
|
|
44
47
|
this.rootLocator = rootLocator;
|
|
48
|
+
this[_a] = function () { return _this.rootLocator; };
|
|
49
|
+
this[_b] = function () { return _this.rootLocator; };
|
|
50
|
+
this[_c] = function () { return _this.rootLocator; };
|
|
45
51
|
this.page = rootLocator.page();
|
|
46
52
|
}
|
|
47
53
|
BaseComponent.prototype.isVisible = function (options) {
|
|
48
54
|
return __awaiter(this, void 0, void 0, function () {
|
|
49
|
-
return __generator(this, function (
|
|
50
|
-
switch (
|
|
55
|
+
return __generator(this, function (_d) {
|
|
56
|
+
switch (_d.label) {
|
|
51
57
|
case 0: return [4 /*yield*/, this.rootLocator.isVisible(options)];
|
|
52
|
-
case 1: return [2 /*return*/,
|
|
58
|
+
case 1: return [2 /*return*/, _d.sent()];
|
|
53
59
|
}
|
|
54
60
|
});
|
|
55
61
|
});
|
|
56
62
|
};
|
|
57
63
|
BaseComponent.prototype.hasError = function (options) {
|
|
58
64
|
return __awaiter(this, void 0, void 0, function () {
|
|
59
|
-
return __generator(this, function (
|
|
60
|
-
switch (
|
|
65
|
+
return __generator(this, function (_d) {
|
|
66
|
+
switch (_d.label) {
|
|
61
67
|
case 0: return [4 /*yield*/, this.waitFor()];
|
|
62
68
|
case 1:
|
|
63
|
-
|
|
69
|
+
_d.sent();
|
|
64
70
|
return [4 /*yield*/, this.hasAttribute(utils_1.DataVisualState.Error, options)];
|
|
65
|
-
case 2: return [2 /*return*/,
|
|
71
|
+
case 2: return [2 /*return*/, _d.sent()];
|
|
66
72
|
}
|
|
67
73
|
});
|
|
68
74
|
});
|
|
69
75
|
};
|
|
70
76
|
BaseComponent.prototype.hasWarning = function (options) {
|
|
71
77
|
return __awaiter(this, void 0, void 0, function () {
|
|
72
|
-
return __generator(this, function (
|
|
73
|
-
switch (
|
|
78
|
+
return __generator(this, function (_d) {
|
|
79
|
+
switch (_d.label) {
|
|
74
80
|
case 0: return [4 /*yield*/, this.waitFor()];
|
|
75
81
|
case 1:
|
|
76
|
-
|
|
82
|
+
_d.sent();
|
|
77
83
|
return [4 /*yield*/, this.hasAttribute(utils_1.DataVisualState.Warning, options)];
|
|
78
|
-
case 2: return [2 /*return*/,
|
|
84
|
+
case 2: return [2 /*return*/, _d.sent()];
|
|
79
85
|
}
|
|
80
86
|
});
|
|
81
87
|
});
|
|
82
88
|
};
|
|
83
89
|
BaseComponent.prototype.click = function (options) {
|
|
84
90
|
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
-
return __generator(this, function (
|
|
86
|
-
switch (
|
|
91
|
+
return __generator(this, function (_d) {
|
|
92
|
+
switch (_d.label) {
|
|
87
93
|
case 0: return [4 /*yield*/, this.rootLocator.click(options)];
|
|
88
94
|
case 1:
|
|
89
|
-
|
|
95
|
+
_d.sent();
|
|
90
96
|
return [2 /*return*/];
|
|
91
97
|
}
|
|
92
98
|
});
|
|
@@ -94,11 +100,11 @@ var BaseComponent = /** @class */ (function () {
|
|
|
94
100
|
};
|
|
95
101
|
BaseComponent.prototype.hover = function (options) {
|
|
96
102
|
return __awaiter(this, void 0, void 0, function () {
|
|
97
|
-
return __generator(this, function (
|
|
98
|
-
switch (
|
|
103
|
+
return __generator(this, function (_d) {
|
|
104
|
+
switch (_d.label) {
|
|
99
105
|
case 0: return [4 /*yield*/, this.rootLocator.hover(options)];
|
|
100
106
|
case 1:
|
|
101
|
-
|
|
107
|
+
_d.sent();
|
|
102
108
|
return [2 /*return*/];
|
|
103
109
|
}
|
|
104
110
|
});
|
|
@@ -106,11 +112,11 @@ var BaseComponent = /** @class */ (function () {
|
|
|
106
112
|
};
|
|
107
113
|
BaseComponent.prototype.scrollIntoViewIfNeeded = function (options) {
|
|
108
114
|
return __awaiter(this, void 0, void 0, function () {
|
|
109
|
-
return __generator(this, function (
|
|
110
|
-
switch (
|
|
115
|
+
return __generator(this, function (_d) {
|
|
116
|
+
switch (_d.label) {
|
|
111
117
|
case 0: return [4 /*yield*/, this.rootLocator.scrollIntoViewIfNeeded(options)];
|
|
112
118
|
case 1:
|
|
113
|
-
|
|
119
|
+
_d.sent();
|
|
114
120
|
return [2 /*return*/];
|
|
115
121
|
}
|
|
116
122
|
});
|
|
@@ -118,11 +124,11 @@ var BaseComponent = /** @class */ (function () {
|
|
|
118
124
|
};
|
|
119
125
|
BaseComponent.prototype.waitFor = function (options) {
|
|
120
126
|
return __awaiter(this, void 0, void 0, function () {
|
|
121
|
-
return __generator(this, function (
|
|
122
|
-
switch (
|
|
127
|
+
return __generator(this, function (_d) {
|
|
128
|
+
switch (_d.label) {
|
|
123
129
|
case 0: return [4 /*yield*/, this.rootLocator.waitFor(options)];
|
|
124
130
|
case 1:
|
|
125
|
-
|
|
131
|
+
_d.sent();
|
|
126
132
|
return [2 /*return*/];
|
|
127
133
|
}
|
|
128
134
|
});
|
|
@@ -130,23 +136,23 @@ var BaseComponent = /** @class */ (function () {
|
|
|
130
136
|
};
|
|
131
137
|
BaseComponent.prototype.hasAttribute = function (name, options) {
|
|
132
138
|
return __awaiter(this, void 0, void 0, function () {
|
|
133
|
-
return __generator(this, function (
|
|
134
|
-
switch (
|
|
139
|
+
return __generator(this, function (_d) {
|
|
140
|
+
switch (_d.label) {
|
|
135
141
|
case 0: return [4 /*yield*/, this.waitFor()];
|
|
136
142
|
case 1:
|
|
137
|
-
|
|
143
|
+
_d.sent();
|
|
138
144
|
return [4 /*yield*/, this.getAttribute(name, options)];
|
|
139
|
-
case 2: return [2 /*return*/, (
|
|
145
|
+
case 2: return [2 /*return*/, (_d.sent()) !== null];
|
|
140
146
|
}
|
|
141
147
|
});
|
|
142
148
|
});
|
|
143
149
|
};
|
|
144
150
|
BaseComponent.prototype.getAttribute = function (name, options) {
|
|
145
151
|
return __awaiter(this, void 0, void 0, function () {
|
|
146
|
-
return __generator(this, function (
|
|
147
|
-
switch (
|
|
152
|
+
return __generator(this, function (_d) {
|
|
153
|
+
switch (_d.label) {
|
|
148
154
|
case 0: return [4 /*yield*/, this.rootLocator.getAttribute(name, options)];
|
|
149
|
-
case 1: return [2 /*return*/,
|
|
155
|
+
case 1: return [2 /*return*/, _d.sent()];
|
|
150
156
|
}
|
|
151
157
|
});
|
|
152
158
|
});
|
|
@@ -157,3 +163,4 @@ var BaseComponent = /** @class */ (function () {
|
|
|
157
163
|
return BaseComponent;
|
|
158
164
|
}());
|
|
159
165
|
exports.BaseComponent = BaseComponent;
|
|
166
|
+
_a = LocatorSymbols_1.toVisibleElementLocator, _b = LocatorSymbols_1.toRootElementLocator, _c = LocatorSymbols_1.toHaveAttributeElementLocator;
|
|
@@ -3,6 +3,7 @@ import { BaseComponent } from './BaseComponent';
|
|
|
3
3
|
import { ButtonAssertions } from '../assertions';
|
|
4
4
|
import type { TooltipType } from '../utils';
|
|
5
5
|
import type { BlurOptions, ClickOptions, FocusOptions, InnerTextOptions, IsDisabledOptions } from '../options';
|
|
6
|
+
import { toControlElementLocator, toFocusableElementLocator, toTextElementLocator } from '../matchers/component/LocatorSymbols';
|
|
6
7
|
/**
|
|
7
8
|
* Button можно использовать как для @skbkontur/react-ui, так и для react
|
|
8
9
|
* Но часть функциональности (проверка на Error / Warning) не будет работать с button из react
|
|
@@ -10,6 +11,9 @@ import type { BlurOptions, ClickOptions, FocusOptions, InnerTextOptions, IsDisab
|
|
|
10
11
|
export declare class Button extends BaseComponent {
|
|
11
12
|
readonly rootLocator: Locator;
|
|
12
13
|
readonly buttonLocator: Locator;
|
|
14
|
+
readonly [toControlElementLocator]: () => Locator;
|
|
15
|
+
readonly [toTextElementLocator]: () => Locator;
|
|
16
|
+
readonly [toFocusableElementLocator]: () => Locator;
|
|
13
17
|
constructor(rootLocator: Locator);
|
|
14
18
|
isDisabled(options?: IsDisabledOptions): Promise<boolean>;
|
|
15
19
|
getText(options?: InnerTextOptions): Promise<string>;
|