@skbkontur/playwright-react-ui-components 1.14.1-beta.1 → 1.14.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.
|
@@ -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, locator, options)];
|
|
67
|
+
case 5: return [4 /*yield*/, checkComponentList(isNot, component, locator, options)];
|
|
68
68
|
case 6:
|
|
69
69
|
_d.sent();
|
|
70
70
|
return [3 /*break*/, 9];
|
|
@@ -119,15 +119,18 @@ function checkDateRangePicker(component) {
|
|
|
119
119
|
});
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
-
function checkComponentList(isNot, locator, options) {
|
|
122
|
+
function checkComponentList(isNot, component, 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*/,
|
|
129
|
+
return [4 /*yield*/, component.waitFor({ state: 'attached' })];
|
|
130
130
|
case 1:
|
|
131
|
+
_a.sent();
|
|
132
|
+
return [4 /*yield*/, expectation.toHaveCount(0, options)];
|
|
133
|
+
case 2:
|
|
131
134
|
_a.sent();
|
|
132
135
|
return [2 /*return*/];
|
|
133
136
|
}
|
|
@@ -42,13 +42,16 @@ 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, locator = _b.locator;
|
|
45
|
+
var isNot = _b.isNot, component = _b.component, 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*/,
|
|
50
|
+
return [4 /*yield*/, component.waitFor({ state: 'attached' })];
|
|
51
51
|
case 1:
|
|
52
|
+
_c.sent();
|
|
53
|
+
return [4 /*yield*/, expectation.toHaveCount(count, options)];
|
|
54
|
+
case 2:
|
|
52
55
|
_c.sent();
|
|
53
56
|
return [2 /*return*/];
|
|
54
57
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skbkontur/playwright-react-ui-components",
|
|
3
|
-
"version": "1.14.1
|
|
3
|
+
"version": "1.14.1",
|
|
4
4
|
"description": "Пакет для взаимодействия с компонентами @skbkontur/react-ui при тестировании с помощью Playwright",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"files": [
|