@skbkontur/playwright-react-ui-components 1.13.0
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/index.d.ts +1 -0
- package/build/index.js +17 -0
- package/build/src/assertions/AutocompleteAssertions.d.ts +19 -0
- package/build/src/assertions/AutocompleteAssertions.js +177 -0
- package/build/src/assertions/BaseComponentAssertions.d.ts +15 -0
- package/build/src/assertions/BaseComponentAssertions.js +158 -0
- package/build/src/assertions/ButtonAssertions.d.ts +15 -0
- package/build/src/assertions/ButtonAssertions.js +162 -0
- package/build/src/assertions/CheckboxAssertions.d.ts +19 -0
- package/build/src/assertions/CheckboxAssertions.js +210 -0
- package/build/src/assertions/ComboBoxAssertions.d.ts +19 -0
- package/build/src/assertions/ComboBoxAssertions.js +304 -0
- package/build/src/assertions/ComponentListAssertions.d.ts +13 -0
- package/build/src/assertions/ComponentListAssertions.js +126 -0
- package/build/src/assertions/CurrencyInputAssertions.d.ts +15 -0
- package/build/src/assertions/CurrencyInputAssertions.js +212 -0
- package/build/src/assertions/DateInputAssertions.d.ts +15 -0
- package/build/src/assertions/DateInputAssertions.js +162 -0
- package/build/src/assertions/DatePickerAssertions.d.ts +15 -0
- package/build/src/assertions/DatePickerAssertions.js +162 -0
- package/build/src/assertions/DateRangePickerAssertions.d.ts +11 -0
- package/build/src/assertions/DateRangePickerAssertions.js +111 -0
- package/build/src/assertions/DropdownAssertions.d.ts +19 -0
- package/build/src/assertions/DropdownAssertions.js +260 -0
- package/build/src/assertions/DropdownMenuAssertions.d.ts +17 -0
- package/build/src/assertions/DropdownMenuAssertions.js +236 -0
- package/build/src/assertions/FileUploaderAssertions.d.ts +14 -0
- package/build/src/assertions/FileUploaderAssertions.js +119 -0
- package/build/src/assertions/FxInputAssertions.d.ts +17 -0
- package/build/src/assertions/FxInputAssertions.js +189 -0
- package/build/src/assertions/InputAssertions.d.ts +19 -0
- package/build/src/assertions/InputAssertions.js +177 -0
- package/build/src/assertions/KebabAssertions.d.ts +13 -0
- package/build/src/assertions/KebabAssertions.js +189 -0
- package/build/src/assertions/LabelAssertions.d.ts +19 -0
- package/build/src/assertions/LabelAssertions.js +144 -0
- package/build/src/assertions/LinkAssertions.d.ts +17 -0
- package/build/src/assertions/LinkAssertions.js +187 -0
- package/build/src/assertions/LoaderAssertions.d.ts +8 -0
- package/build/src/assertions/LoaderAssertions.js +78 -0
- package/build/src/assertions/MenuItemAssertations.d.ts +11 -0
- package/build/src/assertions/MenuItemAssertations.js +114 -0
- package/build/src/assertions/PagingAssertions.d.ts +15 -0
- package/build/src/assertions/PagingAssertions.js +149 -0
- package/build/src/assertions/PortalAssertions.d.ts +9 -0
- package/build/src/assertions/PortalAssertions.js +90 -0
- package/build/src/assertions/RadioAssertions.d.ts +19 -0
- package/build/src/assertions/RadioAssertions.js +210 -0
- package/build/src/assertions/RadioGroupAssertions.d.ts +15 -0
- package/build/src/assertions/RadioGroupAssertions.js +233 -0
- package/build/src/assertions/SelectAssertions.d.ts +15 -0
- package/build/src/assertions/SelectAssertions.js +211 -0
- package/build/src/assertions/SpinnerAssertions.d.ts +8 -0
- package/build/src/assertions/SpinnerAssertions.js +78 -0
- package/build/src/assertions/TabAssertions.d.ts +17 -0
- package/build/src/assertions/TabAssertions.js +187 -0
- package/build/src/assertions/TabsAssertions.d.ts +11 -0
- package/build/src/assertions/TabsAssertions.js +130 -0
- package/build/src/assertions/TextareaAssertions.d.ts +15 -0
- package/build/src/assertions/TextareaAssertions.js +162 -0
- package/build/src/assertions/ToastAssertions.d.ts +8 -0
- package/build/src/assertions/ToastAssertions.js +78 -0
- package/build/src/assertions/ToggleAssertions.d.ts +17 -0
- package/build/src/assertions/ToggleAssertions.js +186 -0
- package/build/src/assertions/TokenAssertions.d.ts +17 -0
- package/build/src/assertions/TokenAssertions.js +159 -0
- package/build/src/assertions/TokenInputAssertions.d.ts +16 -0
- package/build/src/assertions/TokenInputAssertions.js +170 -0
- package/build/src/assertions/TooltipAssertions.d.ts +11 -0
- package/build/src/assertions/TooltipAssertions.js +114 -0
- package/build/src/assertions/index.d.ts +34 -0
- package/build/src/assertions/index.js +71 -0
- package/build/src/components/Autocomplete.d.ts +25 -0
- package/build/src/components/Autocomplete.js +256 -0
- package/build/src/components/BaseComponent.d.ts +18 -0
- package/build/src/components/BaseComponent.js +159 -0
- package/build/src/components/Button.d.ts +21 -0
- package/build/src/components/Button.js +146 -0
- package/build/src/components/Checkbox.d.ts +21 -0
- package/build/src/components/Checkbox.js +161 -0
- package/build/src/components/ComboBox.d.ts +41 -0
- package/build/src/components/ComboBox.js +292 -0
- package/build/src/components/ComponentList.d.ts +21 -0
- package/build/src/components/ComponentList.js +203 -0
- package/build/src/components/CurrencyInput.d.ts +21 -0
- package/build/src/components/CurrencyInput.js +201 -0
- package/build/src/components/DateInput.d.ts +18 -0
- package/build/src/components/DateInput.js +195 -0
- package/build/src/components/DatePicker.d.ts +20 -0
- package/build/src/components/DatePicker.js +205 -0
- package/build/src/components/DateRangePicker.d.ts +20 -0
- package/build/src/components/DateRangePicker.js +111 -0
- package/build/src/components/Dropdown.d.ts +35 -0
- package/build/src/components/Dropdown.js +322 -0
- package/build/src/components/DropdownMenu.d.ts +40 -0
- package/build/src/components/DropdownMenu.js +321 -0
- package/build/src/components/FileUploader.d.ts +54 -0
- package/build/src/components/FileUploader.js +213 -0
- package/build/src/components/FxInput.d.ts +23 -0
- package/build/src/components/FxInput.js +217 -0
- package/build/src/components/Input.d.ts +21 -0
- package/build/src/components/Input.js +192 -0
- package/build/src/components/Kebab.d.ts +27 -0
- package/build/src/components/Kebab.js +247 -0
- package/build/src/components/Label.d.ts +13 -0
- package/build/src/components/Label.js +94 -0
- package/build/src/components/Link.d.ts +16 -0
- package/build/src/components/Link.js +130 -0
- package/build/src/components/Loader.d.ts +11 -0
- package/build/src/components/Loader.js +103 -0
- package/build/src/components/MenuItem.d.ts +13 -0
- package/build/src/components/MenuItem.js +84 -0
- package/build/src/components/Paging.d.ts +25 -0
- package/build/src/components/Paging.js +249 -0
- package/build/src/components/Portal.d.ts +11 -0
- package/build/src/components/Portal.js +112 -0
- package/build/src/components/Radio.d.ts +19 -0
- package/build/src/components/Radio.js +156 -0
- package/build/src/components/RadioGroup.d.ts +21 -0
- package/build/src/components/RadioGroup.js +232 -0
- package/build/src/components/Select.d.ts +43 -0
- package/build/src/components/Select.js +384 -0
- package/build/src/components/Spinner.d.ts +12 -0
- package/build/src/components/Spinner.js +103 -0
- package/build/src/components/Tab.d.ts +16 -0
- package/build/src/components/Tab.js +126 -0
- package/build/src/components/Tabs.d.ts +18 -0
- package/build/src/components/Tabs.js +136 -0
- package/build/src/components/Textarea.d.ts +21 -0
- package/build/src/components/Textarea.js +186 -0
- package/build/src/components/Toast.d.ts +10 -0
- package/build/src/components/Toast.js +79 -0
- package/build/src/components/Toggle.d.ts +19 -0
- package/build/src/components/Toggle.js +151 -0
- package/build/src/components/Token.d.ts +13 -0
- package/build/src/components/Token.js +106 -0
- package/build/src/components/TokenInput.d.ts +44 -0
- package/build/src/components/TokenInput.js +319 -0
- package/build/src/components/Tooltip.d.ts +14 -0
- package/build/src/components/Tooltip.js +98 -0
- package/build/src/components/index.d.ts +34 -0
- package/build/src/components/index.js +71 -0
- package/build/src/index.d.ts +5 -0
- package/build/src/index.js +21 -0
- package/build/src/matchers/formattedMatchers.d.ts +37 -0
- package/build/src/matchers/formattedMatchers.js +125 -0
- package/build/src/matchers/index.d.ts +2 -0
- package/build/src/matchers/index.js +20 -0
- package/build/src/matchers/mergedExpects.d.ts +25 -0
- package/build/src/matchers/mergedExpects.js +6 -0
- package/build/src/options/AssertionOptions.d.ts +82 -0
- package/build/src/options/AssertionOptions.js +2 -0
- package/build/src/options/LocatorOptions.d.ts +342 -0
- package/build/src/options/LocatorOptions.js +2 -0
- package/build/src/options/index.d.ts +2 -0
- package/build/src/options/index.js +18 -0
- package/build/src/utils/constants.d.ts +10 -0
- package/build/src/utils/constants.js +15 -0
- package/build/src/utils/dataTidSelector.d.ts +1 -0
- package/build/src/utils/dataTidSelector.js +6 -0
- package/build/src/utils/index.d.ts +2 -0
- package/build/src/utils/index.js +20 -0
- package/build/src/utils/tooltipProvider.d.ts +4 -0
- package/build/src/utils/tooltipProvider.js +95 -0
- package/package.json +27 -0
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.TokenInput = void 0;
|
|
55
|
+
var test_1 = require("@playwright/test");
|
|
56
|
+
var react_ui_1 = require("@skbkontur/react-ui");
|
|
57
|
+
var CustomComboBox_1 = require("@skbkontur/react-ui/internal/CustomComboBox");
|
|
58
|
+
var MenuFooter_1 = require("@skbkontur/react-ui/components/MenuFooter");
|
|
59
|
+
var Portal_1 = require("./Portal");
|
|
60
|
+
var ComponentList_1 = require("./ComponentList");
|
|
61
|
+
var BaseComponent_1 = require("./BaseComponent");
|
|
62
|
+
var Token_1 = require("./Token");
|
|
63
|
+
var utils_1 = require("../utils");
|
|
64
|
+
var assertions_1 = require("../assertions");
|
|
65
|
+
var MenuItem_1 = require("./MenuItem");
|
|
66
|
+
var dataTidSelector_1 = require("../utils/dataTidSelector");
|
|
67
|
+
var TokenInput = /** @class */ (function (_super) {
|
|
68
|
+
__extends(TokenInput, _super);
|
|
69
|
+
function TokenInput(rootLocator) {
|
|
70
|
+
var _this = _super.call(this, rootLocator) || this;
|
|
71
|
+
_this.rootLocator = rootLocator;
|
|
72
|
+
_this.portal = new Portal_1.Portal(rootLocator.locator('noscript'));
|
|
73
|
+
_this.textareaLocator = rootLocator.locator('textarea');
|
|
74
|
+
_this.tokens = new ComponentList_1.ComponentList(_this.rootLocator, function (locator) { return locator.locator((0, dataTidSelector_1.getDataTidSelector)(react_ui_1.TokenDataTids.root)); }, function (locator) { return new Token_1.Token(locator); });
|
|
75
|
+
return _this;
|
|
76
|
+
}
|
|
77
|
+
TokenInput.prototype.isDisabled = function (options) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
79
|
+
return __generator(this, function (_a) {
|
|
80
|
+
switch (_a.label) {
|
|
81
|
+
case 0: return [4 /*yield*/, this.textareaLocator.isDisabled(options)];
|
|
82
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
TokenInput.prototype.fill = function (value, options) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
89
|
+
return __generator(this, function (_a) {
|
|
90
|
+
switch (_a.label) {
|
|
91
|
+
case 0: return [4 /*yield*/, this.textareaLocator.fill(value, options)];
|
|
92
|
+
case 1:
|
|
93
|
+
_a.sent();
|
|
94
|
+
return [2 /*return*/];
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
TokenInput.prototype.clear = function (options) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
101
|
+
var tokens, i;
|
|
102
|
+
return __generator(this, function (_a) {
|
|
103
|
+
switch (_a.label) {
|
|
104
|
+
case 0: return [4 /*yield*/, this.tokens.getItems()];
|
|
105
|
+
case 1:
|
|
106
|
+
tokens = _a.sent();
|
|
107
|
+
i = tokens.length - 1;
|
|
108
|
+
_a.label = 2;
|
|
109
|
+
case 2:
|
|
110
|
+
if (!(i >= 0)) return [3 /*break*/, 5];
|
|
111
|
+
return [4 /*yield*/, tokens[i].remove(options)];
|
|
112
|
+
case 3:
|
|
113
|
+
_a.sent();
|
|
114
|
+
_a.label = 4;
|
|
115
|
+
case 4:
|
|
116
|
+
i--;
|
|
117
|
+
return [3 /*break*/, 2];
|
|
118
|
+
case 5: return [2 /*return*/];
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
TokenInput.prototype.removeTokenByText = function (text, options) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
125
|
+
var token;
|
|
126
|
+
var _this = this;
|
|
127
|
+
return __generator(this, function (_a) {
|
|
128
|
+
switch (_a.label) {
|
|
129
|
+
case 0: return [4 /*yield*/, this.tokens.getFirstItemByPredicate(function (token) { return __awaiter(_this, void 0, void 0, function () { var _a; return __generator(this, function (_b) {
|
|
130
|
+
switch (_b.label) {
|
|
131
|
+
case 0:
|
|
132
|
+
_a = Boolean;
|
|
133
|
+
return [4 /*yield*/, token.getText()];
|
|
134
|
+
case 1: return [2 /*return*/, _a.apply(void 0, [(_b.sent()).match(text)])];
|
|
135
|
+
}
|
|
136
|
+
}); }); })];
|
|
137
|
+
case 1:
|
|
138
|
+
token = _a.sent();
|
|
139
|
+
return [4 /*yield*/, token.remove(options)];
|
|
140
|
+
case 2:
|
|
141
|
+
_a.sent();
|
|
142
|
+
return [2 /*return*/];
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
TokenInput.prototype.removeTokenByIndex = function (index, options) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
149
|
+
var token;
|
|
150
|
+
return __generator(this, function (_a) {
|
|
151
|
+
switch (_a.label) {
|
|
152
|
+
case 0: return [4 /*yield*/, this.tokens.getItemByIndex(index)];
|
|
153
|
+
case 1:
|
|
154
|
+
token = _a.sent();
|
|
155
|
+
return [4 /*yield*/, token.remove(options)];
|
|
156
|
+
case 2:
|
|
157
|
+
_a.sent();
|
|
158
|
+
return [2 /*return*/];
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Символ, который разделяет введенный текст на токены. По умолчанию - запятая
|
|
165
|
+
*/
|
|
166
|
+
TokenInput.prototype.add = function () {
|
|
167
|
+
return __awaiter(this, arguments, void 0, function (delimiter) {
|
|
168
|
+
if (delimiter === void 0) { delimiter = ','; }
|
|
169
|
+
return __generator(this, function (_a) {
|
|
170
|
+
switch (_a.label) {
|
|
171
|
+
case 0:
|
|
172
|
+
if (delimiter.length != 1) {
|
|
173
|
+
throw new Error('Разделитель должен состоять из одного символа');
|
|
174
|
+
}
|
|
175
|
+
return [4 /*yield*/, this.textareaLocator.press(delimiter)];
|
|
176
|
+
case 1:
|
|
177
|
+
_a.sent();
|
|
178
|
+
return [2 /*return*/];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Используй этот метод, когда в меню существует несколько элементов с одинаковым названием
|
|
185
|
+
* В остальных случаях лучше использовать `select`
|
|
186
|
+
*/
|
|
187
|
+
TokenInput.prototype.selectFirst = function (value, options) {
|
|
188
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
189
|
+
var items;
|
|
190
|
+
return __generator(this, function (_a) {
|
|
191
|
+
switch (_a.label) {
|
|
192
|
+
case 0: return [4 /*yield*/, this.getMenuItemsLocator(value)];
|
|
193
|
+
case 1:
|
|
194
|
+
items = _a.sent();
|
|
195
|
+
return [4 /*yield*/, items.first().click(options)];
|
|
196
|
+
case 2:
|
|
197
|
+
_a.sent();
|
|
198
|
+
return [2 /*return*/];
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
TokenInput.prototype.select = function (value, options) {
|
|
204
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
205
|
+
var items;
|
|
206
|
+
return __generator(this, function (_a) {
|
|
207
|
+
switch (_a.label) {
|
|
208
|
+
case 0: return [4 /*yield*/, this.getMenuItemsLocator(value)];
|
|
209
|
+
case 1:
|
|
210
|
+
items = _a.sent();
|
|
211
|
+
return [4 /*yield*/, (0, test_1.expect)(items).toHaveCount(1)];
|
|
212
|
+
case 2:
|
|
213
|
+
_a.sent();
|
|
214
|
+
return [4 /*yield*/, items.click(options)];
|
|
215
|
+
case 3:
|
|
216
|
+
_a.sent();
|
|
217
|
+
return [2 /*return*/];
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
};
|
|
222
|
+
TokenInput.prototype.focus = function (options) {
|
|
223
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
224
|
+
return __generator(this, function (_a) {
|
|
225
|
+
switch (_a.label) {
|
|
226
|
+
case 0: return [4 /*yield*/, (0, test_1.expect)(this.textareaLocator).toBeEnabled()];
|
|
227
|
+
case 1:
|
|
228
|
+
_a.sent();
|
|
229
|
+
return [4 /*yield*/, this.textareaLocator.focus(options)];
|
|
230
|
+
case 2:
|
|
231
|
+
_a.sent();
|
|
232
|
+
return [2 /*return*/];
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
TokenInput.prototype.blur = function (options) {
|
|
238
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
239
|
+
return __generator(this, function (_a) {
|
|
240
|
+
switch (_a.label) {
|
|
241
|
+
case 0: return [4 /*yield*/, this.textareaLocator.blur(options)];
|
|
242
|
+
case 1:
|
|
243
|
+
_a.sent();
|
|
244
|
+
return [2 /*return*/];
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
};
|
|
249
|
+
TokenInput.prototype.click = function (options) {
|
|
250
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
251
|
+
return __generator(this, function (_a) {
|
|
252
|
+
switch (_a.label) {
|
|
253
|
+
case 0: return [4 /*yield*/, this.textareaLocator.click(options)];
|
|
254
|
+
case 1:
|
|
255
|
+
_a.sent();
|
|
256
|
+
return [2 /*return*/];
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
TokenInput.prototype.getTooltip = function (type) {
|
|
262
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
263
|
+
return __generator(this, function (_a) {
|
|
264
|
+
return [2 /*return*/, (0, utils_1.getTooltip)(type, this)];
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* Возвращает список меню по data-tid'ам из react-ui:
|
|
270
|
+
* - MenuItemDataTids.root
|
|
271
|
+
* - ComboBoxMenuDataTids.item
|
|
272
|
+
* - MenuHeaderDataTids.root
|
|
273
|
+
* - MenuFooterDataTids.root
|
|
274
|
+
*/
|
|
275
|
+
TokenInput.prototype.getMenuItems = function () {
|
|
276
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
277
|
+
var container;
|
|
278
|
+
return __generator(this, function (_a) {
|
|
279
|
+
switch (_a.label) {
|
|
280
|
+
case 0: return [4 /*yield*/, this.focus()];
|
|
281
|
+
case 1:
|
|
282
|
+
_a.sent();
|
|
283
|
+
return [4 /*yield*/, this.portal.getContainer()];
|
|
284
|
+
case 2:
|
|
285
|
+
container = _a.sent();
|
|
286
|
+
return [4 /*yield*/, container.locator((0, dataTidSelector_1.getDataTidSelector)(react_ui_1.SpinnerDataTids.root)).waitFor({ state: 'hidden' })];
|
|
287
|
+
case 3:
|
|
288
|
+
_a.sent();
|
|
289
|
+
return [2 /*return*/, new ComponentList_1.ComponentList(container, function (locator) {
|
|
290
|
+
return locator
|
|
291
|
+
.locator((0, dataTidSelector_1.getDataTidSelector)(react_ui_1.MenuItemDataTids.root))
|
|
292
|
+
.or(locator.locator((0, dataTidSelector_1.getDataTidSelector)(CustomComboBox_1.ComboBoxMenuDataTids.item)))
|
|
293
|
+
.or(locator.locator((0, dataTidSelector_1.getDataTidSelector)(react_ui_1.MenuHeaderDataTids.root)))
|
|
294
|
+
.or(locator.locator((0, dataTidSelector_1.getDataTidSelector)(MenuFooter_1.MenuFooterDataTids.root)));
|
|
295
|
+
}, function (locator) { return new MenuItem_1.MenuItem(locator); })];
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
});
|
|
299
|
+
};
|
|
300
|
+
TokenInput.prototype.expect = function () {
|
|
301
|
+
return new assertions_1.TokenInputAssertions(this);
|
|
302
|
+
};
|
|
303
|
+
TokenInput.prototype.getMenuItemsLocator = function (byText) {
|
|
304
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
305
|
+
var container, items;
|
|
306
|
+
return __generator(this, function (_a) {
|
|
307
|
+
switch (_a.label) {
|
|
308
|
+
case 0: return [4 /*yield*/, this.portal.getContainer()];
|
|
309
|
+
case 1:
|
|
310
|
+
container = _a.sent();
|
|
311
|
+
items = container.locator((0, dataTidSelector_1.getDataTidSelector)(CustomComboBox_1.ComboBoxMenuDataTids.item));
|
|
312
|
+
return [2 /*return*/, items.getByText(byText)];
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
};
|
|
317
|
+
return TokenInput;
|
|
318
|
+
}(BaseComponent_1.BaseComponent));
|
|
319
|
+
exports.TokenInput = TokenInput;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Locator } from '@playwright/test';
|
|
2
|
+
import { BaseComponent } from './BaseComponent';
|
|
3
|
+
import { TooltipAssertions } from '../assertions';
|
|
4
|
+
import type { InnerTextOptions } from '../options';
|
|
5
|
+
export declare class Tooltip extends BaseComponent {
|
|
6
|
+
readonly rootLocator: Locator;
|
|
7
|
+
private readonly closeLocator;
|
|
8
|
+
private readonly contentLocator;
|
|
9
|
+
constructor(rootLocator: Locator);
|
|
10
|
+
getText(options?: InnerTextOptions): Promise<string>;
|
|
11
|
+
getContent(): Locator;
|
|
12
|
+
close(): Promise<void>;
|
|
13
|
+
expect(): TooltipAssertions;
|
|
14
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.Tooltip = void 0;
|
|
55
|
+
var Tooltip_1 = require("@skbkontur/react-ui/components/Tooltip");
|
|
56
|
+
var BaseComponent_1 = require("./BaseComponent");
|
|
57
|
+
var assertions_1 = require("../assertions");
|
|
58
|
+
var dataTidSelector_1 = require("../utils/dataTidSelector");
|
|
59
|
+
var Tooltip = /** @class */ (function (_super) {
|
|
60
|
+
__extends(Tooltip, _super);
|
|
61
|
+
function Tooltip(rootLocator) {
|
|
62
|
+
var _this = _super.call(this, rootLocator) || this;
|
|
63
|
+
_this.rootLocator = rootLocator;
|
|
64
|
+
_this.contentLocator = rootLocator.locator((0, dataTidSelector_1.getDataTidSelector)(Tooltip_1.TooltipDataTids.content));
|
|
65
|
+
_this.closeLocator = rootLocator.locator((0, dataTidSelector_1.getDataTidSelector)(Tooltip_1.TooltipDataTids.crossIcon));
|
|
66
|
+
return _this;
|
|
67
|
+
}
|
|
68
|
+
Tooltip.prototype.getText = function (options) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
+
return __generator(this, function (_a) {
|
|
71
|
+
return [2 /*return*/, this.contentLocator.innerText(options)];
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
Tooltip.prototype.getContent = function () {
|
|
76
|
+
return this.contentLocator;
|
|
77
|
+
};
|
|
78
|
+
Tooltip.prototype.close = function () {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
80
|
+
return __generator(this, function (_a) {
|
|
81
|
+
switch (_a.label) {
|
|
82
|
+
case 0: return [4 /*yield*/, this.closeLocator.click()];
|
|
83
|
+
case 1:
|
|
84
|
+
_a.sent();
|
|
85
|
+
return [4 /*yield*/, this.waitFor({ state: 'hidden' })];
|
|
86
|
+
case 2:
|
|
87
|
+
_a.sent();
|
|
88
|
+
return [2 /*return*/];
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
Tooltip.prototype.expect = function () {
|
|
94
|
+
return new assertions_1.TooltipAssertions(this);
|
|
95
|
+
};
|
|
96
|
+
return Tooltip;
|
|
97
|
+
}(BaseComponent_1.BaseComponent));
|
|
98
|
+
exports.Tooltip = Tooltip;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export { BaseComponent } from './BaseComponent';
|
|
2
|
+
export { Button } from './Button';
|
|
3
|
+
export { Tooltip } from './Tooltip';
|
|
4
|
+
export { Portal } from './Portal';
|
|
5
|
+
export { Checkbox } from './Checkbox';
|
|
6
|
+
export { ComboBox } from './ComboBox';
|
|
7
|
+
export { Label } from './Label';
|
|
8
|
+
export { MenuItem } from './MenuItem';
|
|
9
|
+
export { ComponentList } from './ComponentList';
|
|
10
|
+
export { Radio } from './Radio';
|
|
11
|
+
export { RadioGroup } from './RadioGroup';
|
|
12
|
+
export { Input } from './Input';
|
|
13
|
+
export { CurrencyInput } from './CurrencyInput';
|
|
14
|
+
export { Token } from './Token';
|
|
15
|
+
export { TokenInput } from './TokenInput';
|
|
16
|
+
export { DatePicker } from './DatePicker';
|
|
17
|
+
export { DateRangePicker } from './DateRangePicker';
|
|
18
|
+
export { Textarea } from './Textarea';
|
|
19
|
+
export { DropdownMenu } from './DropdownMenu';
|
|
20
|
+
export { Dropdown } from './Dropdown';
|
|
21
|
+
export { Toast } from './Toast';
|
|
22
|
+
export { Select } from './Select';
|
|
23
|
+
export { Toggle } from './Toggle';
|
|
24
|
+
export { Link } from './Link';
|
|
25
|
+
export { Tabs } from './Tabs';
|
|
26
|
+
export { Tab } from './Tab';
|
|
27
|
+
export { Loader } from './Loader';
|
|
28
|
+
export { Spinner } from './Spinner';
|
|
29
|
+
export { Autocomplete } from './Autocomplete';
|
|
30
|
+
export { DateInput } from './DateInput';
|
|
31
|
+
export { FileUploader } from './FileUploader';
|
|
32
|
+
export { FxInput } from './FxInput';
|
|
33
|
+
export { Kebab } from './Kebab';
|
|
34
|
+
export { Paging } from './Paging';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Paging = exports.Kebab = exports.FxInput = exports.FileUploader = exports.DateInput = exports.Autocomplete = exports.Spinner = exports.Loader = exports.Tab = exports.Tabs = exports.Link = exports.Toggle = exports.Select = exports.Toast = exports.Dropdown = exports.DropdownMenu = exports.Textarea = exports.DateRangePicker = exports.DatePicker = exports.TokenInput = exports.Token = exports.CurrencyInput = exports.Input = exports.RadioGroup = exports.Radio = exports.ComponentList = exports.MenuItem = exports.Label = exports.ComboBox = exports.Checkbox = exports.Portal = exports.Tooltip = exports.Button = exports.BaseComponent = void 0;
|
|
4
|
+
var BaseComponent_1 = require("./BaseComponent");
|
|
5
|
+
Object.defineProperty(exports, "BaseComponent", { enumerable: true, get: function () { return BaseComponent_1.BaseComponent; } });
|
|
6
|
+
var Button_1 = require("./Button");
|
|
7
|
+
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return Button_1.Button; } });
|
|
8
|
+
var Tooltip_1 = require("./Tooltip");
|
|
9
|
+
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return Tooltip_1.Tooltip; } });
|
|
10
|
+
var Portal_1 = require("./Portal");
|
|
11
|
+
Object.defineProperty(exports, "Portal", { enumerable: true, get: function () { return Portal_1.Portal; } });
|
|
12
|
+
var Checkbox_1 = require("./Checkbox");
|
|
13
|
+
Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function () { return Checkbox_1.Checkbox; } });
|
|
14
|
+
var ComboBox_1 = require("./ComboBox");
|
|
15
|
+
Object.defineProperty(exports, "ComboBox", { enumerable: true, get: function () { return ComboBox_1.ComboBox; } });
|
|
16
|
+
var Label_1 = require("./Label");
|
|
17
|
+
Object.defineProperty(exports, "Label", { enumerable: true, get: function () { return Label_1.Label; } });
|
|
18
|
+
var MenuItem_1 = require("./MenuItem");
|
|
19
|
+
Object.defineProperty(exports, "MenuItem", { enumerable: true, get: function () { return MenuItem_1.MenuItem; } });
|
|
20
|
+
var ComponentList_1 = require("./ComponentList");
|
|
21
|
+
Object.defineProperty(exports, "ComponentList", { enumerable: true, get: function () { return ComponentList_1.ComponentList; } });
|
|
22
|
+
var Radio_1 = require("./Radio");
|
|
23
|
+
Object.defineProperty(exports, "Radio", { enumerable: true, get: function () { return Radio_1.Radio; } });
|
|
24
|
+
var RadioGroup_1 = require("./RadioGroup");
|
|
25
|
+
Object.defineProperty(exports, "RadioGroup", { enumerable: true, get: function () { return RadioGroup_1.RadioGroup; } });
|
|
26
|
+
var Input_1 = require("./Input");
|
|
27
|
+
Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return Input_1.Input; } });
|
|
28
|
+
var CurrencyInput_1 = require("./CurrencyInput");
|
|
29
|
+
Object.defineProperty(exports, "CurrencyInput", { enumerable: true, get: function () { return CurrencyInput_1.CurrencyInput; } });
|
|
30
|
+
var Token_1 = require("./Token");
|
|
31
|
+
Object.defineProperty(exports, "Token", { enumerable: true, get: function () { return Token_1.Token; } });
|
|
32
|
+
var TokenInput_1 = require("./TokenInput");
|
|
33
|
+
Object.defineProperty(exports, "TokenInput", { enumerable: true, get: function () { return TokenInput_1.TokenInput; } });
|
|
34
|
+
var DatePicker_1 = require("./DatePicker");
|
|
35
|
+
Object.defineProperty(exports, "DatePicker", { enumerable: true, get: function () { return DatePicker_1.DatePicker; } });
|
|
36
|
+
var DateRangePicker_1 = require("./DateRangePicker");
|
|
37
|
+
Object.defineProperty(exports, "DateRangePicker", { enumerable: true, get: function () { return DateRangePicker_1.DateRangePicker; } });
|
|
38
|
+
var Textarea_1 = require("./Textarea");
|
|
39
|
+
Object.defineProperty(exports, "Textarea", { enumerable: true, get: function () { return Textarea_1.Textarea; } });
|
|
40
|
+
var DropdownMenu_1 = require("./DropdownMenu");
|
|
41
|
+
Object.defineProperty(exports, "DropdownMenu", { enumerable: true, get: function () { return DropdownMenu_1.DropdownMenu; } });
|
|
42
|
+
var Dropdown_1 = require("./Dropdown");
|
|
43
|
+
Object.defineProperty(exports, "Dropdown", { enumerable: true, get: function () { return Dropdown_1.Dropdown; } });
|
|
44
|
+
var Toast_1 = require("./Toast");
|
|
45
|
+
Object.defineProperty(exports, "Toast", { enumerable: true, get: function () { return Toast_1.Toast; } });
|
|
46
|
+
var Select_1 = require("./Select");
|
|
47
|
+
Object.defineProperty(exports, "Select", { enumerable: true, get: function () { return Select_1.Select; } });
|
|
48
|
+
var Toggle_1 = require("./Toggle");
|
|
49
|
+
Object.defineProperty(exports, "Toggle", { enumerable: true, get: function () { return Toggle_1.Toggle; } });
|
|
50
|
+
var Link_1 = require("./Link");
|
|
51
|
+
Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return Link_1.Link; } });
|
|
52
|
+
var Tabs_1 = require("./Tabs");
|
|
53
|
+
Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return Tabs_1.Tabs; } });
|
|
54
|
+
var Tab_1 = require("./Tab");
|
|
55
|
+
Object.defineProperty(exports, "Tab", { enumerable: true, get: function () { return Tab_1.Tab; } });
|
|
56
|
+
var Loader_1 = require("./Loader");
|
|
57
|
+
Object.defineProperty(exports, "Loader", { enumerable: true, get: function () { return Loader_1.Loader; } });
|
|
58
|
+
var Spinner_1 = require("./Spinner");
|
|
59
|
+
Object.defineProperty(exports, "Spinner", { enumerable: true, get: function () { return Spinner_1.Spinner; } });
|
|
60
|
+
var Autocomplete_1 = require("./Autocomplete");
|
|
61
|
+
Object.defineProperty(exports, "Autocomplete", { enumerable: true, get: function () { return Autocomplete_1.Autocomplete; } });
|
|
62
|
+
var DateInput_1 = require("./DateInput");
|
|
63
|
+
Object.defineProperty(exports, "DateInput", { enumerable: true, get: function () { return DateInput_1.DateInput; } });
|
|
64
|
+
var FileUploader_1 = require("./FileUploader");
|
|
65
|
+
Object.defineProperty(exports, "FileUploader", { enumerable: true, get: function () { return FileUploader_1.FileUploader; } });
|
|
66
|
+
var FxInput_1 = require("./FxInput");
|
|
67
|
+
Object.defineProperty(exports, "FxInput", { enumerable: true, get: function () { return FxInput_1.FxInput; } });
|
|
68
|
+
var Kebab_1 = require("./Kebab");
|
|
69
|
+
Object.defineProperty(exports, "Kebab", { enumerable: true, get: function () { return Kebab_1.Kebab; } });
|
|
70
|
+
var Paging_1 = require("./Paging");
|
|
71
|
+
Object.defineProperty(exports, "Paging", { enumerable: true, get: function () { return Paging_1.Paging; } });
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./assertions"), exports);
|
|
18
|
+
__exportStar(require("./utils"), exports);
|
|
19
|
+
__exportStar(require("./options"), exports);
|
|
20
|
+
__exportStar(require("./matchers"), exports);
|
|
21
|
+
__exportStar(require("./components"), exports);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Locator, ExpectMatcherState } from '@playwright/test';
|
|
2
|
+
export type Transform = (value: string) => string;
|
|
3
|
+
/**
|
|
4
|
+
* Набор проверок, которые игнорируют форматирование значения. По-умолчанию игнорируют пробелы.
|
|
5
|
+
*/
|
|
6
|
+
export declare const formattedMatchers: import("@playwright/test").Expect<{
|
|
7
|
+
toHaveFormattedValue(this: ExpectMatcherState, locator: Locator, expected: string, options?: {
|
|
8
|
+
timeout?: number;
|
|
9
|
+
transform?: Transform;
|
|
10
|
+
}): Promise<{
|
|
11
|
+
message: () => string;
|
|
12
|
+
pass: boolean;
|
|
13
|
+
name: string;
|
|
14
|
+
expected: string;
|
|
15
|
+
actual: any;
|
|
16
|
+
}>;
|
|
17
|
+
toHaveFormattedText(this: ExpectMatcherState, locator: Locator, expected: string, options?: {
|
|
18
|
+
timeout?: number;
|
|
19
|
+
transform?: Transform;
|
|
20
|
+
}): Promise<{
|
|
21
|
+
message: () => string;
|
|
22
|
+
pass: boolean;
|
|
23
|
+
name: string;
|
|
24
|
+
expected: string;
|
|
25
|
+
actual: any;
|
|
26
|
+
}>;
|
|
27
|
+
toContainFormattedText(this: ExpectMatcherState, locator: Locator, expected: string, options?: {
|
|
28
|
+
timeout?: number;
|
|
29
|
+
transform?: Transform;
|
|
30
|
+
}): Promise<{
|
|
31
|
+
message: () => string;
|
|
32
|
+
pass: boolean;
|
|
33
|
+
name: string;
|
|
34
|
+
expected: string;
|
|
35
|
+
actual: any;
|
|
36
|
+
}>;
|
|
37
|
+
}>;
|