@skbkontur/playwright-react-ui-components 1.14.0-beta.5 → 1.14.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.
|
@@ -51,7 +51,7 @@ var makeMatcher = function (isNot, matcher) { return __awaiter(void 0, void 0, v
|
|
|
51
51
|
case 2:
|
|
52
52
|
e_1 = _a.sent();
|
|
53
53
|
if (e_1 && typeof e_1 === 'object') {
|
|
54
|
-
matcherResult = e_1.toString();
|
|
54
|
+
matcherResult = e_1.toString().replace('Error: ', '');
|
|
55
55
|
}
|
|
56
56
|
pass = false;
|
|
57
57
|
return [3 /*break*/, 3];
|
|
@@ -37,6 +37,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.toMatchMessage = toMatchMessage;
|
|
40
|
+
var formattedMessage = function () {
|
|
41
|
+
var args = [];
|
|
42
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
43
|
+
args[_i] = arguments[_i];
|
|
44
|
+
}
|
|
45
|
+
return "".concat(args.filter(Boolean).join('\n\n'));
|
|
46
|
+
};
|
|
40
47
|
/**
|
|
41
48
|
* Создает сообщение для ожидания
|
|
42
49
|
*
|
|
@@ -61,14 +68,14 @@ function toMatchMessage(state_1, matcherName_1, receiver_1, query_1) {
|
|
|
61
68
|
customMessage = expectedMessage && "Custom message: ".concat(stringify(expectedMessage), "\n");
|
|
62
69
|
if (typeof matcherResult === 'string') {
|
|
63
70
|
return [2 /*return*/, {
|
|
64
|
-
message: function () { return matcherResult
|
|
71
|
+
message: function () { return formattedMessage(matcherResult, customMessage); },
|
|
65
72
|
pass: pass,
|
|
66
73
|
name: matcherName,
|
|
67
74
|
actual: matcherResult,
|
|
68
75
|
}];
|
|
69
76
|
}
|
|
70
77
|
return [2 /*return*/, {
|
|
71
|
-
message: function () { return 'Matcher result is undefined'
|
|
78
|
+
message: function () { return formattedMessage('Matcher result is undefined', customMessage); },
|
|
72
79
|
pass: pass,
|
|
73
80
|
name: matcherName,
|
|
74
81
|
actual: undefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skbkontur/playwright-react-ui-components",
|
|
3
|
-
"version": "1.14.0
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Пакет для взаимодействия с компонентами @skbkontur/react-ui при тестировании с помощью Playwright",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"files": [
|