@skbkontur/playwright-react-ui-components 1.13.2 → 1.14.0-beta.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.
Files changed (210) hide show
  1. package/build/src/assertions/AutocompleteAssertions.js +10 -10
  2. package/build/src/assertions/BaseComponentAssertions.js +11 -11
  3. package/build/src/assertions/ButtonAssertions.js +9 -9
  4. package/build/src/assertions/CheckboxAssertions.js +13 -13
  5. package/build/src/assertions/ComboBoxAssertions.js +17 -111
  6. package/build/src/assertions/ComponentListAssertions.js +6 -6
  7. package/build/src/assertions/CurrencyInputAssertions.js +11 -61
  8. package/build/src/assertions/DateInputAssertions.js +9 -9
  9. package/build/src/assertions/DatePickerAssertions.js +9 -9
  10. package/build/src/assertions/DateRangePickerAssertions.js +4 -25
  11. package/build/src/assertions/DropdownAssertions.js +13 -63
  12. package/build/src/assertions/DropdownMenuAssertions.js +11 -61
  13. package/build/src/assertions/FileUploaderAssertions.d.ts +1 -3
  14. package/build/src/assertions/FileUploaderAssertions.js +5 -22
  15. package/build/src/assertions/FxInputAssertions.js +11 -14
  16. package/build/src/assertions/InputAssertions.js +10 -10
  17. package/build/src/assertions/KebabAssertions.js +7 -58
  18. package/build/src/assertions/LabelAssertions.js +7 -7
  19. package/build/src/assertions/LinkAssertions.js +11 -12
  20. package/build/src/assertions/LoaderAssertions.js +2 -2
  21. package/build/src/assertions/MenuItemAssertations.js +5 -5
  22. package/build/src/assertions/PagingAssertions.js +5 -40
  23. package/build/src/assertions/PortalAssertions.js +3 -3
  24. package/build/src/assertions/RadioAssertions.js +13 -13
  25. package/build/src/assertions/RadioGroupAssertions.js +10 -81
  26. package/build/src/assertions/SelectAssertions.js +15 -64
  27. package/build/src/assertions/SpinnerAssertions.js +2 -2
  28. package/build/src/assertions/TabAssertions.js +11 -12
  29. package/build/src/assertions/TabsAssertions.js +4 -32
  30. package/build/src/assertions/TextareaAssertions.js +9 -9
  31. package/build/src/assertions/ToastAssertions.js +2 -2
  32. package/build/src/assertions/ToggleAssertions.js +11 -11
  33. package/build/src/assertions/TokenAssertions.js +8 -14
  34. package/build/src/assertions/TokenInputAssertions.js +8 -28
  35. package/build/src/assertions/TooltipAssertions.js +5 -5
  36. package/build/src/components/Autocomplete.d.ts +4 -0
  37. package/build/src/components/Autocomplete.js +52 -50
  38. package/build/src/components/BaseComponent.d.ts +4 -0
  39. package/build/src/components/BaseComponent.js +37 -30
  40. package/build/src/components/Button.d.ts +4 -0
  41. package/build/src/components/Button.js +25 -19
  42. package/build/src/components/Checkbox.d.ts +6 -0
  43. package/build/src/components/Checkbox.js +28 -36
  44. package/build/src/components/ComboBox.d.ts +9 -2
  45. package/build/src/components/ComboBox.js +68 -54
  46. package/build/src/components/ComponentList.d.ts +6 -3
  47. package/build/src/components/ComponentList.js +39 -50
  48. package/build/src/components/CurrencyInput.d.ts +4 -0
  49. package/build/src/components/CurrencyInput.js +39 -37
  50. package/build/src/components/DateInput.d.ts +4 -0
  51. package/build/src/components/DateInput.js +34 -32
  52. package/build/src/components/DatePicker.d.ts +4 -0
  53. package/build/src/components/DatePicker.js +35 -33
  54. package/build/src/components/DateRangePicker.d.ts +2 -0
  55. package/build/src/components/DateRangePicker.js +14 -10
  56. package/build/src/components/Dropdown.d.ts +8 -2
  57. package/build/src/components/Dropdown.js +69 -65
  58. package/build/src/components/DropdownMenu.d.ts +7 -2
  59. package/build/src/components/DropdownMenu.js +68 -65
  60. package/build/src/components/FileUploader.d.ts +3 -1
  61. package/build/src/components/FileUploader.js +39 -39
  62. package/build/src/components/FxInput.d.ts +4 -0
  63. package/build/src/components/FxInput.js +44 -42
  64. package/build/src/components/Input.d.ts +4 -0
  65. package/build/src/components/Input.js +37 -35
  66. package/build/src/components/Kebab.d.ts +6 -2
  67. package/build/src/components/Kebab.js +50 -48
  68. package/build/src/components/Label.d.ts +2 -0
  69. package/build/src/components/Label.js +9 -13
  70. package/build/src/components/Link.d.ts +4 -0
  71. package/build/src/components/Link.js +19 -25
  72. package/build/src/components/Loader.d.ts +2 -0
  73. package/build/src/components/Loader.js +15 -10
  74. package/build/src/components/MenuComponent.d.ts +9 -0
  75. package/build/src/components/MenuComponent.js +78 -0
  76. package/build/src/components/MenuItem.d.ts +2 -0
  77. package/build/src/components/MenuItem.js +7 -3
  78. package/build/src/components/Paging.d.ts +2 -0
  79. package/build/src/components/Paging.js +59 -52
  80. package/build/src/components/Portal.d.ts +2 -0
  81. package/build/src/components/Portal.js +14 -10
  82. package/build/src/components/Radio.d.ts +6 -0
  83. package/build/src/components/Radio.js +31 -27
  84. package/build/src/components/RadioGroup.d.ts +2 -0
  85. package/build/src/components/RadioGroup.js +51 -47
  86. package/build/src/components/Select.d.ts +5 -0
  87. package/build/src/components/Select.js +92 -76
  88. package/build/src/components/Spinner.d.ts +2 -0
  89. package/build/src/components/Spinner.js +13 -9
  90. package/build/src/components/Tab.d.ts +4 -0
  91. package/build/src/components/Tab.js +17 -27
  92. package/build/src/components/Textarea.d.ts +4 -0
  93. package/build/src/components/Textarea.js +33 -39
  94. package/build/src/components/Toast.d.ts +2 -0
  95. package/build/src/components/Toast.js +7 -3
  96. package/build/src/components/Toggle.d.ts +5 -0
  97. package/build/src/components/Toggle.js +24 -33
  98. package/build/src/components/Token.d.ts +3 -0
  99. package/build/src/components/Token.js +14 -9
  100. package/build/src/components/TokenInput.d.ts +4 -0
  101. package/build/src/components/TokenInput.js +61 -59
  102. package/build/src/components/Tooltip.d.ts +2 -0
  103. package/build/src/components/Tooltip.js +9 -9
  104. package/build/src/components/index.d.ts +1 -0
  105. package/build/src/components/index.js +3 -1
  106. package/build/src/extensions/index.d.ts +1 -0
  107. package/build/src/extensions/index.js +17 -0
  108. package/build/src/extensions/mergedExpects.d.ts +5 -0
  109. package/build/src/extensions/mergedExpects.js +7 -0
  110. package/build/src/index.d.ts +2 -0
  111. package/build/src/index.js +2 -0
  112. package/build/src/matchers/component/LocatorSymbols.d.ts +43 -0
  113. package/build/src/matchers/component/LocatorSymbols.js +13 -0
  114. package/build/src/matchers/component/toBeActiveEx.d.ts +3 -0
  115. package/build/src/matchers/component/toBeActiveEx.js +56 -0
  116. package/build/src/matchers/component/toBeAutoEx.d.ts +3 -0
  117. package/build/src/matchers/component/toBeAutoEx.js +62 -0
  118. package/build/src/matchers/component/toBeCheckedByIndexEx.d.ts +3 -0
  119. package/build/src/matchers/component/toBeCheckedByIndexEx.js +62 -0
  120. package/build/src/matchers/component/toBeCheckedByTextEx.d.ts +3 -0
  121. package/build/src/matchers/component/toBeCheckedByTextEx.js +62 -0
  122. package/build/src/matchers/component/toBeCheckedByValueEx.d.ts +3 -0
  123. package/build/src/matchers/component/toBeCheckedByValueEx.js +62 -0
  124. package/build/src/matchers/component/toBeCheckedEx.d.ts +3 -0
  125. package/build/src/matchers/component/toBeCheckedEx.js +56 -0
  126. package/build/src/matchers/component/toBeDisabledEx.d.ts +3 -0
  127. package/build/src/matchers/component/toBeDisabledEx.js +172 -0
  128. package/build/src/matchers/component/toBeEmptyEx.d.ts +3 -0
  129. package/build/src/matchers/component/toBeEmptyEx.js +137 -0
  130. package/build/src/matchers/component/toBeEnabledEx.d.ts +3 -0
  131. package/build/src/matchers/component/toBeEnabledEx.js +206 -0
  132. package/build/src/matchers/component/toBeFocusedEx.d.ts +3 -0
  133. package/build/src/matchers/component/toBeFocusedEx.js +56 -0
  134. package/build/src/matchers/component/toBeHiddenEx.d.ts +3 -0
  135. package/build/src/matchers/component/toBeHiddenEx.js +68 -0
  136. package/build/src/matchers/component/toBeInactiveEx.d.ts +3 -0
  137. package/build/src/matchers/component/toBeInactiveEx.js +56 -0
  138. package/build/src/matchers/component/toBeUncheckedByIndexEx.d.ts +3 -0
  139. package/build/src/matchers/component/toBeUncheckedByIndexEx.js +62 -0
  140. package/build/src/matchers/component/toBeUncheckedByTextEx.d.ts +3 -0
  141. package/build/src/matchers/component/toBeUncheckedByTextEx.js +57 -0
  142. package/build/src/matchers/component/toBeUncheckedByValueEx.d.ts +3 -0
  143. package/build/src/matchers/component/toBeUncheckedByValueEx.js +57 -0
  144. package/build/src/matchers/component/toBeUncheckedEx.d.ts +3 -0
  145. package/build/src/matchers/component/toBeUncheckedEx.js +56 -0
  146. package/build/src/matchers/component/toBeVisibleEx.d.ts +3 -0
  147. package/build/src/matchers/component/toBeVisibleEx.js +68 -0
  148. package/build/src/matchers/component/toContainFormattedTextEx.d.ts +3 -0
  149. package/build/src/matchers/component/toContainFormattedTextEx.js +55 -0
  150. package/build/src/matchers/component/toContainItemEx.d.ts +4 -0
  151. package/build/src/matchers/component/toContainItemEx.js +79 -0
  152. package/build/src/matchers/component/toContainItemsEx.d.ts +3 -0
  153. package/build/src/matchers/component/toContainItemsEx.js +63 -0
  154. package/build/src/matchers/component/toContainTabsEx.d.ts +3 -0
  155. package/build/src/matchers/component/toContainTabsEx.js +80 -0
  156. package/build/src/matchers/component/toContainTextEx.d.ts +3 -0
  157. package/build/src/matchers/component/toContainTextEx.js +56 -0
  158. package/build/src/matchers/component/toContainTokensEx.d.ts +4 -0
  159. package/build/src/matchers/component/toContainTokensEx.js +80 -0
  160. package/build/src/matchers/component/toContainUploadedFilesEx.d.ts +4 -0
  161. package/build/src/matchers/component/toContainUploadedFilesEx.js +75 -0
  162. package/build/src/matchers/component/toContainValueEx.d.ts +3 -0
  163. package/build/src/matchers/component/toContainValueEx.js +55 -0
  164. package/build/src/matchers/component/toHaveActivePageEx.d.ts +4 -0
  165. package/build/src/matchers/component/toHaveActivePageEx.js +78 -0
  166. package/build/src/matchers/component/toHaveActiveTabEx.d.ts +2 -0
  167. package/build/src/matchers/component/toHaveActiveTabEx.js +62 -0
  168. package/build/src/matchers/component/toHaveAttributeEx.d.ts +3 -0
  169. package/build/src/matchers/component/toHaveAttributeEx.js +62 -0
  170. package/build/src/matchers/component/toHaveCountEx.d.ts +3 -0
  171. package/build/src/matchers/component/toHaveCountEx.js +56 -0
  172. package/build/src/matchers/component/toHaveErrorEx.d.ts +3 -0
  173. package/build/src/matchers/component/toHaveErrorEx.js +57 -0
  174. package/build/src/matchers/component/toHaveFormattedTextEx.d.ts +3 -0
  175. package/build/src/matchers/component/toHaveFormattedTextEx.js +56 -0
  176. package/build/src/matchers/component/toHaveFormattedValueEx.d.ts +3 -0
  177. package/build/src/matchers/component/toHaveFormattedValueEx.js +56 -0
  178. package/build/src/matchers/component/toHaveHrefEx.d.ts +3 -0
  179. package/build/src/matchers/component/toHaveHrefEx.js +55 -0
  180. package/build/src/matchers/component/toHaveItemsEx.d.ts +3 -0
  181. package/build/src/matchers/component/toHaveItemsEx.js +63 -0
  182. package/build/src/matchers/component/toHavePageCountEx.d.ts +4 -0
  183. package/build/src/matchers/component/toHavePageCountEx.js +71 -0
  184. package/build/src/matchers/component/toHaveTextEx.d.ts +3 -0
  185. package/build/src/matchers/component/toHaveTextEx.js +56 -0
  186. package/build/src/matchers/component/toHaveValueEx.d.ts +6 -0
  187. package/build/src/matchers/component/toHaveValueEx.js +198 -0
  188. package/build/src/matchers/component/toHaveWarningEx.d.ts +3 -0
  189. package/build/src/matchers/component/toHaveWarningEx.js +57 -0
  190. package/build/src/matchers/componentMatchers.d.ts +104 -0
  191. package/build/src/matchers/componentMatchers.js +83 -0
  192. package/build/src/matchers/createAsyncMatcher.d.ts +47 -0
  193. package/build/src/matchers/createAsyncMatcher.js +155 -0
  194. package/build/src/matchers/formattedMatchers.d.ts +15 -31
  195. package/build/src/matchers/formattedMatchers.js +19 -15
  196. package/build/src/matchers/index.d.ts +1 -1
  197. package/build/src/matchers/index.js +1 -3
  198. package/build/src/utils/getMarcherResult.d.ts +13 -0
  199. package/build/src/utils/getMarcherResult.js +13 -0
  200. package/build/src/utils/index.d.ts +3 -0
  201. package/build/src/utils/index.js +3 -0
  202. package/build/src/utils/is.d.ts +3 -0
  203. package/build/src/utils/is.js +5 -0
  204. package/build/src/utils/makeMatcher.d.ts +5 -0
  205. package/build/src/utils/makeMatcher.js +65 -0
  206. package/build/src/utils/toMatchMessage.d.ts +12 -0
  207. package/build/src/utils/toMatchMessage.js +78 -0
  208. package/package.json +1 -1
  209. package/build/src/matchers/mergedExpects.d.ts +0 -15
  210. package/build/src/matchers/mergedExpects.js +0 -6
@@ -53,8 +53,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
53
53
  Object.defineProperty(exports, "__esModule", { value: true });
54
54
  exports.LinkAssertions = void 0;
55
55
  var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
56
- var utils_1 = require("../utils");
57
- var matchers_1 = require("../matchers");
56
+ var extensions_1 = require("../extensions");
58
57
  var LinkAssertions = /** @class */ (function (_super) {
59
58
  __extends(LinkAssertions, _super);
60
59
  function LinkAssertions(link) {
@@ -66,7 +65,7 @@ var LinkAssertions = /** @class */ (function (_super) {
66
65
  return __awaiter(this, void 0, void 0, function () {
67
66
  return __generator(this, function (_a) {
68
67
  switch (_a.label) {
69
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.link.rootLocator).not.toHaveAttribute(utils_1.DataVisualState.Disabled, options)];
68
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.link).toBeEnabledEx(options)];
70
69
  case 1:
71
70
  _a.sent();
72
71
  return [2 /*return*/];
@@ -78,7 +77,7 @@ var LinkAssertions = /** @class */ (function (_super) {
78
77
  return __awaiter(this, void 0, void 0, function () {
79
78
  return __generator(this, function (_a) {
80
79
  switch (_a.label) {
81
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.link.rootLocator).toHaveAttribute(utils_1.DataVisualState.Disabled, options)];
80
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.link).toBeDisabledEx(options)];
82
81
  case 1:
83
82
  _a.sent();
84
83
  return [2 /*return*/];
@@ -90,7 +89,7 @@ var LinkAssertions = /** @class */ (function (_super) {
90
89
  return __awaiter(this, void 0, void 0, function () {
91
90
  return __generator(this, function (_a) {
92
91
  switch (_a.label) {
93
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.link.rootLocator).toHaveText(text, options)];
92
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.link).toHaveTextEx(text, options)];
94
93
  case 1:
95
94
  _a.sent();
96
95
  return [2 /*return*/];
@@ -102,7 +101,7 @@ var LinkAssertions = /** @class */ (function (_super) {
102
101
  return __awaiter(this, void 0, void 0, function () {
103
102
  return __generator(this, function (_a) {
104
103
  switch (_a.label) {
105
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.link.rootLocator).not.toHaveText(text, options)];
104
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.link).not.toHaveTextEx(text, options)];
106
105
  case 1:
107
106
  _a.sent();
108
107
  return [2 /*return*/];
@@ -114,7 +113,7 @@ var LinkAssertions = /** @class */ (function (_super) {
114
113
  return __awaiter(this, void 0, void 0, function () {
115
114
  return __generator(this, function (_a) {
116
115
  switch (_a.label) {
117
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.link.rootLocator).toContainText(text, options)];
116
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.link).toContainTextEx(text, options)];
118
117
  case 1:
119
118
  _a.sent();
120
119
  return [2 /*return*/];
@@ -126,7 +125,7 @@ var LinkAssertions = /** @class */ (function (_super) {
126
125
  return __awaiter(this, void 0, void 0, function () {
127
126
  return __generator(this, function (_a) {
128
127
  switch (_a.label) {
129
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.link.rootLocator).not.toContainText(text, options)];
128
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.link).not.toContainTextEx(text, options)];
130
129
  case 1:
131
130
  _a.sent();
132
131
  return [2 /*return*/];
@@ -138,7 +137,7 @@ var LinkAssertions = /** @class */ (function (_super) {
138
137
  return __awaiter(this, void 0, void 0, function () {
139
138
  return __generator(this, function (_a) {
140
139
  switch (_a.label) {
141
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.link.rootLocator).toHaveAttribute('href', href, options)];
140
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.link).toHaveHrefEx(href, options)];
142
141
  case 1:
143
142
  _a.sent();
144
143
  return [2 /*return*/];
@@ -150,7 +149,7 @@ var LinkAssertions = /** @class */ (function (_super) {
150
149
  return __awaiter(this, void 0, void 0, function () {
151
150
  return __generator(this, function (_a) {
152
151
  switch (_a.label) {
153
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.link.rootLocator).not.toHaveAttribute('href', href, options)];
152
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.link).not.toHaveHrefEx(href, options)];
154
153
  case 1:
155
154
  _a.sent();
156
155
  return [2 /*return*/];
@@ -162,7 +161,7 @@ var LinkAssertions = /** @class */ (function (_super) {
162
161
  return __awaiter(this, void 0, void 0, function () {
163
162
  return __generator(this, function (_a) {
164
163
  switch (_a.label) {
165
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.link.rootLocator).toBeFocused(options)];
164
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.link).toBeFocusedEx(options)];
166
165
  case 1:
167
166
  _a.sent();
168
167
  return [2 /*return*/];
@@ -174,7 +173,7 @@ var LinkAssertions = /** @class */ (function (_super) {
174
173
  return __awaiter(this, void 0, void 0, function () {
175
174
  return __generator(this, function (_a) {
176
175
  switch (_a.label) {
177
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.link.rootLocator).not.toBeFocused(options)];
176
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.link).not.toBeFocusedEx(options)];
178
177
  case 1:
179
178
  _a.sent();
180
179
  return [2 /*return*/];
@@ -53,7 +53,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
53
53
  Object.defineProperty(exports, "__esModule", { value: true });
54
54
  exports.LoaderAssertions = void 0;
55
55
  var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
56
- var matchers_1 = require("../matchers");
56
+ var extensions_1 = require("../extensions");
57
57
  var LoaderAssertions = /** @class */ (function (_super) {
58
58
  __extends(LoaderAssertions, _super);
59
59
  function LoaderAssertions(loader) {
@@ -65,7 +65,7 @@ var LoaderAssertions = /** @class */ (function (_super) {
65
65
  return __awaiter(this, void 0, void 0, function () {
66
66
  return __generator(this, function (_a) {
67
67
  switch (_a.label) {
68
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.loader.rootLocator).toHaveText(text, options)];
68
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.loader).toHaveTextEx(text, options)];
69
69
  case 1:
70
70
  _a.sent();
71
71
  return [2 /*return*/];
@@ -53,7 +53,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
53
53
  Object.defineProperty(exports, "__esModule", { value: true });
54
54
  exports.MenuItemAssertations = void 0;
55
55
  var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
56
- var matchers_1 = require("../matchers");
56
+ var extensions_1 = require("../extensions");
57
57
  var MenuItemAssertations = /** @class */ (function (_super) {
58
58
  __extends(MenuItemAssertations, _super);
59
59
  function MenuItemAssertations(menu) {
@@ -65,7 +65,7 @@ var MenuItemAssertations = /** @class */ (function (_super) {
65
65
  return __awaiter(this, void 0, void 0, function () {
66
66
  return __generator(this, function (_a) {
67
67
  switch (_a.label) {
68
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.menu.rootLocator).toHaveText(text, options)];
68
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.menu).toHaveTextEx(text, options)];
69
69
  case 1:
70
70
  _a.sent();
71
71
  return [2 /*return*/];
@@ -77,7 +77,7 @@ var MenuItemAssertations = /** @class */ (function (_super) {
77
77
  return __awaiter(this, void 0, void 0, function () {
78
78
  return __generator(this, function (_a) {
79
79
  switch (_a.label) {
80
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.menu.rootLocator).not.toHaveText(text, options)];
80
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.menu).not.toHaveTextEx(text, options)];
81
81
  case 1:
82
82
  _a.sent();
83
83
  return [2 /*return*/];
@@ -89,7 +89,7 @@ var MenuItemAssertations = /** @class */ (function (_super) {
89
89
  return __awaiter(this, void 0, void 0, function () {
90
90
  return __generator(this, function (_a) {
91
91
  switch (_a.label) {
92
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.menu.rootLocator).toContainText(text, options)];
92
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.menu).toContainTextEx(text, options)];
93
93
  case 1:
94
94
  _a.sent();
95
95
  return [2 /*return*/];
@@ -101,7 +101,7 @@ var MenuItemAssertations = /** @class */ (function (_super) {
101
101
  return __awaiter(this, void 0, void 0, function () {
102
102
  return __generator(this, function (_a) {
103
103
  switch (_a.label) {
104
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.menu.rootLocator).not.toContainText(text, options)];
104
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.menu).not.toContainTextEx(text, options)];
105
105
  case 1:
106
106
  _a.sent();
107
107
  return [2 /*return*/];
@@ -52,9 +52,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
52
52
  };
53
53
  Object.defineProperty(exports, "__esModule", { value: true });
54
54
  exports.PagingAssertions = void 0;
55
- var matchers_1 = require("../matchers");
55
+ var extensions_1 = require("../extensions");
56
56
  var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
57
- var utils_1 = require("../utils");
58
57
  var PagingAssertions = /** @class */ (function (_super) {
59
58
  __extends(PagingAssertions, _super);
60
59
  function PagingAssertions(paging) {
@@ -66,7 +65,7 @@ var PagingAssertions = /** @class */ (function (_super) {
66
65
  return __awaiter(this, void 0, void 0, function () {
67
66
  return __generator(this, function (_a) {
68
67
  switch (_a.label) {
69
- case 0: return [4 /*yield*/, this.paging.expect().notToHaveAttribute(utils_1.DataVisualState.Disabled, undefined, options)];
68
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.paging).toBeEnabledEx(options)];
70
69
  case 1:
71
70
  _a.sent();
72
71
  return [2 /*return*/];
@@ -78,7 +77,7 @@ var PagingAssertions = /** @class */ (function (_super) {
78
77
  return __awaiter(this, void 0, void 0, function () {
79
78
  return __generator(this, function (_a) {
80
79
  switch (_a.label) {
81
- case 0: return [4 /*yield*/, this.paging.expect().toHaveAttribute(utils_1.DataVisualState.Disabled, undefined, options)];
80
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.paging).toBeDisabledEx(options)];
82
81
  case 1:
83
82
  _a.sent();
84
83
  return [2 /*return*/];
@@ -88,23 +87,9 @@ var PagingAssertions = /** @class */ (function (_super) {
88
87
  };
89
88
  PagingAssertions.prototype.toHavePageCount = function (count, options) {
90
89
  return __awaiter(this, void 0, void 0, function () {
91
- var _this = this;
92
90
  return __generator(this, function (_a) {
93
91
  switch (_a.label) {
94
- case 0: return [4 /*yield*/, matchers_1.mergedExpects
95
- .poll(function () { return __awaiter(_this, void 0, void 0, function () {
96
- var pageItem;
97
- return __generator(this, function (_a) {
98
- switch (_a.label) {
99
- case 0: return [4 /*yield*/, this.paging.pages.getLastItem()];
100
- case 1:
101
- pageItem = _a.sent();
102
- return [4 /*yield*/, pageItem.getNumber()];
103
- case 2: return [2 /*return*/, _a.sent()];
104
- }
105
- });
106
- }); }, options)
107
- .toEqual(count)];
92
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.paging).toHavePageCountEx(count, options)];
108
93
  case 1:
109
94
  _a.sent();
110
95
  return [2 /*return*/];
@@ -114,29 +99,9 @@ var PagingAssertions = /** @class */ (function (_super) {
114
99
  };
115
100
  PagingAssertions.prototype.toHaveActivePage = function (activePageNumber, options) {
116
101
  return __awaiter(this, void 0, void 0, function () {
117
- var _this = this;
118
102
  return __generator(this, function (_a) {
119
103
  switch (_a.label) {
120
- case 0: return [4 /*yield*/, matchers_1.mergedExpects
121
- .poll(function () { return __awaiter(_this, void 0, void 0, function () {
122
- var pageItem;
123
- var _this = this;
124
- return __generator(this, function (_a) {
125
- switch (_a.label) {
126
- case 0: return [4 /*yield*/, this.paging.pages.getFirstItemByPredicate(function (x) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
127
- switch (_a.label) {
128
- case 0: return [4 /*yield*/, x.hasAttribute(utils_1.DataVisualState.Active)];
129
- case 1: return [2 /*return*/, _a.sent()];
130
- }
131
- }); }); })];
132
- case 1:
133
- pageItem = _a.sent();
134
- return [4 /*yield*/, pageItem.getNumber()];
135
- case 2: return [2 /*return*/, _a.sent()];
136
- }
137
- });
138
- }); }, options)
139
- .toEqual(activePageNumber)];
104
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.paging).toHaveActivePageEx(activePageNumber, options)];
140
105
  case 1:
141
106
  _a.sent();
142
107
  return [2 /*return*/];
@@ -53,7 +53,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
53
53
  Object.defineProperty(exports, "__esModule", { value: true });
54
54
  exports.PortalAssertions = void 0;
55
55
  var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
56
- var matchers_1 = require("../matchers");
56
+ var extensions_1 = require("../extensions");
57
57
  var PortalAssertions = /** @class */ (function (_super) {
58
58
  __extends(PortalAssertions, _super);
59
59
  function PortalAssertions(portal) {
@@ -65,7 +65,7 @@ var PortalAssertions = /** @class */ (function (_super) {
65
65
  return __awaiter(this, void 0, void 0, function () {
66
66
  return __generator(this, function (_a) {
67
67
  switch (_a.label) {
68
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.portal.rootLocator).toHaveCount(1, options)];
68
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.portal).toBeVisibleEx(options)];
69
69
  case 1:
70
70
  _a.sent();
71
71
  return [2 /*return*/];
@@ -77,7 +77,7 @@ var PortalAssertions = /** @class */ (function (_super) {
77
77
  return __awaiter(this, void 0, void 0, function () {
78
78
  return __generator(this, function (_a) {
79
79
  switch (_a.label) {
80
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.portal.rootLocator).toHaveCount(0, options)];
80
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.portal).toBeHiddenEx(options)];
81
81
  case 1:
82
82
  _a.sent();
83
83
  return [2 /*return*/];
@@ -53,7 +53,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
53
53
  Object.defineProperty(exports, "__esModule", { value: true });
54
54
  exports.RadioAssertions = void 0;
55
55
  var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
56
- var matchers_1 = require("../matchers");
56
+ var extensions_1 = require("../extensions");
57
57
  var RadioAssertions = /** @class */ (function (_super) {
58
58
  __extends(RadioAssertions, _super);
59
59
  function RadioAssertions(radio) {
@@ -65,7 +65,7 @@ var RadioAssertions = /** @class */ (function (_super) {
65
65
  return __awaiter(this, void 0, void 0, function () {
66
66
  return __generator(this, function (_a) {
67
67
  switch (_a.label) {
68
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.radio.inputLocator).toBeEnabled(options)];
68
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radio).toBeEnabledEx(options)];
69
69
  case 1:
70
70
  _a.sent();
71
71
  return [2 /*return*/];
@@ -77,7 +77,7 @@ var RadioAssertions = /** @class */ (function (_super) {
77
77
  return __awaiter(this, void 0, void 0, function () {
78
78
  return __generator(this, function (_a) {
79
79
  switch (_a.label) {
80
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.radio.inputLocator).toBeDisabled(options)];
80
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radio).toBeDisabledEx(options)];
81
81
  case 1:
82
82
  _a.sent();
83
83
  return [2 /*return*/];
@@ -89,7 +89,7 @@ var RadioAssertions = /** @class */ (function (_super) {
89
89
  return __awaiter(this, void 0, void 0, function () {
90
90
  return __generator(this, function (_a) {
91
91
  switch (_a.label) {
92
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.radio.inputLocator).toBeChecked(options)];
92
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radio).toBeCheckedEx(options)];
93
93
  case 1:
94
94
  _a.sent();
95
95
  return [2 /*return*/];
@@ -101,7 +101,7 @@ var RadioAssertions = /** @class */ (function (_super) {
101
101
  return __awaiter(this, void 0, void 0, function () {
102
102
  return __generator(this, function (_a) {
103
103
  switch (_a.label) {
104
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.radio.inputLocator).not.toBeChecked(options)];
104
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radio).not.toBeCheckedEx(options)];
105
105
  case 1:
106
106
  _a.sent();
107
107
  return [2 /*return*/];
@@ -113,7 +113,7 @@ var RadioAssertions = /** @class */ (function (_super) {
113
113
  return __awaiter(this, void 0, void 0, function () {
114
114
  return __generator(this, function (_a) {
115
115
  switch (_a.label) {
116
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.radio.rootLocator).toHaveText(text, options)];
116
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radio).toHaveTextEx(text, options)];
117
117
  case 1:
118
118
  _a.sent();
119
119
  return [2 /*return*/];
@@ -125,7 +125,7 @@ var RadioAssertions = /** @class */ (function (_super) {
125
125
  return __awaiter(this, void 0, void 0, function () {
126
126
  return __generator(this, function (_a) {
127
127
  switch (_a.label) {
128
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.radio.rootLocator).not.toHaveText(text, options)];
128
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radio).not.toHaveTextEx(text, options)];
129
129
  case 1:
130
130
  _a.sent();
131
131
  return [2 /*return*/];
@@ -137,7 +137,7 @@ var RadioAssertions = /** @class */ (function (_super) {
137
137
  return __awaiter(this, void 0, void 0, function () {
138
138
  return __generator(this, function (_a) {
139
139
  switch (_a.label) {
140
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.radio.rootLocator).toContainText(text, options)];
140
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radio).toContainTextEx(text, options)];
141
141
  case 1:
142
142
  _a.sent();
143
143
  return [2 /*return*/];
@@ -149,7 +149,7 @@ var RadioAssertions = /** @class */ (function (_super) {
149
149
  return __awaiter(this, void 0, void 0, function () {
150
150
  return __generator(this, function (_a) {
151
151
  switch (_a.label) {
152
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.radio.rootLocator).not.toContainText(text, options)];
152
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radio).not.toContainTextEx(text, options)];
153
153
  case 1:
154
154
  _a.sent();
155
155
  return [2 /*return*/];
@@ -161,7 +161,7 @@ var RadioAssertions = /** @class */ (function (_super) {
161
161
  return __awaiter(this, void 0, void 0, function () {
162
162
  return __generator(this, function (_a) {
163
163
  switch (_a.label) {
164
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.radio.inputLocator).toHaveValue(value, options)];
164
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radio).toHaveValueEx(value, options)];
165
165
  case 1:
166
166
  _a.sent();
167
167
  return [2 /*return*/];
@@ -173,7 +173,7 @@ var RadioAssertions = /** @class */ (function (_super) {
173
173
  return __awaiter(this, void 0, void 0, function () {
174
174
  return __generator(this, function (_a) {
175
175
  switch (_a.label) {
176
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.radio.inputLocator).not.toHaveValue(value, options)];
176
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radio).not.toHaveValueEx(value, options)];
177
177
  case 1:
178
178
  _a.sent();
179
179
  return [2 /*return*/];
@@ -185,7 +185,7 @@ var RadioAssertions = /** @class */ (function (_super) {
185
185
  return __awaiter(this, void 0, void 0, function () {
186
186
  return __generator(this, function (_a) {
187
187
  switch (_a.label) {
188
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.radio.inputLocator).toBeFocused(options)];
188
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radio).toBeFocusedEx(options)];
189
189
  case 1:
190
190
  _a.sent();
191
191
  return [2 /*return*/];
@@ -197,7 +197,7 @@ var RadioAssertions = /** @class */ (function (_super) {
197
197
  return __awaiter(this, void 0, void 0, function () {
198
198
  return __generator(this, function (_a) {
199
199
  switch (_a.label) {
200
- case 0: return [4 /*yield*/, (0, matchers_1.mergedExpects)(this.radio.inputLocator).not.toBeFocused(options)];
200
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radio).not.toBeFocusedEx(options)];
201
201
  case 1:
202
202
  _a.sent();
203
203
  return [2 /*return*/];
@@ -14,17 +14,6 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
17
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
18
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
19
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -63,7 +52,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
63
52
  };
64
53
  Object.defineProperty(exports, "__esModule", { value: true });
65
54
  exports.RadioGroupAssertions = void 0;
66
- var matchers_1 = require("../matchers");
55
+ var extensions_1 = require("../extensions");
67
56
  var BaseComponentAssertions_1 = require("./BaseComponentAssertions");
68
57
  var RadioGroupAssertions = /** @class */ (function (_super) {
69
58
  __extends(RadioGroupAssertions, _super);
@@ -74,14 +63,10 @@ var RadioGroupAssertions = /** @class */ (function (_super) {
74
63
  }
75
64
  RadioGroupAssertions.prototype.toBeCheckedByValue = function (value, options) {
76
65
  return __awaiter(this, void 0, void 0, function () {
77
- var radio;
78
66
  return __generator(this, function (_a) {
79
67
  switch (_a.label) {
80
- case 0: return [4 /*yield*/, this.radioGroup.getByValue(value)];
68
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radioGroup).toBeCheckedByValueEx(value, options)];
81
69
  case 1:
82
- radio = _a.sent();
83
- return [4 /*yield*/, radio.expect().toBeChecked(options)];
84
- case 2:
85
70
  _a.sent();
86
71
  return [2 /*return*/];
87
72
  }
@@ -90,14 +75,10 @@ var RadioGroupAssertions = /** @class */ (function (_super) {
90
75
  };
91
76
  RadioGroupAssertions.prototype.toBeCheckedByIndex = function (index, options) {
92
77
  return __awaiter(this, void 0, void 0, function () {
93
- var radio;
94
78
  return __generator(this, function (_a) {
95
79
  switch (_a.label) {
96
- case 0: return [4 /*yield*/, this.radioGroup.getByIndex(index)];
80
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radioGroup).toBeCheckedByIndexEx(index, options)];
97
81
  case 1:
98
- radio = _a.sent();
99
- return [4 /*yield*/, radio.expect().toBeChecked(options)];
100
- case 2:
101
82
  _a.sent();
102
83
  return [2 /*return*/];
103
84
  }
@@ -106,14 +87,10 @@ var RadioGroupAssertions = /** @class */ (function (_super) {
106
87
  };
107
88
  RadioGroupAssertions.prototype.toBeCheckedByText = function (text, options) {
108
89
  return __awaiter(this, void 0, void 0, function () {
109
- var radio;
110
90
  return __generator(this, function (_a) {
111
91
  switch (_a.label) {
112
- case 0: return [4 /*yield*/, this.radioGroup.getByText(text)];
92
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radioGroup).toBeCheckedByTextEx(text, options)];
113
93
  case 1:
114
- radio = _a.sent();
115
- return [4 /*yield*/, radio.expect().toBeChecked(options)];
116
- case 2:
117
94
  _a.sent();
118
95
  return [2 /*return*/];
119
96
  }
@@ -122,14 +99,10 @@ var RadioGroupAssertions = /** @class */ (function (_super) {
122
99
  };
123
100
  RadioGroupAssertions.prototype.toBeUncheckedByValue = function (value, options) {
124
101
  return __awaiter(this, void 0, void 0, function () {
125
- var radio;
126
102
  return __generator(this, function (_a) {
127
103
  switch (_a.label) {
128
- case 0: return [4 /*yield*/, this.radioGroup.getByValue(value)];
104
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radioGroup).toBeUncheckedByValueEx(value, options)];
129
105
  case 1:
130
- radio = _a.sent();
131
- return [4 /*yield*/, radio.expect().toBeUnchecked(options)];
132
- case 2:
133
106
  _a.sent();
134
107
  return [2 /*return*/];
135
108
  }
@@ -138,14 +111,10 @@ var RadioGroupAssertions = /** @class */ (function (_super) {
138
111
  };
139
112
  RadioGroupAssertions.prototype.toBeUncheckedByIndex = function (index, options) {
140
113
  return __awaiter(this, void 0, void 0, function () {
141
- var radio;
142
114
  return __generator(this, function (_a) {
143
115
  switch (_a.label) {
144
- case 0: return [4 /*yield*/, this.radioGroup.getByIndex(index)];
116
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radioGroup).toBeUncheckedByIndexEx(index, options)];
145
117
  case 1:
146
- radio = _a.sent();
147
- return [4 /*yield*/, radio.expect().toBeUnchecked(options)];
148
- case 2:
149
118
  _a.sent();
150
119
  return [2 /*return*/];
151
120
  }
@@ -154,14 +123,10 @@ var RadioGroupAssertions = /** @class */ (function (_super) {
154
123
  };
155
124
  RadioGroupAssertions.prototype.toBeUncheckedByText = function (text, options) {
156
125
  return __awaiter(this, void 0, void 0, function () {
157
- var radio;
158
126
  return __generator(this, function (_a) {
159
127
  switch (_a.label) {
160
- case 0: return [4 /*yield*/, this.radioGroup.getByText(text)];
128
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radioGroup).toBeUncheckedByTextEx(text, options)];
161
129
  case 1:
162
- radio = _a.sent();
163
- return [4 /*yield*/, radio.expect().toBeUnchecked(options)];
164
- case 2:
165
130
  _a.sent();
166
131
  return [2 /*return*/];
167
132
  }
@@ -170,33 +135,10 @@ var RadioGroupAssertions = /** @class */ (function (_super) {
170
135
  };
171
136
  RadioGroupAssertions.prototype.toBeEnabled = function (options) {
172
137
  return __awaiter(this, void 0, void 0, function () {
173
- var radios;
174
- var _this = this;
175
138
  return __generator(this, function (_a) {
176
139
  switch (_a.label) {
177
- case 0: return [4 /*yield*/, this.radioGroup.getItems()];
140
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radioGroup).toBeEnabledEx(options)];
178
141
  case 1:
179
- radios = _a.sent();
180
- return [4 /*yield*/, matchers_1.mergedExpects
181
- .poll(function () { return __awaiter(_this, void 0, void 0, function () {
182
- var radioStates;
183
- var _this = this;
184
- return __generator(this, function (_a) {
185
- switch (_a.label) {
186
- case 0: return [4 /*yield*/, Promise.all(radios.map(function (radio) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
187
- switch (_a.label) {
188
- case 0: return [4 /*yield*/, radio.isDisabled()];
189
- case 1: return [2 /*return*/, !(_a.sent())];
190
- }
191
- }); }); }))];
192
- case 1:
193
- radioStates = _a.sent();
194
- return [2 /*return*/, radioStates.filter(Boolean)];
195
- }
196
- });
197
- }); }, __assign({ message: 'At least one of radio elements must be enabled' }, options))
198
- .not.toHaveLength(0)];
199
- case 2:
200
142
  _a.sent();
201
143
  return [2 /*return*/];
202
144
  }
@@ -205,25 +147,12 @@ var RadioGroupAssertions = /** @class */ (function (_super) {
205
147
  };
206
148
  RadioGroupAssertions.prototype.toBeDisabled = function (options) {
207
149
  return __awaiter(this, void 0, void 0, function () {
208
- var radios, _i, radios_1, radio;
209
150
  return __generator(this, function (_a) {
210
151
  switch (_a.label) {
211
- case 0: return [4 /*yield*/, this.radioGroup.getItems()];
152
+ case 0: return [4 /*yield*/, (0, extensions_1.expect)(this.radioGroup).toBeDisabledEx(options)];
212
153
  case 1:
213
- radios = _a.sent();
214
- _i = 0, radios_1 = radios;
215
- _a.label = 2;
216
- case 2:
217
- if (!(_i < radios_1.length)) return [3 /*break*/, 5];
218
- radio = radios_1[_i];
219
- return [4 /*yield*/, radio.expect().toBeDisabled(options)];
220
- case 3:
221
154
  _a.sent();
222
- _a.label = 4;
223
- case 4:
224
- _i++;
225
- return [3 /*break*/, 2];
226
- case 5: return [2 /*return*/];
155
+ return [2 /*return*/];
227
156
  }
228
157
  });
229
158
  });