@skbkontur/playwright-react-ui-components 1.14.0 → 1.14.1-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.
|
@@ -63,7 +63,7 @@ var Tooltip = /** @class */ (function (_super) {
|
|
|
63
63
|
function Tooltip(rootLocator) {
|
|
64
64
|
var _this = _super.call(this, rootLocator) || this;
|
|
65
65
|
_this.rootLocator = rootLocator;
|
|
66
|
-
_this[_a] = function () { return _this.
|
|
66
|
+
_this[_a] = function () { return _this.rootLocator; };
|
|
67
67
|
_this.contentLocator = rootLocator.locator((0, dataTidSelector_1.getDataTidSelector)(Tooltip_1.TooltipDataTids.content));
|
|
68
68
|
_this.closeLocator = rootLocator.locator((0, dataTidSelector_1.getDataTidSelector)(Tooltip_1.TooltipDataTids.crossIcon));
|
|
69
69
|
return _this;
|
|
@@ -64,7 +64,7 @@ exports.toBeEmptyEx = (0, createAsyncMatcher_1.createAsyncMatcher)('toBeEmptyEx'
|
|
|
64
64
|
case 4:
|
|
65
65
|
_d.sent();
|
|
66
66
|
return [3 /*break*/, 9];
|
|
67
|
-
case 5: return [4 /*yield*/, checkComponentList(isNot,
|
|
67
|
+
case 5: return [4 /*yield*/, checkComponentList(isNot, locator, options)];
|
|
68
68
|
case 6:
|
|
69
69
|
_d.sent();
|
|
70
70
|
return [3 /*break*/, 9];
|
|
@@ -119,18 +119,15 @@ function checkDateRangePicker(component) {
|
|
|
119
119
|
});
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
-
function checkComponentList(isNot,
|
|
122
|
+
function checkComponentList(isNot, locator, options) {
|
|
123
123
|
return __awaiter(this, void 0, void 0, function () {
|
|
124
124
|
var expectation;
|
|
125
125
|
return __generator(this, function (_a) {
|
|
126
126
|
switch (_a.label) {
|
|
127
127
|
case 0:
|
|
128
128
|
expectation = isNot ? (0, test_1.expect)(locator).not : (0, test_1.expect)(locator);
|
|
129
|
-
return [4 /*yield*/, component.waitFor({ state: 'attached' })];
|
|
130
|
-
case 1:
|
|
131
|
-
_a.sent();
|
|
132
129
|
return [4 /*yield*/, expectation.toHaveCount(0, options)];
|
|
133
|
-
case
|
|
130
|
+
case 1:
|
|
134
131
|
_a.sent();
|
|
135
132
|
return [2 /*return*/];
|
|
136
133
|
}
|
|
@@ -42,16 +42,13 @@ var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
|
42
42
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
43
|
exports.toHaveCountEx = (0, createAsyncMatcher_1.createComponentAsyncMatcher)('toHaveCountEx', function (component) { return component.itemsLocator; }, function (_a, count_1, options_1) { return __awaiter(void 0, [_a, count_1, options_1], void 0, function (_b, count, options) {
|
|
44
44
|
var expectation;
|
|
45
|
-
var isNot = _b.isNot,
|
|
45
|
+
var isNot = _b.isNot, locator = _b.locator;
|
|
46
46
|
return __generator(this, function (_c) {
|
|
47
47
|
switch (_c.label) {
|
|
48
48
|
case 0:
|
|
49
49
|
expectation = isNot ? (0, test_1.expect)(locator).not : (0, test_1.expect)(locator);
|
|
50
|
-
return [4 /*yield*/, component.waitFor({ state: 'attached' })];
|
|
51
|
-
case 1:
|
|
52
|
-
_c.sent();
|
|
53
50
|
return [4 /*yield*/, expectation.toHaveCount(count, options)];
|
|
54
|
-
case
|
|
51
|
+
case 1:
|
|
55
52
|
_c.sent();
|
|
56
53
|
return [2 /*return*/];
|
|
57
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skbkontur/playwright-react-ui-components",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.1-beta.1",
|
|
4
4
|
"description": "Пакет для взаимодействия с компонентами @skbkontur/react-ui при тестировании с помощью Playwright",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"files": [
|