@skbkontur/playwright-react-ui-components 1.17.1 → 1.18.0-beta.2

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.
@@ -0,0 +1,8 @@
1
+ import { BaseComponentAssertions } from './BaseComponentAssertions';
2
+ import type { CurrencyLabel } from '../components';
3
+ import type { CurrencyLabelAssertionOptions } from '../options';
4
+ export declare class CurrencyLabelAssertions extends BaseComponentAssertions {
5
+ private readonly currencyLabel;
6
+ constructor(currencyLabel: CurrencyLabel);
7
+ toHaveValue(value: string | number, assertionOptions?: CurrencyLabelAssertionOptions): Promise<void>;
8
+ }
@@ -0,0 +1,103 @@
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.CurrencyLabelAssertions = void 0;
55
+ var CurrencyHelper_1 = require("@skbkontur/react-ui/components/CurrencyInput/CurrencyHelper");
56
+ var extensions_1 = require("../extensions");
57
+ var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
58
+ /**
59
+ * Если `assertionOptions` не определен или в нем нет такого `key` - берем значение из `baseOptions`
60
+ * Иначе берем значение `key` из `assertionOptions`
61
+ */
62
+ function pickOption(baseOptions, assertionOptions, key) {
63
+ var _a;
64
+ if (assertionOptions === undefined || !(key in assertionOptions)) {
65
+ return (_a = baseOptions[key]) !== null && _a !== void 0 ? _a : undefined;
66
+ }
67
+ return assertionOptions[key];
68
+ }
69
+ var CurrencyLabelAssertions = /** @class */ (function (_super) {
70
+ __extends(CurrencyLabelAssertions, _super);
71
+ function CurrencyLabelAssertions(currencyLabel) {
72
+ var _this = _super.call(this, currencyLabel) || this;
73
+ _this.currencyLabel = currencyLabel;
74
+ return _this;
75
+ }
76
+ CurrencyLabelAssertions.prototype.toHaveValue = function (value, assertionOptions) {
77
+ return __awaiter(this, void 0, void 0, function () {
78
+ var baseOptions, format, formattedValue, text;
79
+ var _a;
80
+ return __generator(this, function (_b) {
81
+ switch (_b.label) {
82
+ case 0:
83
+ baseOptions = (_a = this.currencyLabel.options) !== null && _a !== void 0 ? _a : {};
84
+ format = {
85
+ currencySymbol: pickOption(baseOptions, assertionOptions, 'currencySymbol'),
86
+ fractionDigits: pickOption(baseOptions, assertionOptions, 'fractionDigits'),
87
+ hideTrailingZeros: pickOption(baseOptions, assertionOptions, 'hideTrailingZeros'),
88
+ };
89
+ formattedValue = typeof value === 'number' ? CurrencyHelper_1.CurrencyHelper.format(value, format) : CurrencyHelper_1.CurrencyHelper.formatString(value, format);
90
+ text = format.currencySymbol ? "".concat(formattedValue, "\u00A0").concat(format.currencySymbol) : formattedValue;
91
+ return [4 /*yield*/, (0, extensions_1.expect)(this.currencyLabel.rootLocator).toHaveText(text, {
92
+ timeout: assertionOptions === null || assertionOptions === void 0 ? void 0 : assertionOptions.timeout,
93
+ })];
94
+ case 1:
95
+ _b.sent();
96
+ return [2 /*return*/];
97
+ }
98
+ });
99
+ });
100
+ };
101
+ return CurrencyLabelAssertions;
102
+ }(BaseComponentAssertions_1.BaseComponentAssertions));
103
+ exports.CurrencyLabelAssertions = CurrencyLabelAssertions;
@@ -11,6 +11,7 @@ export { RadioAssertions } from './RadioAssertions';
11
11
  export { RadioGroupAssertions } from './RadioGroupAssertions';
12
12
  export { InputAssertions } from './InputAssertions';
13
13
  export { CurrencyInputAssertions } from './CurrencyInputAssertions';
14
+ export { CurrencyLabelAssertions } from './CurrencyLabelAssertions';
14
15
  export { TokenAssertions } from './TokenAssertions';
15
16
  export { TokenInputAssertions } from './TokenInputAssertions';
16
17
  export { TextareaAssertions } from './TextareaAssertions';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PagingAssertions = exports.KebabAssertions = exports.FxInputAssertions = exports.FileUploaderAssertions = exports.DateInputAssertions = exports.AutocompleteAssertions = exports.SpinnerAssertions = exports.LoaderAssertions = exports.TabAssertions = exports.TabsAssertions = exports.LinkAssertions = exports.ToggleAssertions = exports.SelectAssertions = exports.ToastAssertions = exports.DropdownAssertions = exports.DropdownMenuAssertions = exports.DateRangePickerAssertions = exports.DatePickerAssertions = exports.TextareaAssertions = exports.TokenInputAssertions = exports.TokenAssertions = exports.CurrencyInputAssertions = exports.InputAssertions = exports.RadioGroupAssertions = exports.RadioAssertions = exports.MenuItemAssertations = exports.LabelAssertions = exports.ComponentListAssertions = exports.ComboBoxAssertions = exports.CheckboxAssertions = exports.TooltipAssertions = exports.PortalAssertions = exports.ButtonAssertions = exports.BaseComponentAssertions = void 0;
3
+ exports.PagingAssertions = exports.KebabAssertions = exports.FxInputAssertions = exports.FileUploaderAssertions = exports.DateInputAssertions = exports.AutocompleteAssertions = exports.SpinnerAssertions = exports.LoaderAssertions = exports.TabAssertions = exports.TabsAssertions = exports.LinkAssertions = exports.ToggleAssertions = exports.SelectAssertions = exports.ToastAssertions = exports.DropdownAssertions = exports.DropdownMenuAssertions = exports.DateRangePickerAssertions = exports.DatePickerAssertions = exports.TextareaAssertions = exports.TokenInputAssertions = exports.TokenAssertions = exports.CurrencyLabelAssertions = exports.CurrencyInputAssertions = exports.InputAssertions = exports.RadioGroupAssertions = exports.RadioAssertions = exports.MenuItemAssertations = exports.LabelAssertions = exports.ComponentListAssertions = exports.ComboBoxAssertions = exports.CheckboxAssertions = exports.TooltipAssertions = exports.PortalAssertions = exports.ButtonAssertions = exports.BaseComponentAssertions = void 0;
4
4
  var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
5
5
  Object.defineProperty(exports, "BaseComponentAssertions", { enumerable: true, get: function () { return BaseComponentAssertions_1.BaseComponentAssertions; } });
6
6
  var ButtonAssertions_1 = require("./ButtonAssertions");
@@ -27,6 +27,8 @@ var InputAssertions_1 = require("./InputAssertions");
27
27
  Object.defineProperty(exports, "InputAssertions", { enumerable: true, get: function () { return InputAssertions_1.InputAssertions; } });
28
28
  var CurrencyInputAssertions_1 = require("./CurrencyInputAssertions");
29
29
  Object.defineProperty(exports, "CurrencyInputAssertions", { enumerable: true, get: function () { return CurrencyInputAssertions_1.CurrencyInputAssertions; } });
30
+ var CurrencyLabelAssertions_1 = require("./CurrencyLabelAssertions");
31
+ Object.defineProperty(exports, "CurrencyLabelAssertions", { enumerable: true, get: function () { return CurrencyLabelAssertions_1.CurrencyLabelAssertions; } });
30
32
  var TokenAssertions_1 = require("./TokenAssertions");
31
33
  Object.defineProperty(exports, "TokenAssertions", { enumerable: true, get: function () { return TokenAssertions_1.TokenAssertions; } });
32
34
  var TokenInputAssertions_1 = require("./TokenInputAssertions");
@@ -0,0 +1,22 @@
1
+ import type { Locator } from '@playwright/test';
2
+ import { BaseComponent } from './BaseComponent';
3
+ import { CurrencyLabelAssertions } from '../assertions';
4
+ import { type TooltipType } from '../utils';
5
+ import type { GetAttributeOptions, InnerTextOptions } from '../options';
6
+ export type CurrencyLabelOptions = {
7
+ /** Символ валюты */
8
+ currencySymbol?: string;
9
+ /** Минимальное количество отображаемых знаков после запятой */
10
+ fractionDigits?: number;
11
+ /** Убирает лишние нули после запятой */
12
+ hideTrailingZeros?: boolean;
13
+ };
14
+ export declare class CurrencyLabel extends BaseComponent {
15
+ readonly rootLocator: Locator;
16
+ readonly options: CurrencyLabelOptions;
17
+ constructor(rootLocator: Locator, options?: CurrencyLabelOptions);
18
+ isDisabled(options?: GetAttributeOptions): Promise<boolean>;
19
+ getText(options?: InnerTextOptions): Promise<string>;
20
+ getTooltip(type: TooltipType): Promise<import("./Tooltip").Tooltip>;
21
+ expect(): CurrencyLabelAssertions;
22
+ }
@@ -0,0 +1,88 @@
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.CurrencyLabel = void 0;
55
+ var BaseComponent_1 = require("./BaseComponent");
56
+ var assertions_1 = require("../assertions");
57
+ var utils_1 = require("../utils");
58
+ var CurrencyLabel = /** @class */ (function (_super) {
59
+ __extends(CurrencyLabel, _super);
60
+ function CurrencyLabel(rootLocator, options) {
61
+ if (options === void 0) { options = {}; }
62
+ var _this = _super.call(this, rootLocator) || this;
63
+ _this.rootLocator = rootLocator;
64
+ _this.options = options;
65
+ return _this;
66
+ }
67
+ CurrencyLabel.prototype.isDisabled = function (options) {
68
+ return __awaiter(this, void 0, void 0, function () {
69
+ return __generator(this, function (_a) {
70
+ switch (_a.label) {
71
+ case 0: return [4 /*yield*/, this.getAttribute(utils_1.DataVisualState.Disabled, options)];
72
+ case 1: return [2 /*return*/, (_a.sent()) !== null];
73
+ }
74
+ });
75
+ });
76
+ };
77
+ CurrencyLabel.prototype.getText = function (options) {
78
+ return this.rootLocator.innerText(options);
79
+ };
80
+ CurrencyLabel.prototype.getTooltip = function (type) {
81
+ return (0, utils_1.getTooltip)(type, this);
82
+ };
83
+ CurrencyLabel.prototype.expect = function () {
84
+ return new assertions_1.CurrencyLabelAssertions(this);
85
+ };
86
+ return CurrencyLabel;
87
+ }(BaseComponent_1.BaseComponent));
88
+ exports.CurrencyLabel = CurrencyLabel;
@@ -7,6 +7,7 @@ export { Portal, createPortalControl, type PortalControl } from './Portal';
7
7
  export { Checkbox, createCheckboxControl, type CheckboxControl } from './Checkbox';
8
8
  export { ComboBox, createComboBoxControl, type ComboBoxControl } from './ComboBox';
9
9
  export { Label, createLabelControl, type LabelControl } from './Label';
10
+ export { CurrencyLabel } from './CurrencyLabel';
10
11
  export { MenuItem, createMenuItemControl, type MenuItemControl } from './MenuItem';
11
12
  export { Radio, createRadioControl, type RadioControl } from './Radio';
12
13
  export { RadioGroup, createRadioGroupControl, type RadioGroupControl } from './RadioGroup';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Tab = exports.createTabsControl = exports.Tabs = exports.createLinkControl = exports.Link = exports.createToggleControl = exports.Toggle = exports.createSelectControl = exports.Select = exports.createToastControl = exports.Toast = exports.createDropdownControl = exports.Dropdown = exports.createDropdownMenuControl = exports.DropdownMenu = exports.createTextareaControl = exports.Textarea = exports.createDateRangePickerControl = exports.DateRangePicker = exports.createDatePickerControl = exports.DatePicker = exports.createTokenInputControl = exports.TokenInput = exports.createTokenControl = exports.Token = exports.createCurrencyInputControl = exports.CurrencyInput = exports.createInputControl = exports.Input = exports.createRadioGroupControl = exports.RadioGroup = exports.createRadioControl = exports.Radio = exports.createMenuItemControl = exports.MenuItem = exports.createLabelControl = exports.Label = exports.createComboBoxControl = exports.ComboBox = exports.createCheckboxControl = exports.Checkbox = exports.createPortalControl = exports.Portal = exports.createTooltipControl = exports.Tooltip = exports.createButtonControl = exports.Button = exports.MenuComponent = exports.ComponentList = exports.BaseComponent = void 0;
4
- exports.createPagingControl = exports.Paging = exports.createKebabControl = exports.Kebab = exports.createFxInputControl = exports.FxInput = exports.createFileUploaderControl = exports.FileUploader = exports.createDateInputControl = exports.DateInput = exports.createAutocompleteControl = exports.Autocomplete = exports.createSpinnerControl = exports.Spinner = exports.createLoaderControl = exports.Loader = exports.createTabControl = void 0;
3
+ exports.createTabsControl = exports.Tabs = exports.createLinkControl = exports.Link = exports.createToggleControl = exports.Toggle = exports.createSelectControl = exports.Select = exports.createToastControl = exports.Toast = exports.createDropdownControl = exports.Dropdown = exports.createDropdownMenuControl = exports.DropdownMenu = exports.createTextareaControl = exports.Textarea = exports.createDateRangePickerControl = exports.DateRangePicker = exports.createDatePickerControl = exports.DatePicker = exports.createTokenInputControl = exports.TokenInput = exports.createTokenControl = exports.Token = exports.createCurrencyInputControl = exports.CurrencyInput = exports.createInputControl = exports.Input = exports.createRadioGroupControl = exports.RadioGroup = exports.createRadioControl = exports.Radio = exports.createMenuItemControl = exports.MenuItem = exports.CurrencyLabel = exports.createLabelControl = exports.Label = exports.createComboBoxControl = exports.ComboBox = exports.createCheckboxControl = exports.Checkbox = exports.createPortalControl = exports.Portal = exports.createTooltipControl = exports.Tooltip = exports.createButtonControl = exports.Button = exports.MenuComponent = exports.ComponentList = exports.BaseComponent = void 0;
4
+ exports.createPagingControl = exports.Paging = exports.createKebabControl = exports.Kebab = exports.createFxInputControl = exports.FxInput = exports.createFileUploaderControl = exports.FileUploader = exports.createDateInputControl = exports.DateInput = exports.createAutocompleteControl = exports.Autocomplete = exports.createSpinnerControl = exports.Spinner = exports.createLoaderControl = exports.Loader = exports.createTabControl = exports.Tab = void 0;
5
5
  var BaseComponent_1 = require("./BaseComponent");
6
6
  Object.defineProperty(exports, "BaseComponent", { enumerable: true, get: function () { return BaseComponent_1.BaseComponent; } });
7
7
  var ComponentList_1 = require("./ComponentList");
@@ -26,6 +26,8 @@ Object.defineProperty(exports, "createComboBoxControl", { enumerable: true, get:
26
26
  var Label_1 = require("./Label");
27
27
  Object.defineProperty(exports, "Label", { enumerable: true, get: function () { return Label_1.Label; } });
28
28
  Object.defineProperty(exports, "createLabelControl", { enumerable: true, get: function () { return Label_1.createLabelControl; } });
29
+ var CurrencyLabel_1 = require("./CurrencyLabel");
30
+ Object.defineProperty(exports, "CurrencyLabel", { enumerable: true, get: function () { return CurrencyLabel_1.CurrencyLabel; } });
29
31
  var MenuItem_1 = require("./MenuItem");
30
32
  Object.defineProperty(exports, "MenuItem", { enumerable: true, get: function () { return MenuItem_1.MenuItem; } });
31
33
  Object.defineProperty(exports, "createMenuItemControl", { enumerable: true, get: function () { return MenuItem_1.createMenuItemControl; } });
@@ -1,3 +1,3 @@
1
1
  import type { AttributeOptions, EnabledOptions } from '../../options';
2
2
  import type { ControlElementLocator } from './LocatorSymbols';
3
- export declare const toBeDisabled: (this: import("@playwright/test").ExpectMatcherState, component: ControlElementLocator, args_0?: EnabledOptions | AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
3
+ export declare const toBeDisabled: (this: import("@playwright/test").ExpectMatcherState, component: ControlElementLocator, args_0?: AttributeOptions | EnabledOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
@@ -3,7 +3,7 @@ declare const matchers: {
3
3
  readonly toBeVisible: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").VisibleOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
4
4
  readonly toBeHidden: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").HiddenOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
5
5
  readonly toBeEnabled: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
6
- readonly toBeDisabled: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
6
+ readonly toBeDisabled: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").AttributeOptions | import("..").EnabledOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
7
7
  readonly toBeFocused: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeFocusableElementLocator, args_0?: import("..").FocusedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
8
8
  readonly toBeChecked: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeCheckableElementLocator, args_0?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
9
9
  readonly toBeAutoMode: (this: import("@playwright/test").ExpectMatcherState, component: import("..").FxInput, args_0?: import("..").VisibleOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
@@ -72,7 +72,7 @@ declare const matchers: {
72
72
  * @deprecated will be removed in the next major version
73
73
  * @see {@link toBeDisabled}
74
74
  */
75
- readonly toBeDisabledEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
75
+ readonly toBeDisabledEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").AttributeOptions | import("..").EnabledOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
76
76
  /**
77
77
  * @deprecated will be removed in the next major version
78
78
  * @see {@link toBeFocused}
@@ -133,7 +133,7 @@ export declare const componentMatchers: import("@playwright/test").Expect<{
133
133
  readonly toBeVisible: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").VisibleOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
134
134
  readonly toBeHidden: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").HiddenOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
135
135
  readonly toBeEnabled: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
136
- readonly toBeDisabled: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
136
+ readonly toBeDisabled: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").AttributeOptions | import("..").EnabledOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
137
137
  readonly toBeFocused: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeFocusableElementLocator, args_0?: import("..").FocusedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
138
138
  readonly toBeChecked: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeCheckableElementLocator, args_0?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
139
139
  readonly toBeAutoMode: (this: import("@playwright/test").ExpectMatcherState, component: import("..").FxInput, args_0?: import("..").VisibleOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
@@ -202,7 +202,7 @@ export declare const componentMatchers: import("@playwright/test").Expect<{
202
202
  * @deprecated will be removed in the next major version
203
203
  * @see {@link toBeDisabled}
204
204
  */
205
- readonly toBeDisabledEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
205
+ readonly toBeDisabledEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").AttributeOptions | import("..").EnabledOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
206
206
  /**
207
207
  * @deprecated will be removed in the next major version
208
208
  * @see {@link toBeFocused}
@@ -1,3 +1,4 @@
1
+ import type { CurrencyLabelOptions } from '../components/CurrencyLabel';
1
2
  export type VisibleOptions = {
2
3
  /**
3
4
  * Time to retry the assertion for in milliseconds. Defaults to `timeout` in `TestConfig.expect`.
@@ -80,3 +81,10 @@ export type TransformOptions = {
80
81
  */
81
82
  timeout?: number;
82
83
  };
84
+ export type CurrencyLabelAssertionOptions = CurrencyLabelOptions & {
85
+ /**
86
+ * Time to retry the assertion for in milliseconds.
87
+ * Defaults to `timeout` in TestConfig.expect.
88
+ */
89
+ timeout?: number;
90
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skbkontur/playwright-react-ui-components",
3
- "version": "1.17.1",
3
+ "version": "1.18.0-beta.2",
4
4
  "description": "Пакет для взаимодействия с компонентами @skbkontur/react-ui при тестировании с помощью Playwright",
5
5
  "main": "build/index.js",
6
6
  "files": [