@skbkontur/playwright-react-ui-components 1.18.0-beta.3 → 1.18.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.
|
@@ -5,4 +5,5 @@ export declare class CurrencyLabelAssertions extends BaseComponentAssertions {
|
|
|
5
5
|
private readonly currencyLabel;
|
|
6
6
|
constructor(currencyLabel: CurrencyLabel);
|
|
7
7
|
toHaveValue(value: string | number, assertionOptions?: CurrencyLabelAssertionOptions): Promise<void>;
|
|
8
|
+
notToHaveValue(value: string | number, assertionOptions?: CurrencyLabelAssertionOptions): Promise<void>;
|
|
8
9
|
}
|
|
@@ -54,7 +54,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
54
54
|
exports.CurrencyLabelAssertions = void 0;
|
|
55
55
|
var extensions_1 = require("../extensions");
|
|
56
56
|
var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
|
|
57
|
-
var currencyLabel_1 = require("../utils/currencyLabel");
|
|
58
57
|
var CurrencyLabelAssertions = /** @class */ (function (_super) {
|
|
59
58
|
__extends(CurrencyLabelAssertions, _super);
|
|
60
59
|
function CurrencyLabelAssertions(currencyLabel) {
|
|
@@ -64,18 +63,23 @@ var CurrencyLabelAssertions = /** @class */ (function (_super) {
|
|
|
64
63
|
}
|
|
65
64
|
CurrencyLabelAssertions.prototype.toHaveValue = function (value, assertionOptions) {
|
|
66
65
|
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
switch (_b.label) {
|
|
71
|
-
case 0:
|
|
72
|
-
baseOptions = (_a = this.currencyLabel.options) !== null && _a !== void 0 ? _a : {};
|
|
73
|
-
text = (0, currencyLabel_1.getCurrencyLabelExpectedText)(value, baseOptions, assertionOptions);
|
|
74
|
-
return [4 /*yield*/, (0, extensions_1.expect)(this.currencyLabel.rootLocator).toHaveText(text, {
|
|
75
|
-
timeout: assertionOptions === null || assertionOptions === void 0 ? void 0 : assertionOptions.timeout,
|
|
76
|
-
})];
|
|
66
|
+
return __generator(this, function (_a) {
|
|
67
|
+
switch (_a.label) {
|
|
68
|
+
case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.currencyLabel).toHaveValue(value, assertionOptions)];
|
|
77
69
|
case 1:
|
|
78
|
-
|
|
70
|
+
_a.sent();
|
|
71
|
+
return [2 /*return*/];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
CurrencyLabelAssertions.prototype.notToHaveValue = function (value, assertionOptions) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
78
|
+
return __generator(this, function (_a) {
|
|
79
|
+
switch (_a.label) {
|
|
80
|
+
case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.currencyLabel).not.toHaveValue(value, assertionOptions)];
|
|
81
|
+
case 1:
|
|
82
|
+
_a.sent();
|
|
79
83
|
return [2 /*return*/];
|
|
80
84
|
}
|
|
81
85
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skbkontur/playwright-react-ui-components",
|
|
3
|
-
"version": "1.18.0
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "Пакет для взаимодействия с компонентами @skbkontur/react-ui при тестировании с помощью Playwright",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"files": [
|