@skbkontur/playwright-react-ui-components 1.13.2 → 1.14.0-beta.2
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 +8 -2
- package/build/src/components/ComboBox.js +67 -54
- package/build/src/components/ComponentList.d.ts +6 -3
- package/build/src/components/ComponentList.js +39 -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 +7 -2
- package/build/src/components/Dropdown.js +68 -65
- package/build/src/components/DropdownMenu.d.ts +6 -2
- package/build/src/components/DropdownMenu.js +67 -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 +5 -2
- package/build/src/components/Kebab.js +49 -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 +10 -0
- package/build/src/components/MenuComponent.js +79 -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/toBeActiveTab.d.ts +3 -0
- package/build/src/matchers/component/toBeActiveTab.js +56 -0
- package/build/src/matchers/component/toBeAutoMode.d.ts +3 -0
- package/build/src/matchers/component/toBeAutoMode.js +62 -0
- package/build/src/matchers/component/toBeCheckedByIndex.d.ts +3 -0
- package/build/src/matchers/component/toBeCheckedByIndex.js +62 -0
- package/build/src/matchers/component/toBeCheckedByText.d.ts +3 -0
- package/build/src/matchers/component/toBeCheckedByText.js +62 -0
- package/build/src/matchers/component/toBeCheckedByValue.d.ts +3 -0
- package/build/src/matchers/component/toBeCheckedByValue.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 +171 -0
- package/build/src/matchers/component/toBeEmptyEx.d.ts +3 -0
- package/build/src/matchers/component/toBeEmptyEx.js +136 -0
- package/build/src/matchers/component/toBeEnabledEx.d.ts +3 -0
- package/build/src/matchers/component/toBeEnabledEx.js +196 -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 +67 -0
- package/build/src/matchers/component/toBeInactiveTab.d.ts +3 -0
- package/build/src/matchers/component/toBeInactiveTab.js +56 -0
- package/build/src/matchers/component/toBeUnchecked.d.ts +3 -0
- package/build/src/matchers/component/toBeUnchecked.js +56 -0
- package/build/src/matchers/component/toBeUncheckedByIndex.d.ts +3 -0
- package/build/src/matchers/component/toBeUncheckedByIndex.js +62 -0
- package/build/src/matchers/component/toBeUncheckedByText.d.ts +3 -0
- package/build/src/matchers/component/toBeUncheckedByText.js +57 -0
- package/build/src/matchers/component/toBeUncheckedByValue.d.ts +3 -0
- package/build/src/matchers/component/toBeUncheckedByValue.js +57 -0
- package/build/src/matchers/component/toBeVisibleEx.d.ts +3 -0
- package/build/src/matchers/component/toBeVisibleEx.js +67 -0
- package/build/src/matchers/component/toContainFormattedText.d.ts +3 -0
- package/build/src/matchers/component/toContainFormattedText.js +55 -0
- package/build/src/matchers/component/toContainItem.d.ts +4 -0
- package/build/src/matchers/component/toContainItem.js +78 -0
- package/build/src/matchers/component/toContainItems.d.ts +3 -0
- package/build/src/matchers/component/toContainItems.js +63 -0
- package/build/src/matchers/component/toContainSelectValue.d.ts +3 -0
- package/build/src/matchers/component/toContainSelectValue.js +55 -0
- package/build/src/matchers/component/toContainTabs.d.ts +3 -0
- package/build/src/matchers/component/toContainTabs.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/toContainTokens.d.ts +4 -0
- package/build/src/matchers/component/toContainTokens.js +80 -0
- package/build/src/matchers/component/toContainUploadedFiles.d.ts +4 -0
- package/build/src/matchers/component/toContainUploadedFiles.js +75 -0
- package/build/src/matchers/component/toHaveActivePage.d.ts +4 -0
- package/build/src/matchers/component/toHaveActivePage.js +78 -0
- package/build/src/matchers/component/toHaveActiveTab.d.ts +2 -0
- package/build/src/matchers/component/toHaveActiveTab.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/toHaveError.d.ts +3 -0
- package/build/src/matchers/component/toHaveError.js +57 -0
- package/build/src/matchers/component/toHaveFormattedText.d.ts +3 -0
- package/build/src/matchers/component/toHaveFormattedText.js +56 -0
- package/build/src/matchers/component/toHaveFormattedValue.d.ts +3 -0
- package/build/src/matchers/component/toHaveFormattedValue.js +56 -0
- package/build/src/matchers/component/toHaveHref.d.ts +3 -0
- package/build/src/matchers/component/toHaveHref.js +55 -0
- package/build/src/matchers/component/toHaveItems.d.ts +3 -0
- package/build/src/matchers/component/toHaveItems.js +63 -0
- package/build/src/matchers/component/toHavePageCount.d.ts +4 -0
- package/build/src/matchers/component/toHavePageCount.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 +197 -0
- package/build/src/matchers/component/toHaveWarning.d.ts +3 -0
- package/build/src/matchers/component/toHaveWarning.js +57 -0
- package/build/src/matchers/componentMatchers.d.ts +104 -0
- package/build/src/matchers/componentMatchers.js +89 -0
- package/build/src/matchers/createAsyncMatcher.d.ts +72 -0
- package/build/src/matchers/createAsyncMatcher.js +180 -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/makeMatcher.d.ts +5 -0
- package/build/src/utils/makeMatcher.js +65 -0
- package/build/src/utils/toMatchMessage.d.ts +23 -0
- package/build/src/utils/toMatchMessage.js +89 -0
- package/package.json +1 -1
- package/build/src/matchers/mergedExpects.d.ts +0 -15
- package/build/src/matchers/mergedExpects.js +0 -6
|
@@ -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;
|
|
53
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
55
|
exports.RadioGroup = void 0;
|
|
55
56
|
var react_ui_1 = require("@skbkontur/react-ui");
|
|
@@ -59,20 +60,22 @@ var ComponentList_1 = require("./ComponentList");
|
|
|
59
60
|
var Radio_1 = require("./Radio");
|
|
60
61
|
var utils_1 = require("../utils");
|
|
61
62
|
var dataTidSelector_1 = require("../utils/dataTidSelector");
|
|
63
|
+
var LocatorSymbols_1 = require("../matchers/component/LocatorSymbols");
|
|
62
64
|
var RadioGroup = /** @class */ (function (_super) {
|
|
63
65
|
__extends(RadioGroup, _super);
|
|
64
66
|
function RadioGroup(rootLocator) {
|
|
65
67
|
var _this = _super.call(this, rootLocator) || this;
|
|
66
68
|
_this.rootLocator = rootLocator;
|
|
69
|
+
_this[_a] = function () { return _this.rootLocator; };
|
|
67
70
|
_this.list = new ComponentList_1.ComponentList(rootLocator, function (rootLocator) { return rootLocator.locator((0, dataTidSelector_1.getDataTidSelector)(react_ui_1.RadioDataTids.root)); }, function (rootLocator) { return new Radio_1.Radio(rootLocator); });
|
|
68
71
|
return _this;
|
|
69
72
|
}
|
|
70
73
|
RadioGroup.prototype.getItems = function () {
|
|
71
74
|
return __awaiter(this, void 0, void 0, function () {
|
|
72
|
-
return __generator(this, function (
|
|
73
|
-
switch (
|
|
75
|
+
return __generator(this, function (_b) {
|
|
76
|
+
switch (_b.label) {
|
|
74
77
|
case 0: return [4 /*yield*/, this.list.getItems()];
|
|
75
|
-
case 1: return [2 /*return*/,
|
|
78
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
76
79
|
}
|
|
77
80
|
});
|
|
78
81
|
});
|
|
@@ -80,22 +83,22 @@ var RadioGroup = /** @class */ (function (_super) {
|
|
|
80
83
|
RadioGroup.prototype.isDisabled = function () {
|
|
81
84
|
return __awaiter(this, void 0, void 0, function () {
|
|
82
85
|
var radioList, _i, radioList_1, radio;
|
|
83
|
-
return __generator(this, function (
|
|
84
|
-
switch (
|
|
86
|
+
return __generator(this, function (_b) {
|
|
87
|
+
switch (_b.label) {
|
|
85
88
|
case 0: return [4 /*yield*/, this.getItems()];
|
|
86
89
|
case 1:
|
|
87
|
-
radioList =
|
|
90
|
+
radioList = _b.sent();
|
|
88
91
|
_i = 0, radioList_1 = radioList;
|
|
89
|
-
|
|
92
|
+
_b.label = 2;
|
|
90
93
|
case 2:
|
|
91
94
|
if (!(_i < radioList_1.length)) return [3 /*break*/, 5];
|
|
92
95
|
radio = radioList_1[_i];
|
|
93
96
|
return [4 /*yield*/, radio.isDisabled()];
|
|
94
97
|
case 3:
|
|
95
|
-
if (!(
|
|
98
|
+
if (!(_b.sent())) {
|
|
96
99
|
return [2 /*return*/, false];
|
|
97
100
|
}
|
|
98
|
-
|
|
101
|
+
_b.label = 4;
|
|
99
102
|
case 4:
|
|
100
103
|
_i++;
|
|
101
104
|
return [3 /*break*/, 2];
|
|
@@ -107,14 +110,14 @@ var RadioGroup = /** @class */ (function (_super) {
|
|
|
107
110
|
RadioGroup.prototype.checkByValue = function (value) {
|
|
108
111
|
return __awaiter(this, void 0, void 0, function () {
|
|
109
112
|
var radio;
|
|
110
|
-
return __generator(this, function (
|
|
111
|
-
switch (
|
|
113
|
+
return __generator(this, function (_b) {
|
|
114
|
+
switch (_b.label) {
|
|
112
115
|
case 0: return [4 /*yield*/, this.getByValue(value)];
|
|
113
116
|
case 1:
|
|
114
|
-
radio =
|
|
117
|
+
radio = _b.sent();
|
|
115
118
|
return [4 /*yield*/, radio.check()];
|
|
116
119
|
case 2:
|
|
117
|
-
|
|
120
|
+
_b.sent();
|
|
118
121
|
return [2 /*return*/];
|
|
119
122
|
}
|
|
120
123
|
});
|
|
@@ -123,14 +126,14 @@ var RadioGroup = /** @class */ (function (_super) {
|
|
|
123
126
|
RadioGroup.prototype.checkByIndex = function (index) {
|
|
124
127
|
return __awaiter(this, void 0, void 0, function () {
|
|
125
128
|
var radio;
|
|
126
|
-
return __generator(this, function (
|
|
127
|
-
switch (
|
|
129
|
+
return __generator(this, function (_b) {
|
|
130
|
+
switch (_b.label) {
|
|
128
131
|
case 0: return [4 /*yield*/, this.getByIndex(index)];
|
|
129
132
|
case 1:
|
|
130
|
-
radio =
|
|
133
|
+
radio = _b.sent();
|
|
131
134
|
return [4 /*yield*/, radio.check()];
|
|
132
135
|
case 2:
|
|
133
|
-
|
|
136
|
+
_b.sent();
|
|
134
137
|
return [2 /*return*/];
|
|
135
138
|
}
|
|
136
139
|
});
|
|
@@ -139,14 +142,14 @@ var RadioGroup = /** @class */ (function (_super) {
|
|
|
139
142
|
RadioGroup.prototype.checkByText = function (text) {
|
|
140
143
|
return __awaiter(this, void 0, void 0, function () {
|
|
141
144
|
var radio;
|
|
142
|
-
return __generator(this, function (
|
|
143
|
-
switch (
|
|
145
|
+
return __generator(this, function (_b) {
|
|
146
|
+
switch (_b.label) {
|
|
144
147
|
case 0: return [4 /*yield*/, this.getByText(text)];
|
|
145
148
|
case 1:
|
|
146
|
-
radio =
|
|
149
|
+
radio = _b.sent();
|
|
147
150
|
return [4 /*yield*/, radio.check()];
|
|
148
151
|
case 2:
|
|
149
|
-
|
|
152
|
+
_b.sent();
|
|
150
153
|
return [2 /*return*/];
|
|
151
154
|
}
|
|
152
155
|
});
|
|
@@ -155,15 +158,15 @@ var RadioGroup = /** @class */ (function (_super) {
|
|
|
155
158
|
RadioGroup.prototype.getCheckedRadio = function () {
|
|
156
159
|
return __awaiter(this, void 0, void 0, function () {
|
|
157
160
|
var _this = this;
|
|
158
|
-
return __generator(this, function (
|
|
159
|
-
switch (
|
|
160
|
-
case 0: return [4 /*yield*/, this.list.getFirstItemByPredicate(function (radio) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (
|
|
161
|
-
switch (
|
|
161
|
+
return __generator(this, function (_b) {
|
|
162
|
+
switch (_b.label) {
|
|
163
|
+
case 0: return [4 /*yield*/, this.list.getFirstItemByPredicate(function (radio) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_b) {
|
|
164
|
+
switch (_b.label) {
|
|
162
165
|
case 0: return [4 /*yield*/, radio.isChecked()];
|
|
163
|
-
case 1: return [2 /*return*/,
|
|
166
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
164
167
|
}
|
|
165
168
|
}); }); })];
|
|
166
|
-
case 1: return [2 /*return*/,
|
|
169
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
167
170
|
}
|
|
168
171
|
});
|
|
169
172
|
});
|
|
@@ -171,27 +174,27 @@ var RadioGroup = /** @class */ (function (_super) {
|
|
|
171
174
|
RadioGroup.prototype.getByValue = function (value) {
|
|
172
175
|
return __awaiter(this, void 0, void 0, function () {
|
|
173
176
|
var _this = this;
|
|
174
|
-
return __generator(this, function (
|
|
175
|
-
switch (
|
|
176
|
-
case 0: return [4 /*yield*/, this.list.getFirstItemByPredicate(function (radio) { return __awaiter(_this, void 0, void 0, function () { var
|
|
177
|
-
switch (
|
|
177
|
+
return __generator(this, function (_b) {
|
|
178
|
+
switch (_b.label) {
|
|
179
|
+
case 0: return [4 /*yield*/, this.list.getFirstItemByPredicate(function (radio) { return __awaiter(_this, void 0, void 0, function () { var _b; return __generator(this, function (_c) {
|
|
180
|
+
switch (_c.label) {
|
|
178
181
|
case 0:
|
|
179
|
-
|
|
182
|
+
_b = Boolean;
|
|
180
183
|
return [4 /*yield*/, radio.getValue()];
|
|
181
|
-
case 1: return [2 /*return*/,
|
|
184
|
+
case 1: return [2 /*return*/, _b.apply(void 0, [(_c.sent()).match(value)])];
|
|
182
185
|
}
|
|
183
186
|
}); }); })];
|
|
184
|
-
case 1: return [2 /*return*/,
|
|
187
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
185
188
|
}
|
|
186
189
|
});
|
|
187
190
|
});
|
|
188
191
|
};
|
|
189
192
|
RadioGroup.prototype.getByIndex = function (index) {
|
|
190
193
|
return __awaiter(this, void 0, void 0, function () {
|
|
191
|
-
return __generator(this, function (
|
|
192
|
-
switch (
|
|
194
|
+
return __generator(this, function (_b) {
|
|
195
|
+
switch (_b.label) {
|
|
193
196
|
case 0: return [4 /*yield*/, this.list.getItemByIndex(index)];
|
|
194
|
-
case 1: return [2 /*return*/,
|
|
197
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
195
198
|
}
|
|
196
199
|
});
|
|
197
200
|
});
|
|
@@ -199,27 +202,27 @@ var RadioGroup = /** @class */ (function (_super) {
|
|
|
199
202
|
RadioGroup.prototype.getByText = function (text) {
|
|
200
203
|
return __awaiter(this, void 0, void 0, function () {
|
|
201
204
|
var _this = this;
|
|
202
|
-
return __generator(this, function (
|
|
203
|
-
switch (
|
|
204
|
-
case 0: return [4 /*yield*/, this.list.getFirstItemByPredicate(function (radio) { return __awaiter(_this, void 0, void 0, function () { var
|
|
205
|
-
switch (
|
|
205
|
+
return __generator(this, function (_b) {
|
|
206
|
+
switch (_b.label) {
|
|
207
|
+
case 0: return [4 /*yield*/, this.list.getFirstItemByPredicate(function (radio) { return __awaiter(_this, void 0, void 0, function () { var _b; return __generator(this, function (_c) {
|
|
208
|
+
switch (_c.label) {
|
|
206
209
|
case 0:
|
|
207
|
-
|
|
210
|
+
_b = Boolean;
|
|
208
211
|
return [4 /*yield*/, radio.getText()];
|
|
209
|
-
case 1: return [2 /*return*/,
|
|
212
|
+
case 1: return [2 /*return*/, _b.apply(void 0, [(_c.sent()).match(text)])];
|
|
210
213
|
}
|
|
211
214
|
}); }); })];
|
|
212
|
-
case 1: return [2 /*return*/,
|
|
215
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
213
216
|
}
|
|
214
217
|
});
|
|
215
218
|
});
|
|
216
219
|
};
|
|
217
220
|
RadioGroup.prototype.getTooltip = function (type) {
|
|
218
221
|
return __awaiter(this, void 0, void 0, function () {
|
|
219
|
-
return __generator(this, function (
|
|
220
|
-
switch (
|
|
222
|
+
return __generator(this, function (_b) {
|
|
223
|
+
switch (_b.label) {
|
|
221
224
|
case 0: return [4 /*yield*/, (0, utils_1.getTooltip)(type, this)];
|
|
222
|
-
case 1: return [2 /*return*/,
|
|
225
|
+
case 1: return [2 /*return*/, _b.sent()];
|
|
223
226
|
}
|
|
224
227
|
});
|
|
225
228
|
});
|
|
@@ -230,3 +233,4 @@ var RadioGroup = /** @class */ (function (_super) {
|
|
|
230
233
|
return RadioGroup;
|
|
231
234
|
}(BaseComponent_1.BaseComponent));
|
|
232
235
|
exports.RadioGroup = RadioGroup;
|
|
236
|
+
_a = LocatorSymbols_1.toControlElementLocator;
|
|
@@ -5,11 +5,16 @@ import type { TooltipType } from '../utils';
|
|
|
5
5
|
import { ComponentList } from './ComponentList';
|
|
6
6
|
import { MenuItem } from './MenuItem';
|
|
7
7
|
import type { BlurOptions, ClickOptions, FillOptions, FocusOptions, InnerTextOptions } from '../options';
|
|
8
|
+
import { toControlElementLocator, toValueElementLocator, toFocusableElementLocator } from '../matchers/component/LocatorSymbols';
|
|
8
9
|
export declare class Select extends BaseComponent {
|
|
9
10
|
private readonly portal;
|
|
10
11
|
readonly buttonOrLinkLocator: Locator;
|
|
11
12
|
readonly selectLabelLocator: Locator;
|
|
13
|
+
readonly [toControlElementLocator]: () => Locator;
|
|
14
|
+
readonly [toValueElementLocator]: () => Promise<Locator>;
|
|
15
|
+
readonly [toFocusableElementLocator]: () => Locator;
|
|
12
16
|
constructor(rootLocator: Locator);
|
|
17
|
+
private getValueLocator;
|
|
13
18
|
isDisabled(): Promise<boolean>;
|
|
14
19
|
isMenuOpened(): Promise<boolean>;
|
|
15
20
|
isLinkSelect(): Promise<boolean>;
|
|
@@ -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.Select = void 0;
|
|
55
56
|
var react_ui_1 = require("@skbkontur/react-ui");
|
|
@@ -63,10 +64,14 @@ var utils_2 = require("../utils");
|
|
|
63
64
|
var ComponentList_1 = require("./ComponentList");
|
|
64
65
|
var MenuItem_1 = require("./MenuItem");
|
|
65
66
|
var dataTidSelector_1 = require("../utils/dataTidSelector");
|
|
67
|
+
var LocatorSymbols_1 = require("../matchers/component/LocatorSymbols");
|
|
66
68
|
var Select = /** @class */ (function (_super) {
|
|
67
69
|
__extends(Select, _super);
|
|
68
70
|
function Select(rootLocator) {
|
|
69
71
|
var _this = _super.call(this, rootLocator) || this;
|
|
72
|
+
_this[_a] = function () { return _this.buttonOrLinkLocator; };
|
|
73
|
+
_this[_b] = function () { return _this.getValueLocator(); };
|
|
74
|
+
_this[_c] = function () { return _this.buttonOrLinkLocator; };
|
|
70
75
|
_this.portal = new Portal_1.Portal(rootLocator.locator('noscript'));
|
|
71
76
|
_this.buttonOrLinkLocator = rootLocator
|
|
72
77
|
.locator('button')
|
|
@@ -74,50 +79,60 @@ var Select = /** @class */ (function (_super) {
|
|
|
74
79
|
_this.selectLabelLocator = rootLocator.locator((0, dataTidSelector_1.getDataTidSelector)(react_ui_1.SelectDataTids.label));
|
|
75
80
|
return _this;
|
|
76
81
|
}
|
|
82
|
+
Select.prototype.getValueLocator = function () {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
+
return __generator(this, function (_d) {
|
|
85
|
+
switch (_d.label) {
|
|
86
|
+
case 0: return [4 /*yield*/, this.isLinkSelect()];
|
|
87
|
+
case 1: return [2 /*return*/, (_d.sent()) ? this.buttonOrLinkLocator : this.selectLabelLocator];
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
};
|
|
77
92
|
Select.prototype.isDisabled = function () {
|
|
78
93
|
return __awaiter(this, void 0, void 0, function () {
|
|
79
|
-
return __generator(this, function (
|
|
80
|
-
switch (
|
|
94
|
+
return __generator(this, function (_d) {
|
|
95
|
+
switch (_d.label) {
|
|
81
96
|
case 0: return [4 /*yield*/, this.isLinkSelect()];
|
|
82
97
|
case 1:
|
|
83
|
-
if (!
|
|
98
|
+
if (!_d.sent()) return [3 /*break*/, 4];
|
|
84
99
|
return [4 /*yield*/, this.waitFor()];
|
|
85
100
|
case 2:
|
|
86
|
-
|
|
101
|
+
_d.sent();
|
|
87
102
|
return [4 /*yield*/, this.buttonOrLinkLocator.getAttribute(utils_1.DataVisualState.Disabled)];
|
|
88
|
-
case 3: return [2 /*return*/, (
|
|
103
|
+
case 3: return [2 /*return*/, (_d.sent()) !== null];
|
|
89
104
|
case 4: return [4 /*yield*/, this.buttonOrLinkLocator.isDisabled()];
|
|
90
|
-
case 5: return [2 /*return*/,
|
|
105
|
+
case 5: return [2 /*return*/, _d.sent()];
|
|
91
106
|
}
|
|
92
107
|
});
|
|
93
108
|
});
|
|
94
109
|
};
|
|
95
110
|
Select.prototype.isMenuOpened = function () {
|
|
96
111
|
return __awaiter(this, void 0, void 0, function () {
|
|
97
|
-
return __generator(this, function (
|
|
98
|
-
switch (
|
|
112
|
+
return __generator(this, function (_d) {
|
|
113
|
+
switch (_d.label) {
|
|
99
114
|
case 0: return [4 /*yield*/, this.portal.isVisible()];
|
|
100
|
-
case 1: return [2 /*return*/,
|
|
115
|
+
case 1: return [2 /*return*/, _d.sent()];
|
|
101
116
|
}
|
|
102
117
|
});
|
|
103
118
|
});
|
|
104
119
|
};
|
|
105
120
|
Select.prototype.isLinkSelect = function () {
|
|
106
121
|
return __awaiter(this, void 0, void 0, function () {
|
|
107
|
-
return __generator(this, function (
|
|
108
|
-
switch (
|
|
122
|
+
return __generator(this, function (_d) {
|
|
123
|
+
switch (_d.label) {
|
|
109
124
|
case 0: return [4 /*yield*/, this.buttonOrLinkLocator.getAttribute('type')];
|
|
110
|
-
case 1: return [2 /*return*/, (
|
|
125
|
+
case 1: return [2 /*return*/, (_d.sent()) !== 'button'];
|
|
111
126
|
}
|
|
112
127
|
});
|
|
113
128
|
});
|
|
114
129
|
};
|
|
115
130
|
Select.prototype.getSelectedValue = function (options) {
|
|
116
131
|
return __awaiter(this, void 0, void 0, function () {
|
|
117
|
-
return __generator(this, function (
|
|
118
|
-
switch (
|
|
132
|
+
return __generator(this, function (_d) {
|
|
133
|
+
switch (_d.label) {
|
|
119
134
|
case 0: return [4 /*yield*/, this.buttonOrLinkLocator.innerText(options)];
|
|
120
|
-
case 1: return [2 /*return*/,
|
|
135
|
+
case 1: return [2 /*return*/, _d.sent()];
|
|
121
136
|
}
|
|
122
137
|
});
|
|
123
138
|
});
|
|
@@ -125,14 +140,14 @@ var Select = /** @class */ (function (_super) {
|
|
|
125
140
|
Select.prototype.fillSearch = function (searchText, options) {
|
|
126
141
|
return __awaiter(this, void 0, void 0, function () {
|
|
127
142
|
var searchInput;
|
|
128
|
-
return __generator(this, function (
|
|
129
|
-
switch (
|
|
143
|
+
return __generator(this, function (_d) {
|
|
144
|
+
switch (_d.label) {
|
|
130
145
|
case 0: return [4 /*yield*/, this.getSearchInput()];
|
|
131
146
|
case 1:
|
|
132
|
-
searchInput =
|
|
147
|
+
searchInput = _d.sent();
|
|
133
148
|
return [4 /*yield*/, searchInput.fill(searchText, options)];
|
|
134
149
|
case 2:
|
|
135
|
-
|
|
150
|
+
_d.sent();
|
|
136
151
|
return [2 /*return*/];
|
|
137
152
|
}
|
|
138
153
|
});
|
|
@@ -145,14 +160,14 @@ var Select = /** @class */ (function (_super) {
|
|
|
145
160
|
Select.prototype.selectFirst = function (text, options) {
|
|
146
161
|
return __awaiter(this, void 0, void 0, function () {
|
|
147
162
|
var items;
|
|
148
|
-
return __generator(this, function (
|
|
149
|
-
switch (
|
|
163
|
+
return __generator(this, function (_d) {
|
|
164
|
+
switch (_d.label) {
|
|
150
165
|
case 0: return [4 /*yield*/, this.getMenuItemsLocator(text)];
|
|
151
166
|
case 1:
|
|
152
|
-
items =
|
|
167
|
+
items = _d.sent();
|
|
153
168
|
return [4 /*yield*/, items.first().click(options)];
|
|
154
169
|
case 2:
|
|
155
|
-
|
|
170
|
+
_d.sent();
|
|
156
171
|
return [2 /*return*/];
|
|
157
172
|
}
|
|
158
173
|
});
|
|
@@ -161,17 +176,17 @@ var Select = /** @class */ (function (_super) {
|
|
|
161
176
|
Select.prototype.select = function (text, options) {
|
|
162
177
|
return __awaiter(this, void 0, void 0, function () {
|
|
163
178
|
var items;
|
|
164
|
-
return __generator(this, function (
|
|
165
|
-
switch (
|
|
179
|
+
return __generator(this, function (_d) {
|
|
180
|
+
switch (_d.label) {
|
|
166
181
|
case 0: return [4 /*yield*/, this.getMenuItemsLocator(text)];
|
|
167
182
|
case 1:
|
|
168
|
-
items =
|
|
183
|
+
items = _d.sent();
|
|
169
184
|
return [4 /*yield*/, (0, test_1.expect)(items).toHaveCount(1)];
|
|
170
185
|
case 2:
|
|
171
|
-
|
|
186
|
+
_d.sent();
|
|
172
187
|
return [4 /*yield*/, items.click(options)];
|
|
173
188
|
case 3:
|
|
174
|
-
|
|
189
|
+
_d.sent();
|
|
175
190
|
return [2 /*return*/];
|
|
176
191
|
}
|
|
177
192
|
});
|
|
@@ -179,14 +194,14 @@ var Select = /** @class */ (function (_super) {
|
|
|
179
194
|
};
|
|
180
195
|
Select.prototype.focus = function (options) {
|
|
181
196
|
return __awaiter(this, void 0, void 0, function () {
|
|
182
|
-
return __generator(this, function (
|
|
183
|
-
switch (
|
|
197
|
+
return __generator(this, function (_d) {
|
|
198
|
+
switch (_d.label) {
|
|
184
199
|
case 0: return [4 /*yield*/, this.waitEnabled()];
|
|
185
200
|
case 1:
|
|
186
|
-
|
|
201
|
+
_d.sent();
|
|
187
202
|
return [4 /*yield*/, this.buttonOrLinkLocator.focus(options)];
|
|
188
203
|
case 2:
|
|
189
|
-
|
|
204
|
+
_d.sent();
|
|
190
205
|
return [2 /*return*/];
|
|
191
206
|
}
|
|
192
207
|
});
|
|
@@ -194,11 +209,11 @@ var Select = /** @class */ (function (_super) {
|
|
|
194
209
|
};
|
|
195
210
|
Select.prototype.blur = function (options) {
|
|
196
211
|
return __awaiter(this, void 0, void 0, function () {
|
|
197
|
-
return __generator(this, function (
|
|
198
|
-
switch (
|
|
212
|
+
return __generator(this, function (_d) {
|
|
213
|
+
switch (_d.label) {
|
|
199
214
|
case 0: return [4 /*yield*/, this.buttonOrLinkLocator.blur(options)];
|
|
200
215
|
case 1:
|
|
201
|
-
|
|
216
|
+
_d.sent();
|
|
202
217
|
return [2 /*return*/];
|
|
203
218
|
}
|
|
204
219
|
});
|
|
@@ -206,8 +221,8 @@ var Select = /** @class */ (function (_super) {
|
|
|
206
221
|
};
|
|
207
222
|
Select.prototype.click = function (options) {
|
|
208
223
|
return __awaiter(this, void 0, void 0, function () {
|
|
209
|
-
return __generator(this, function (
|
|
210
|
-
switch (
|
|
224
|
+
return __generator(this, function (_d) {
|
|
225
|
+
switch (_d.label) {
|
|
211
226
|
case 0:
|
|
212
227
|
// note: rootLocator всегда в состоянии enabled, даже если Select disabled
|
|
213
228
|
// чтобы не было гонок дожидаемся доступности компонента, перед тем как взаимодействовать с ним
|
|
@@ -215,10 +230,10 @@ var Select = /** @class */ (function (_super) {
|
|
|
215
230
|
case 1:
|
|
216
231
|
// note: rootLocator всегда в состоянии enabled, даже если Select disabled
|
|
217
232
|
// чтобы не было гонок дожидаемся доступности компонента, перед тем как взаимодействовать с ним
|
|
218
|
-
|
|
233
|
+
_d.sent();
|
|
219
234
|
return [4 /*yield*/, _super.prototype.click.call(this, options)];
|
|
220
235
|
case 2:
|
|
221
|
-
|
|
236
|
+
_d.sent();
|
|
222
237
|
return [2 /*return*/];
|
|
223
238
|
}
|
|
224
239
|
});
|
|
@@ -226,11 +241,11 @@ var Select = /** @class */ (function (_super) {
|
|
|
226
241
|
};
|
|
227
242
|
Select.prototype.getTooltip = function (type) {
|
|
228
243
|
return __awaiter(this, void 0, void 0, function () {
|
|
229
|
-
return __generator(this, function (
|
|
230
|
-
switch (
|
|
244
|
+
return __generator(this, function (_d) {
|
|
245
|
+
switch (_d.label) {
|
|
231
246
|
case 0: return [4 /*yield*/, this.click()];
|
|
232
247
|
case 1:
|
|
233
|
-
|
|
248
|
+
_d.sent();
|
|
234
249
|
return [2 /*return*/, (0, utils_2.getTooltip)(type, this)];
|
|
235
250
|
}
|
|
236
251
|
});
|
|
@@ -245,14 +260,14 @@ var Select = /** @class */ (function (_super) {
|
|
|
245
260
|
Select.prototype.getMenuItems = function () {
|
|
246
261
|
return __awaiter(this, void 0, void 0, function () {
|
|
247
262
|
var container;
|
|
248
|
-
return __generator(this, function (
|
|
249
|
-
switch (
|
|
263
|
+
return __generator(this, function (_d) {
|
|
264
|
+
switch (_d.label) {
|
|
250
265
|
case 0: return [4 /*yield*/, this.getPortalContainer()];
|
|
251
266
|
case 1:
|
|
252
|
-
container =
|
|
267
|
+
container = _d.sent();
|
|
253
268
|
return [4 /*yield*/, container.locator((0, dataTidSelector_1.getDataTidSelector)(react_ui_1.SpinnerDataTids.root)).waitFor({ state: 'hidden' })];
|
|
254
269
|
case 2:
|
|
255
|
-
|
|
270
|
+
_d.sent();
|
|
256
271
|
return [2 /*return*/, new ComponentList_1.ComponentList(container, function (locator) {
|
|
257
272
|
return locator
|
|
258
273
|
.locator((0, dataTidSelector_1.getDataTidSelector)(react_ui_1.MenuItemDataTids.root))
|
|
@@ -267,23 +282,23 @@ var Select = /** @class */ (function (_super) {
|
|
|
267
282
|
return __awaiter(this, void 0, void 0, function () {
|
|
268
283
|
var items;
|
|
269
284
|
var _this = this;
|
|
270
|
-
return __generator(this, function (
|
|
271
|
-
switch (
|
|
285
|
+
return __generator(this, function (_d) {
|
|
286
|
+
switch (_d.label) {
|
|
272
287
|
case 0: return [4 /*yield*/, this.getMenuItems()];
|
|
273
288
|
case 1:
|
|
274
|
-
items =
|
|
289
|
+
items = _d.sent();
|
|
275
290
|
return [4 /*yield*/, items.getFirstItemByPredicate(function (item) { return __awaiter(_this, void 0, void 0, function () {
|
|
276
291
|
var itemText;
|
|
277
|
-
return __generator(this, function (
|
|
278
|
-
switch (
|
|
292
|
+
return __generator(this, function (_d) {
|
|
293
|
+
switch (_d.label) {
|
|
279
294
|
case 0: return [4 /*yield*/, item.getText()];
|
|
280
295
|
case 1:
|
|
281
|
-
itemText =
|
|
296
|
+
itemText = _d.sent();
|
|
282
297
|
return [2 /*return*/, itemText.toLowerCase() === text.toLowerCase()];
|
|
283
298
|
}
|
|
284
299
|
});
|
|
285
300
|
}); })];
|
|
286
|
-
case 2: return [2 /*return*/,
|
|
301
|
+
case 2: return [2 /*return*/, _d.sent()];
|
|
287
302
|
}
|
|
288
303
|
});
|
|
289
304
|
});
|
|
@@ -291,11 +306,11 @@ var Select = /** @class */ (function (_super) {
|
|
|
291
306
|
Select.prototype.getMenuItemByIndex = function (index) {
|
|
292
307
|
return __awaiter(this, void 0, void 0, function () {
|
|
293
308
|
var items;
|
|
294
|
-
return __generator(this, function (
|
|
295
|
-
switch (
|
|
309
|
+
return __generator(this, function (_d) {
|
|
310
|
+
switch (_d.label) {
|
|
296
311
|
case 0: return [4 /*yield*/, this.getMenuItems()];
|
|
297
312
|
case 1:
|
|
298
|
-
items =
|
|
313
|
+
items = _d.sent();
|
|
299
314
|
return [2 /*return*/, items.getItemByIndex(index)];
|
|
300
315
|
}
|
|
301
316
|
});
|
|
@@ -307,11 +322,11 @@ var Select = /** @class */ (function (_super) {
|
|
|
307
322
|
Select.prototype.getMenuItemsLocator = function (byText) {
|
|
308
323
|
return __awaiter(this, void 0, void 0, function () {
|
|
309
324
|
var container, items;
|
|
310
|
-
return __generator(this, function (
|
|
311
|
-
switch (
|
|
325
|
+
return __generator(this, function (_d) {
|
|
326
|
+
switch (_d.label) {
|
|
312
327
|
case 0: return [4 /*yield*/, this.getPortalContainer()];
|
|
313
328
|
case 1:
|
|
314
|
-
container =
|
|
329
|
+
container = _d.sent();
|
|
315
330
|
items = container.locator((0, dataTidSelector_1.getDataTidSelector)(react_ui_1.MenuItemDataTids.root));
|
|
316
331
|
return [2 /*return*/, items.getByText(byText)];
|
|
317
332
|
}
|
|
@@ -321,11 +336,11 @@ var Select = /** @class */ (function (_super) {
|
|
|
321
336
|
Select.prototype.getSearchInput = function () {
|
|
322
337
|
return __awaiter(this, void 0, void 0, function () {
|
|
323
338
|
var container;
|
|
324
|
-
return __generator(this, function (
|
|
325
|
-
switch (
|
|
339
|
+
return __generator(this, function (_d) {
|
|
340
|
+
switch (_d.label) {
|
|
326
341
|
case 0: return [4 /*yield*/, this.getPortalContainer()];
|
|
327
342
|
case 1:
|
|
328
|
-
container =
|
|
343
|
+
container = _d.sent();
|
|
329
344
|
return [2 /*return*/, container.locator((0, dataTidSelector_1.getDataTidSelector)(react_ui_1.InputDataTids.root))];
|
|
330
345
|
}
|
|
331
346
|
});
|
|
@@ -333,11 +348,11 @@ var Select = /** @class */ (function (_super) {
|
|
|
333
348
|
};
|
|
334
349
|
Select.prototype.getPortalContainer = function () {
|
|
335
350
|
return __awaiter(this, void 0, void 0, function () {
|
|
336
|
-
return __generator(this, function (
|
|
337
|
-
switch (
|
|
351
|
+
return __generator(this, function (_d) {
|
|
352
|
+
switch (_d.label) {
|
|
338
353
|
case 0: return [4 /*yield*/, this.openMenuIfNeeded()];
|
|
339
354
|
case 1:
|
|
340
|
-
|
|
355
|
+
_d.sent();
|
|
341
356
|
return [2 /*return*/, this.portal.getContainer()];
|
|
342
357
|
}
|
|
343
358
|
});
|
|
@@ -345,15 +360,15 @@ var Select = /** @class */ (function (_super) {
|
|
|
345
360
|
};
|
|
346
361
|
Select.prototype.openMenuIfNeeded = function () {
|
|
347
362
|
return __awaiter(this, void 0, void 0, function () {
|
|
348
|
-
return __generator(this, function (
|
|
349
|
-
switch (
|
|
363
|
+
return __generator(this, function (_d) {
|
|
364
|
+
switch (_d.label) {
|
|
350
365
|
case 0: return [4 /*yield*/, this.isMenuOpened()];
|
|
351
366
|
case 1:
|
|
352
|
-
if (!!(
|
|
367
|
+
if (!!(_d.sent())) return [3 /*break*/, 3];
|
|
353
368
|
return [4 /*yield*/, this.buttonOrLinkLocator.click()];
|
|
354
369
|
case 2:
|
|
355
|
-
|
|
356
|
-
|
|
370
|
+
_d.sent();
|
|
371
|
+
_d.label = 3;
|
|
357
372
|
case 3: return [2 /*return*/];
|
|
358
373
|
}
|
|
359
374
|
});
|
|
@@ -361,19 +376,19 @@ var Select = /** @class */ (function (_super) {
|
|
|
361
376
|
};
|
|
362
377
|
Select.prototype.waitEnabled = function () {
|
|
363
378
|
return __awaiter(this, void 0, void 0, function () {
|
|
364
|
-
return __generator(this, function (
|
|
365
|
-
switch (
|
|
379
|
+
return __generator(this, function (_d) {
|
|
380
|
+
switch (_d.label) {
|
|
366
381
|
case 0: return [4 /*yield*/, this.isLinkSelect()];
|
|
367
382
|
case 1:
|
|
368
|
-
if (!
|
|
383
|
+
if (!_d.sent()) return [3 /*break*/, 3];
|
|
369
384
|
return [4 /*yield*/, (0, test_1.expect)(this.buttonOrLinkLocator).not.toHaveAttribute(utils_1.DataVisualState.Disabled)];
|
|
370
385
|
case 2:
|
|
371
|
-
|
|
386
|
+
_d.sent();
|
|
372
387
|
return [3 /*break*/, 5];
|
|
373
388
|
case 3: return [4 /*yield*/, (0, test_1.expect)(this.buttonOrLinkLocator).toBeEnabled()];
|
|
374
389
|
case 4:
|
|
375
|
-
|
|
376
|
-
|
|
390
|
+
_d.sent();
|
|
391
|
+
_d.label = 5;
|
|
377
392
|
case 5: return [2 /*return*/];
|
|
378
393
|
}
|
|
379
394
|
});
|
|
@@ -382,3 +397,4 @@ var Select = /** @class */ (function (_super) {
|
|
|
382
397
|
return Select;
|
|
383
398
|
}(BaseComponent_1.BaseComponent));
|
|
384
399
|
exports.Select = Select;
|
|
400
|
+
_a = LocatorSymbols_1.toControlElementLocator, _b = LocatorSymbols_1.toValueElementLocator, _c = LocatorSymbols_1.toFocusableElementLocator;
|
|
@@ -2,8 +2,10 @@ import type { Locator } from '@playwright/test';
|
|
|
2
2
|
import { BaseComponent } from './BaseComponent';
|
|
3
3
|
import { SpinnerAssertions } from '../assertions';
|
|
4
4
|
import type { InnerTextOptions } from '../options';
|
|
5
|
+
import { toTextElementLocator } from '../matchers/component/LocatorSymbols';
|
|
5
6
|
export declare class Spinner extends BaseComponent {
|
|
6
7
|
readonly rootLocator: Locator;
|
|
8
|
+
readonly [toTextElementLocator]: () => Locator;
|
|
7
9
|
constructor(rootLocator: Locator);
|
|
8
10
|
getText(options?: InnerTextOptions): Promise<string>;
|
|
9
11
|
waitLoading(options?: {
|