@skbkontur/playwright-react-ui-components 1.13.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.
Files changed (165) hide show
  1. package/build/index.d.ts +1 -0
  2. package/build/index.js +17 -0
  3. package/build/src/assertions/AutocompleteAssertions.d.ts +19 -0
  4. package/build/src/assertions/AutocompleteAssertions.js +177 -0
  5. package/build/src/assertions/BaseComponentAssertions.d.ts +15 -0
  6. package/build/src/assertions/BaseComponentAssertions.js +158 -0
  7. package/build/src/assertions/ButtonAssertions.d.ts +15 -0
  8. package/build/src/assertions/ButtonAssertions.js +162 -0
  9. package/build/src/assertions/CheckboxAssertions.d.ts +19 -0
  10. package/build/src/assertions/CheckboxAssertions.js +210 -0
  11. package/build/src/assertions/ComboBoxAssertions.d.ts +19 -0
  12. package/build/src/assertions/ComboBoxAssertions.js +304 -0
  13. package/build/src/assertions/ComponentListAssertions.d.ts +13 -0
  14. package/build/src/assertions/ComponentListAssertions.js +126 -0
  15. package/build/src/assertions/CurrencyInputAssertions.d.ts +15 -0
  16. package/build/src/assertions/CurrencyInputAssertions.js +212 -0
  17. package/build/src/assertions/DateInputAssertions.d.ts +15 -0
  18. package/build/src/assertions/DateInputAssertions.js +162 -0
  19. package/build/src/assertions/DatePickerAssertions.d.ts +15 -0
  20. package/build/src/assertions/DatePickerAssertions.js +162 -0
  21. package/build/src/assertions/DateRangePickerAssertions.d.ts +11 -0
  22. package/build/src/assertions/DateRangePickerAssertions.js +111 -0
  23. package/build/src/assertions/DropdownAssertions.d.ts +19 -0
  24. package/build/src/assertions/DropdownAssertions.js +260 -0
  25. package/build/src/assertions/DropdownMenuAssertions.d.ts +17 -0
  26. package/build/src/assertions/DropdownMenuAssertions.js +236 -0
  27. package/build/src/assertions/FileUploaderAssertions.d.ts +14 -0
  28. package/build/src/assertions/FileUploaderAssertions.js +119 -0
  29. package/build/src/assertions/FxInputAssertions.d.ts +17 -0
  30. package/build/src/assertions/FxInputAssertions.js +189 -0
  31. package/build/src/assertions/InputAssertions.d.ts +19 -0
  32. package/build/src/assertions/InputAssertions.js +177 -0
  33. package/build/src/assertions/KebabAssertions.d.ts +13 -0
  34. package/build/src/assertions/KebabAssertions.js +189 -0
  35. package/build/src/assertions/LabelAssertions.d.ts +19 -0
  36. package/build/src/assertions/LabelAssertions.js +144 -0
  37. package/build/src/assertions/LinkAssertions.d.ts +17 -0
  38. package/build/src/assertions/LinkAssertions.js +187 -0
  39. package/build/src/assertions/LoaderAssertions.d.ts +8 -0
  40. package/build/src/assertions/LoaderAssertions.js +78 -0
  41. package/build/src/assertions/MenuItemAssertations.d.ts +11 -0
  42. package/build/src/assertions/MenuItemAssertations.js +114 -0
  43. package/build/src/assertions/PagingAssertions.d.ts +15 -0
  44. package/build/src/assertions/PagingAssertions.js +149 -0
  45. package/build/src/assertions/PortalAssertions.d.ts +9 -0
  46. package/build/src/assertions/PortalAssertions.js +90 -0
  47. package/build/src/assertions/RadioAssertions.d.ts +19 -0
  48. package/build/src/assertions/RadioAssertions.js +210 -0
  49. package/build/src/assertions/RadioGroupAssertions.d.ts +15 -0
  50. package/build/src/assertions/RadioGroupAssertions.js +233 -0
  51. package/build/src/assertions/SelectAssertions.d.ts +15 -0
  52. package/build/src/assertions/SelectAssertions.js +211 -0
  53. package/build/src/assertions/SpinnerAssertions.d.ts +8 -0
  54. package/build/src/assertions/SpinnerAssertions.js +78 -0
  55. package/build/src/assertions/TabAssertions.d.ts +17 -0
  56. package/build/src/assertions/TabAssertions.js +187 -0
  57. package/build/src/assertions/TabsAssertions.d.ts +11 -0
  58. package/build/src/assertions/TabsAssertions.js +130 -0
  59. package/build/src/assertions/TextareaAssertions.d.ts +15 -0
  60. package/build/src/assertions/TextareaAssertions.js +162 -0
  61. package/build/src/assertions/ToastAssertions.d.ts +8 -0
  62. package/build/src/assertions/ToastAssertions.js +78 -0
  63. package/build/src/assertions/ToggleAssertions.d.ts +17 -0
  64. package/build/src/assertions/ToggleAssertions.js +186 -0
  65. package/build/src/assertions/TokenAssertions.d.ts +17 -0
  66. package/build/src/assertions/TokenAssertions.js +159 -0
  67. package/build/src/assertions/TokenInputAssertions.d.ts +16 -0
  68. package/build/src/assertions/TokenInputAssertions.js +170 -0
  69. package/build/src/assertions/TooltipAssertions.d.ts +11 -0
  70. package/build/src/assertions/TooltipAssertions.js +114 -0
  71. package/build/src/assertions/index.d.ts +34 -0
  72. package/build/src/assertions/index.js +71 -0
  73. package/build/src/components/Autocomplete.d.ts +25 -0
  74. package/build/src/components/Autocomplete.js +256 -0
  75. package/build/src/components/BaseComponent.d.ts +18 -0
  76. package/build/src/components/BaseComponent.js +159 -0
  77. package/build/src/components/Button.d.ts +21 -0
  78. package/build/src/components/Button.js +146 -0
  79. package/build/src/components/Checkbox.d.ts +21 -0
  80. package/build/src/components/Checkbox.js +161 -0
  81. package/build/src/components/ComboBox.d.ts +41 -0
  82. package/build/src/components/ComboBox.js +292 -0
  83. package/build/src/components/ComponentList.d.ts +21 -0
  84. package/build/src/components/ComponentList.js +203 -0
  85. package/build/src/components/CurrencyInput.d.ts +21 -0
  86. package/build/src/components/CurrencyInput.js +201 -0
  87. package/build/src/components/DateInput.d.ts +18 -0
  88. package/build/src/components/DateInput.js +195 -0
  89. package/build/src/components/DatePicker.d.ts +20 -0
  90. package/build/src/components/DatePicker.js +205 -0
  91. package/build/src/components/DateRangePicker.d.ts +20 -0
  92. package/build/src/components/DateRangePicker.js +111 -0
  93. package/build/src/components/Dropdown.d.ts +35 -0
  94. package/build/src/components/Dropdown.js +322 -0
  95. package/build/src/components/DropdownMenu.d.ts +40 -0
  96. package/build/src/components/DropdownMenu.js +321 -0
  97. package/build/src/components/FileUploader.d.ts +54 -0
  98. package/build/src/components/FileUploader.js +213 -0
  99. package/build/src/components/FxInput.d.ts +23 -0
  100. package/build/src/components/FxInput.js +217 -0
  101. package/build/src/components/Input.d.ts +21 -0
  102. package/build/src/components/Input.js +192 -0
  103. package/build/src/components/Kebab.d.ts +27 -0
  104. package/build/src/components/Kebab.js +247 -0
  105. package/build/src/components/Label.d.ts +13 -0
  106. package/build/src/components/Label.js +94 -0
  107. package/build/src/components/Link.d.ts +16 -0
  108. package/build/src/components/Link.js +130 -0
  109. package/build/src/components/Loader.d.ts +11 -0
  110. package/build/src/components/Loader.js +103 -0
  111. package/build/src/components/MenuItem.d.ts +13 -0
  112. package/build/src/components/MenuItem.js +84 -0
  113. package/build/src/components/Paging.d.ts +25 -0
  114. package/build/src/components/Paging.js +249 -0
  115. package/build/src/components/Portal.d.ts +11 -0
  116. package/build/src/components/Portal.js +112 -0
  117. package/build/src/components/Radio.d.ts +19 -0
  118. package/build/src/components/Radio.js +156 -0
  119. package/build/src/components/RadioGroup.d.ts +21 -0
  120. package/build/src/components/RadioGroup.js +232 -0
  121. package/build/src/components/Select.d.ts +43 -0
  122. package/build/src/components/Select.js +384 -0
  123. package/build/src/components/Spinner.d.ts +12 -0
  124. package/build/src/components/Spinner.js +103 -0
  125. package/build/src/components/Tab.d.ts +16 -0
  126. package/build/src/components/Tab.js +126 -0
  127. package/build/src/components/Tabs.d.ts +18 -0
  128. package/build/src/components/Tabs.js +136 -0
  129. package/build/src/components/Textarea.d.ts +21 -0
  130. package/build/src/components/Textarea.js +186 -0
  131. package/build/src/components/Toast.d.ts +10 -0
  132. package/build/src/components/Toast.js +79 -0
  133. package/build/src/components/Toggle.d.ts +19 -0
  134. package/build/src/components/Toggle.js +151 -0
  135. package/build/src/components/Token.d.ts +13 -0
  136. package/build/src/components/Token.js +106 -0
  137. package/build/src/components/TokenInput.d.ts +44 -0
  138. package/build/src/components/TokenInput.js +319 -0
  139. package/build/src/components/Tooltip.d.ts +14 -0
  140. package/build/src/components/Tooltip.js +98 -0
  141. package/build/src/components/index.d.ts +34 -0
  142. package/build/src/components/index.js +71 -0
  143. package/build/src/index.d.ts +5 -0
  144. package/build/src/index.js +21 -0
  145. package/build/src/matchers/formattedMatchers.d.ts +37 -0
  146. package/build/src/matchers/formattedMatchers.js +125 -0
  147. package/build/src/matchers/index.d.ts +2 -0
  148. package/build/src/matchers/index.js +20 -0
  149. package/build/src/matchers/mergedExpects.d.ts +25 -0
  150. package/build/src/matchers/mergedExpects.js +6 -0
  151. package/build/src/options/AssertionOptions.d.ts +82 -0
  152. package/build/src/options/AssertionOptions.js +2 -0
  153. package/build/src/options/LocatorOptions.d.ts +342 -0
  154. package/build/src/options/LocatorOptions.js +2 -0
  155. package/build/src/options/index.d.ts +2 -0
  156. package/build/src/options/index.js +18 -0
  157. package/build/src/utils/constants.d.ts +10 -0
  158. package/build/src/utils/constants.js +15 -0
  159. package/build/src/utils/dataTidSelector.d.ts +1 -0
  160. package/build/src/utils/dataTidSelector.js +6 -0
  161. package/build/src/utils/index.d.ts +2 -0
  162. package/build/src/utils/index.js +20 -0
  163. package/build/src/utils/tooltipProvider.d.ts +4 -0
  164. package/build/src/utils/tooltipProvider.js +95 -0
  165. package/package.json +27 -0
@@ -0,0 +1,114 @@
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.TooltipAssertions = void 0;
55
+ var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
56
+ var matchers_1 = require("../matchers");
57
+ var TooltipAssertions = /** @class */ (function (_super) {
58
+ __extends(TooltipAssertions, _super);
59
+ function TooltipAssertions(tooltip) {
60
+ var _this = _super.call(this, tooltip) || this;
61
+ _this.tooltip = tooltip;
62
+ return _this;
63
+ }
64
+ TooltipAssertions.prototype.toHaveText = function (text, options) {
65
+ return __awaiter(this, void 0, void 0, function () {
66
+ return __generator(this, function (_a) {
67
+ switch (_a.label) {
68
+ case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.tooltip.rootLocator).toHaveText(text, options)];
69
+ case 1:
70
+ _a.sent();
71
+ return [2 /*return*/];
72
+ }
73
+ });
74
+ });
75
+ };
76
+ TooltipAssertions.prototype.notToHaveText = function (text, options) {
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, matchers_1.mergedExpects)(this.tooltip.rootLocator).not.toHaveText(text, options)];
81
+ case 1:
82
+ _a.sent();
83
+ return [2 /*return*/];
84
+ }
85
+ });
86
+ });
87
+ };
88
+ TooltipAssertions.prototype.toContainText = function (text, options) {
89
+ return __awaiter(this, void 0, void 0, function () {
90
+ return __generator(this, function (_a) {
91
+ switch (_a.label) {
92
+ case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.tooltip.rootLocator).toContainText(text, options)];
93
+ case 1:
94
+ _a.sent();
95
+ return [2 /*return*/];
96
+ }
97
+ });
98
+ });
99
+ };
100
+ TooltipAssertions.prototype.notToContainText = function (text, options) {
101
+ return __awaiter(this, void 0, void 0, function () {
102
+ return __generator(this, function (_a) {
103
+ switch (_a.label) {
104
+ case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.tooltip.rootLocator).not.toContainText(text, options)];
105
+ case 1:
106
+ _a.sent();
107
+ return [2 /*return*/];
108
+ }
109
+ });
110
+ });
111
+ };
112
+ return TooltipAssertions;
113
+ }(BaseComponentAssertions_1.BaseComponentAssertions));
114
+ exports.TooltipAssertions = TooltipAssertions;
@@ -0,0 +1,34 @@
1
+ export { BaseComponentAssertions } from './BaseComponentAssertions';
2
+ export { ButtonAssertions } from './ButtonAssertions';
3
+ export { PortalAssertions } from './PortalAssertions';
4
+ export { TooltipAssertions } from './TooltipAssertions';
5
+ export { CheckboxAssertions } from './CheckboxAssertions';
6
+ export { ComboBoxAssertions } from './ComboBoxAssertions';
7
+ export { ComponentListAssertions } from './ComponentListAssertions';
8
+ export { LabelAssertions } from './LabelAssertions';
9
+ export { MenuItemAssertations } from './MenuItemAssertations';
10
+ export { RadioAssertions } from './RadioAssertions';
11
+ export { RadioGroupAssertions } from './RadioGroupAssertions';
12
+ export { InputAssertions } from './InputAssertions';
13
+ export { CurrencyInputAssertions } from './CurrencyInputAssertions';
14
+ export { TokenAssertions } from './TokenAssertions';
15
+ export { TokenInputAssertions } from './TokenInputAssertions';
16
+ export { TextareaAssertions } from './TextareaAssertions';
17
+ export { DatePickerAssertions } from './DatePickerAssertions';
18
+ export { DateRangePickerAssertions } from './DateRangePickerAssertions';
19
+ export { DropdownMenuAssertions } from './DropdownMenuAssertions';
20
+ export { DropdownAssertions } from './DropdownAssertions';
21
+ export { ToastAssertions } from './ToastAssertions';
22
+ export { SelectAssertions } from './SelectAssertions';
23
+ export { ToggleAssertions } from './ToggleAssertions';
24
+ export { LinkAssertions } from './LinkAssertions';
25
+ export { TabsAssertions } from './TabsAssertions';
26
+ export { TabAssertions } from './TabAssertions';
27
+ export { LoaderAssertions } from './LoaderAssertions';
28
+ export { SpinnerAssertions } from './SpinnerAssertions';
29
+ export { AutocompleteAssertions } from './AutocompleteAssertions';
30
+ export { DateInputAssertions } from './DateInputAssertions';
31
+ export { FileUploaderAssertions } from './FileUploaderAssertions';
32
+ export { FxInputAssertions } from './FxInputAssertions';
33
+ export { KebabAssertions } from './KebabAssertions';
34
+ export { PagingAssertions } from './PagingAssertions';
@@ -0,0 +1,71 @@
1
+ "use strict";
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;
4
+ var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
5
+ Object.defineProperty(exports, "BaseComponentAssertions", { enumerable: true, get: function () { return BaseComponentAssertions_1.BaseComponentAssertions; } });
6
+ var ButtonAssertions_1 = require("./ButtonAssertions");
7
+ Object.defineProperty(exports, "ButtonAssertions", { enumerable: true, get: function () { return ButtonAssertions_1.ButtonAssertions; } });
8
+ var PortalAssertions_1 = require("./PortalAssertions");
9
+ Object.defineProperty(exports, "PortalAssertions", { enumerable: true, get: function () { return PortalAssertions_1.PortalAssertions; } });
10
+ var TooltipAssertions_1 = require("./TooltipAssertions");
11
+ Object.defineProperty(exports, "TooltipAssertions", { enumerable: true, get: function () { return TooltipAssertions_1.TooltipAssertions; } });
12
+ var CheckboxAssertions_1 = require("./CheckboxAssertions");
13
+ Object.defineProperty(exports, "CheckboxAssertions", { enumerable: true, get: function () { return CheckboxAssertions_1.CheckboxAssertions; } });
14
+ var ComboBoxAssertions_1 = require("./ComboBoxAssertions");
15
+ Object.defineProperty(exports, "ComboBoxAssertions", { enumerable: true, get: function () { return ComboBoxAssertions_1.ComboBoxAssertions; } });
16
+ var ComponentListAssertions_1 = require("./ComponentListAssertions");
17
+ Object.defineProperty(exports, "ComponentListAssertions", { enumerable: true, get: function () { return ComponentListAssertions_1.ComponentListAssertions; } });
18
+ var LabelAssertions_1 = require("./LabelAssertions");
19
+ Object.defineProperty(exports, "LabelAssertions", { enumerable: true, get: function () { return LabelAssertions_1.LabelAssertions; } });
20
+ var MenuItemAssertations_1 = require("./MenuItemAssertations");
21
+ Object.defineProperty(exports, "MenuItemAssertations", { enumerable: true, get: function () { return MenuItemAssertations_1.MenuItemAssertations; } });
22
+ var RadioAssertions_1 = require("./RadioAssertions");
23
+ Object.defineProperty(exports, "RadioAssertions", { enumerable: true, get: function () { return RadioAssertions_1.RadioAssertions; } });
24
+ var RadioGroupAssertions_1 = require("./RadioGroupAssertions");
25
+ Object.defineProperty(exports, "RadioGroupAssertions", { enumerable: true, get: function () { return RadioGroupAssertions_1.RadioGroupAssertions; } });
26
+ var InputAssertions_1 = require("./InputAssertions");
27
+ Object.defineProperty(exports, "InputAssertions", { enumerable: true, get: function () { return InputAssertions_1.InputAssertions; } });
28
+ var CurrencyInputAssertions_1 = require("./CurrencyInputAssertions");
29
+ Object.defineProperty(exports, "CurrencyInputAssertions", { enumerable: true, get: function () { return CurrencyInputAssertions_1.CurrencyInputAssertions; } });
30
+ var TokenAssertions_1 = require("./TokenAssertions");
31
+ Object.defineProperty(exports, "TokenAssertions", { enumerable: true, get: function () { return TokenAssertions_1.TokenAssertions; } });
32
+ var TokenInputAssertions_1 = require("./TokenInputAssertions");
33
+ Object.defineProperty(exports, "TokenInputAssertions", { enumerable: true, get: function () { return TokenInputAssertions_1.TokenInputAssertions; } });
34
+ var TextareaAssertions_1 = require("./TextareaAssertions");
35
+ Object.defineProperty(exports, "TextareaAssertions", { enumerable: true, get: function () { return TextareaAssertions_1.TextareaAssertions; } });
36
+ var DatePickerAssertions_1 = require("./DatePickerAssertions");
37
+ Object.defineProperty(exports, "DatePickerAssertions", { enumerable: true, get: function () { return DatePickerAssertions_1.DatePickerAssertions; } });
38
+ var DateRangePickerAssertions_1 = require("./DateRangePickerAssertions");
39
+ Object.defineProperty(exports, "DateRangePickerAssertions", { enumerable: true, get: function () { return DateRangePickerAssertions_1.DateRangePickerAssertions; } });
40
+ var DropdownMenuAssertions_1 = require("./DropdownMenuAssertions");
41
+ Object.defineProperty(exports, "DropdownMenuAssertions", { enumerable: true, get: function () { return DropdownMenuAssertions_1.DropdownMenuAssertions; } });
42
+ var DropdownAssertions_1 = require("./DropdownAssertions");
43
+ Object.defineProperty(exports, "DropdownAssertions", { enumerable: true, get: function () { return DropdownAssertions_1.DropdownAssertions; } });
44
+ var ToastAssertions_1 = require("./ToastAssertions");
45
+ Object.defineProperty(exports, "ToastAssertions", { enumerable: true, get: function () { return ToastAssertions_1.ToastAssertions; } });
46
+ var SelectAssertions_1 = require("./SelectAssertions");
47
+ Object.defineProperty(exports, "SelectAssertions", { enumerable: true, get: function () { return SelectAssertions_1.SelectAssertions; } });
48
+ var ToggleAssertions_1 = require("./ToggleAssertions");
49
+ Object.defineProperty(exports, "ToggleAssertions", { enumerable: true, get: function () { return ToggleAssertions_1.ToggleAssertions; } });
50
+ var LinkAssertions_1 = require("./LinkAssertions");
51
+ Object.defineProperty(exports, "LinkAssertions", { enumerable: true, get: function () { return LinkAssertions_1.LinkAssertions; } });
52
+ var TabsAssertions_1 = require("./TabsAssertions");
53
+ Object.defineProperty(exports, "TabsAssertions", { enumerable: true, get: function () { return TabsAssertions_1.TabsAssertions; } });
54
+ var TabAssertions_1 = require("./TabAssertions");
55
+ Object.defineProperty(exports, "TabAssertions", { enumerable: true, get: function () { return TabAssertions_1.TabAssertions; } });
56
+ var LoaderAssertions_1 = require("./LoaderAssertions");
57
+ Object.defineProperty(exports, "LoaderAssertions", { enumerable: true, get: function () { return LoaderAssertions_1.LoaderAssertions; } });
58
+ var SpinnerAssertions_1 = require("./SpinnerAssertions");
59
+ Object.defineProperty(exports, "SpinnerAssertions", { enumerable: true, get: function () { return SpinnerAssertions_1.SpinnerAssertions; } });
60
+ var AutocompleteAssertions_1 = require("./AutocompleteAssertions");
61
+ Object.defineProperty(exports, "AutocompleteAssertions", { enumerable: true, get: function () { return AutocompleteAssertions_1.AutocompleteAssertions; } });
62
+ var DateInputAssertions_1 = require("./DateInputAssertions");
63
+ Object.defineProperty(exports, "DateInputAssertions", { enumerable: true, get: function () { return DateInputAssertions_1.DateInputAssertions; } });
64
+ var FileUploaderAssertions_1 = require("./FileUploaderAssertions");
65
+ Object.defineProperty(exports, "FileUploaderAssertions", { enumerable: true, get: function () { return FileUploaderAssertions_1.FileUploaderAssertions; } });
66
+ var FxInputAssertions_1 = require("./FxInputAssertions");
67
+ Object.defineProperty(exports, "FxInputAssertions", { enumerable: true, get: function () { return FxInputAssertions_1.FxInputAssertions; } });
68
+ var KebabAssertions_1 = require("./KebabAssertions");
69
+ Object.defineProperty(exports, "KebabAssertions", { enumerable: true, get: function () { return KebabAssertions_1.KebabAssertions; } });
70
+ var PagingAssertions_1 = require("./PagingAssertions");
71
+ Object.defineProperty(exports, "PagingAssertions", { enumerable: true, get: function () { return PagingAssertions_1.PagingAssertions; } });
@@ -0,0 +1,25 @@
1
+ import type { Locator } from '@playwright/test';
2
+ import { BaseComponent } from './BaseComponent';
3
+ import { type TooltipType } from '../utils';
4
+ import { AutocompleteAssertions } from '../assertions';
5
+ import type { BlurOptions, ClearOptions, ClickOptions, FillOptions, FocusOptions, InputValueOptions, IsDisabledOptions, PressOptions, PressSequentiallyOptions } from '../options';
6
+ export declare class Autocomplete extends BaseComponent {
7
+ private readonly portal;
8
+ readonly inputLocator: Locator;
9
+ constructor(rootLocator: Locator);
10
+ isDisabled(options?: IsDisabledOptions): Promise<boolean>;
11
+ getValue(options?: InputValueOptions): Promise<string>;
12
+ fill(value: string, options?: FillOptions): Promise<void>;
13
+ press(value: string, options?: PressOptions): Promise<void>;
14
+ pressSequentially(value: string, options?: PressSequentiallyOptions): Promise<void>;
15
+ clear(options?: ClearOptions): Promise<void>;
16
+ focus(options?: FocusOptions): Promise<void>;
17
+ blur(options?: BlurOptions): Promise<void>;
18
+ click(options?: ClickOptions): Promise<void>;
19
+ getTooltip(type: TooltipType): Promise<import("./Tooltip").Tooltip>;
20
+ selectFirstSuggestion(options?: ClickOptions): Promise<void>;
21
+ selectSuggestionByIndex(index: number, options?: ClickOptions): Promise<void>;
22
+ selectSuggestionByText(text: string | RegExp, options?: ClickOptions): Promise<void>;
23
+ expect(): AutocompleteAssertions;
24
+ private getSuggestions;
25
+ }
@@ -0,0 +1,256 @@
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.Autocomplete = void 0;
55
+ var test_1 = require("@playwright/test");
56
+ var react_ui_1 = require("@skbkontur/react-ui");
57
+ var BaseComponent_1 = require("./BaseComponent");
58
+ var Portal_1 = require("./Portal");
59
+ var utils_1 = require("../utils");
60
+ var assertions_1 = require("../assertions");
61
+ var dataTidSelector_1 = require("../utils/dataTidSelector");
62
+ var Autocomplete = /** @class */ (function (_super) {
63
+ __extends(Autocomplete, _super);
64
+ function Autocomplete(rootLocator) {
65
+ var _this = _super.call(this, rootLocator) || this;
66
+ _this.portal = new Portal_1.Portal(rootLocator.locator('noscript'));
67
+ _this.inputLocator = rootLocator.locator('input');
68
+ return _this;
69
+ }
70
+ Autocomplete.prototype.isDisabled = function (options) {
71
+ return __awaiter(this, void 0, void 0, function () {
72
+ return __generator(this, function (_a) {
73
+ switch (_a.label) {
74
+ case 0: return [4 /*yield*/, this.inputLocator.isDisabled(options)];
75
+ case 1: return [2 /*return*/, _a.sent()];
76
+ }
77
+ });
78
+ });
79
+ };
80
+ Autocomplete.prototype.getValue = function (options) {
81
+ return __awaiter(this, void 0, void 0, function () {
82
+ return __generator(this, function (_a) {
83
+ switch (_a.label) {
84
+ case 0: return [4 /*yield*/, this.inputLocator.inputValue(options)];
85
+ case 1: return [2 /*return*/, _a.sent()];
86
+ }
87
+ });
88
+ });
89
+ };
90
+ Autocomplete.prototype.fill = function (value, options) {
91
+ return __awaiter(this, void 0, void 0, function () {
92
+ return __generator(this, function (_a) {
93
+ switch (_a.label) {
94
+ case 0: return [4 /*yield*/, this.focus()];
95
+ case 1:
96
+ _a.sent();
97
+ return [4 /*yield*/, this.clear()];
98
+ case 2:
99
+ _a.sent();
100
+ return [4 /*yield*/, this.inputLocator.fill(value, options)];
101
+ case 3:
102
+ _a.sent();
103
+ return [2 /*return*/];
104
+ }
105
+ });
106
+ });
107
+ };
108
+ Autocomplete.prototype.press = function (value, options) {
109
+ return __awaiter(this, void 0, void 0, function () {
110
+ return __generator(this, function (_a) {
111
+ switch (_a.label) {
112
+ case 0: return [4 /*yield*/, this.inputLocator.press(value, options)];
113
+ case 1:
114
+ _a.sent();
115
+ return [2 /*return*/];
116
+ }
117
+ });
118
+ });
119
+ };
120
+ Autocomplete.prototype.pressSequentially = function (value, options) {
121
+ return __awaiter(this, void 0, void 0, function () {
122
+ return __generator(this, function (_a) {
123
+ switch (_a.label) {
124
+ case 0: return [4 /*yield*/, this.inputLocator.pressSequentially(value, options)];
125
+ case 1:
126
+ _a.sent();
127
+ return [2 /*return*/];
128
+ }
129
+ });
130
+ });
131
+ };
132
+ Autocomplete.prototype.clear = function (options) {
133
+ return __awaiter(this, void 0, void 0, function () {
134
+ return __generator(this, function (_a) {
135
+ switch (_a.label) {
136
+ case 0: return [4 /*yield*/, this.inputLocator.clear(options)];
137
+ case 1:
138
+ _a.sent();
139
+ return [2 /*return*/];
140
+ }
141
+ });
142
+ });
143
+ };
144
+ Autocomplete.prototype.focus = function (options) {
145
+ return __awaiter(this, void 0, void 0, function () {
146
+ return __generator(this, function (_a) {
147
+ switch (_a.label) {
148
+ case 0: return [4 /*yield*/, (0, test_1.expect)(this.inputLocator).toBeEnabled()];
149
+ case 1:
150
+ _a.sent();
151
+ return [4 /*yield*/, this.inputLocator.focus(options)];
152
+ case 2:
153
+ _a.sent();
154
+ return [2 /*return*/];
155
+ }
156
+ });
157
+ });
158
+ };
159
+ Autocomplete.prototype.blur = function (options) {
160
+ return __awaiter(this, void 0, void 0, function () {
161
+ return __generator(this, function (_a) {
162
+ switch (_a.label) {
163
+ case 0: return [4 /*yield*/, this.inputLocator.blur(options)];
164
+ case 1:
165
+ _a.sent();
166
+ return [2 /*return*/];
167
+ }
168
+ });
169
+ });
170
+ };
171
+ Autocomplete.prototype.click = function (options) {
172
+ return __awaiter(this, void 0, void 0, function () {
173
+ return __generator(this, function (_a) {
174
+ switch (_a.label) {
175
+ case 0: return [4 /*yield*/, this.inputLocator.click(options)];
176
+ case 1:
177
+ _a.sent();
178
+ return [2 /*return*/];
179
+ }
180
+ });
181
+ });
182
+ };
183
+ Autocomplete.prototype.getTooltip = function (type) {
184
+ return __awaiter(this, void 0, void 0, function () {
185
+ return __generator(this, function (_a) {
186
+ return [2 /*return*/, (0, utils_1.getTooltip)(type, this)];
187
+ });
188
+ });
189
+ };
190
+ Autocomplete.prototype.selectFirstSuggestion = function (options) {
191
+ return __awaiter(this, void 0, void 0, function () {
192
+ var suggestions;
193
+ return __generator(this, function (_a) {
194
+ switch (_a.label) {
195
+ case 0: return [4 /*yield*/, this.getSuggestions()];
196
+ case 1:
197
+ suggestions = _a.sent();
198
+ return [4 /*yield*/, suggestions.first().click(options)];
199
+ case 2:
200
+ _a.sent();
201
+ return [2 /*return*/];
202
+ }
203
+ });
204
+ });
205
+ };
206
+ Autocomplete.prototype.selectSuggestionByIndex = function (index, options) {
207
+ return __awaiter(this, void 0, void 0, function () {
208
+ var suggestions;
209
+ return __generator(this, function (_a) {
210
+ switch (_a.label) {
211
+ case 0: return [4 /*yield*/, this.getSuggestions()];
212
+ case 1:
213
+ suggestions = _a.sent();
214
+ return [4 /*yield*/, suggestions.nth(index).click(options)];
215
+ case 2:
216
+ _a.sent();
217
+ return [2 /*return*/];
218
+ }
219
+ });
220
+ });
221
+ };
222
+ Autocomplete.prototype.selectSuggestionByText = function (text, options) {
223
+ return __awaiter(this, void 0, void 0, function () {
224
+ var suggestions;
225
+ return __generator(this, function (_a) {
226
+ switch (_a.label) {
227
+ case 0: return [4 /*yield*/, this.getSuggestions()];
228
+ case 1:
229
+ suggestions = _a.sent();
230
+ return [4 /*yield*/, suggestions.getByText(text).click(options)];
231
+ case 2:
232
+ _a.sent();
233
+ return [2 /*return*/];
234
+ }
235
+ });
236
+ });
237
+ };
238
+ Autocomplete.prototype.expect = function () {
239
+ return new assertions_1.AutocompleteAssertions(this);
240
+ };
241
+ Autocomplete.prototype.getSuggestions = function () {
242
+ return __awaiter(this, void 0, void 0, function () {
243
+ var container;
244
+ return __generator(this, function (_a) {
245
+ switch (_a.label) {
246
+ case 0: return [4 /*yield*/, this.portal.getContainer()];
247
+ case 1:
248
+ container = _a.sent();
249
+ return [2 /*return*/, container.locator((0, dataTidSelector_1.getDataTidSelector)(react_ui_1.MenuItemDataTids.root))];
250
+ }
251
+ });
252
+ });
253
+ };
254
+ return Autocomplete;
255
+ }(BaseComponent_1.BaseComponent));
256
+ exports.Autocomplete = Autocomplete;
@@ -0,0 +1,18 @@
1
+ import type { Locator, Page } from '@playwright/test';
2
+ import { BaseComponentAssertions } from '../assertions';
3
+ import type { ClickOptions, GetAttributeOptions, HoverOptions, IsVisibleOptions, ScrollIntoViewIfNeededOptions, WaitForOptions } from '../options';
4
+ export declare abstract class BaseComponent {
5
+ readonly rootLocator: Locator;
6
+ readonly page: Page;
7
+ protected constructor(rootLocator: Locator);
8
+ isVisible(options?: IsVisibleOptions): Promise<boolean>;
9
+ hasError(options?: GetAttributeOptions): Promise<boolean>;
10
+ hasWarning(options?: GetAttributeOptions): Promise<boolean>;
11
+ click(options?: ClickOptions): Promise<void>;
12
+ hover(options?: HoverOptions): Promise<void>;
13
+ scrollIntoViewIfNeeded(options?: ScrollIntoViewIfNeededOptions): Promise<void>;
14
+ waitFor(options?: WaitForOptions): Promise<void>;
15
+ hasAttribute(name: string, options?: GetAttributeOptions): Promise<boolean>;
16
+ getAttribute(name: string, options?: GetAttributeOptions): Promise<string | null>;
17
+ expect(): BaseComponentAssertions;
18
+ }