@taiga-ui/testing 3.491.1-canary.d27927b → 4.0.0-rc.10

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 (182) hide show
  1. package/LICENSE +190 -0
  2. package/core/accordion.harness.d.ts +0 -1
  3. package/core/avatar.harness.d.ts +1 -1
  4. package/core/badge.harness.d.ts +3 -3
  5. package/core/{primitive-calender.harness.d.ts → calendar-sheet.harness.d.ts} +1 -1
  6. package/core/{primitive-year-month-pagination.harness.d.ts → calendar-spin.harness.d.ts} +1 -1
  7. package/core/{primitive-year-picker.harness.d.ts → calendar-year.harness.d.ts} +1 -1
  8. package/core/calendar.harness.d.ts +3 -3
  9. package/core/card.harness.d.ts +0 -6
  10. package/core/dialog.harness.d.ts +6 -0
  11. package/core/{hosted-dropdown.harness.d.ts → dropdown-open.harness.d.ts} +1 -1
  12. package/core/index.d.ts +6 -6
  13. package/core/island.harness.d.ts +1 -1
  14. package/core/select.harness.d.ts +1 -1
  15. package/core/{primitive-spin-button.harness.d.ts → spin-button.harness.d.ts} +1 -1
  16. package/core/tag.harness.d.ts +2 -3
  17. package/esm2022/core/accordion-item.harness.mjs +32 -0
  18. package/esm2022/core/accordion.harness.mjs +6 -0
  19. package/esm2022/core/avatar.harness.mjs +9 -0
  20. package/esm2022/core/badge.harness.mjs +15 -0
  21. package/esm2022/core/button.harness.mjs +17 -0
  22. package/esm2022/core/calendar-sheet.harness.mjs +30 -0
  23. package/esm2022/core/calendar-spin.harness.mjs +33 -0
  24. package/esm2022/core/calendar-year.harness.mjs +23 -0
  25. package/esm2022/core/calendar.harness.mjs +51 -0
  26. package/esm2022/core/card.harness.mjs +15 -0
  27. package/esm2022/core/dialog.harness.mjs +12 -0
  28. package/esm2022/core/dropdown-open.harness.mjs +13 -0
  29. package/esm2022/core/index.mjs +21 -0
  30. package/esm2022/core/island.harness.mjs +39 -0
  31. package/esm2022/core/loader.harness.mjs +20 -0
  32. package/esm2022/core/primitive-textfield.harness.mjs +12 -0
  33. package/esm2022/core/select.harness.mjs +17 -0
  34. package/esm2022/core/spin-button.harness.mjs +13 -0
  35. package/esm2022/core/svg.harness.mjs +18 -0
  36. package/esm2022/core/tag.harness.mjs +26 -0
  37. package/esm2022/core/textfield.harness.mjs +9 -0
  38. package/esm2022/mocks/event.mjs +14 -0
  39. package/{esm2015/mocks/index.js → esm2022/mocks/index.mjs} +1 -2
  40. package/esm2022/setup-jest/index.mjs +119 -0
  41. package/esm2022/utils/active-element.mjs +12 -0
  42. package/esm2022/utils/configure-test-suite.mjs +32 -0
  43. package/esm2022/utils/date.mjs +18 -0
  44. package/esm2022/utils/helpers.mjs +34 -0
  45. package/esm2022/utils/input/cleaner.unit-common.mjs +79 -0
  46. package/esm2022/utils/input/filler.unit-common.mjs +48 -0
  47. package/esm2022/utils/input/form-control-state.unit-common.mjs +36 -0
  48. package/{esm2015/utils/input/placeholder.unit-common.js → esm2022/utils/input/placeholder.unit-common.mjs} +17 -17
  49. package/esm2022/utils/input/tooltip.unit-common.mjs +46 -0
  50. package/esm2022/utils/keyboard-event.mjs +9 -0
  51. package/esm2022/utils/native-input.page-object.mjs +53 -0
  52. package/esm2022/utils/page-object.mjs +25 -0
  53. package/esm2022/utils/replace-nbsp.mjs +5 -0
  54. package/{esm2015/utils/viewport.js → esm2022/utils/viewport.mjs} +5 -5
  55. package/fesm2022/taiga-ui-testing-core.mjs +365 -0
  56. package/fesm2022/taiga-ui-testing-core.mjs.map +1 -0
  57. package/{fesm2015/taiga-ui-testing-exceptions.js → fesm2022/taiga-ui-testing-exceptions.mjs} +1 -1
  58. package/fesm2022/taiga-ui-testing-exceptions.mjs.map +1 -0
  59. package/fesm2022/taiga-ui-testing-mocks.mjs +26 -0
  60. package/fesm2022/taiga-ui-testing-mocks.mjs.map +1 -0
  61. package/{fesm2015/taiga-ui-testing-setup-jest.js → fesm2022/taiga-ui-testing-setup-jest.mjs} +24 -24
  62. package/fesm2022/taiga-ui-testing-setup-jest.mjs.map +1 -0
  63. package/{fesm2015/taiga-ui-testing-utils.js → fesm2022/taiga-ui-testing-utils.mjs} +95 -105
  64. package/fesm2022/taiga-ui-testing-utils.mjs.map +1 -0
  65. package/{fesm2015/taiga-ui-testing.js → fesm2022/taiga-ui-testing.mjs} +1 -1
  66. package/fesm2022/taiga-ui-testing.mjs.map +1 -0
  67. package/mocks/index.d.ts +0 -1
  68. package/package.json +49 -13
  69. package/utils/active-element.d.ts +1 -1
  70. package/utils/configure-test-suite.d.ts +2 -1
  71. package/utils/helpers.d.ts +2 -1
  72. package/utils/input/cleaner.unit-common.d.ts +6 -6
  73. package/utils/input/filler.unit-common.d.ts +6 -6
  74. package/utils/input/form-control-state.unit-common.d.ts +5 -5
  75. package/utils/input/placeholder.unit-common.d.ts +5 -5
  76. package/utils/input/tooltip.unit-common.d.ts +5 -5
  77. package/utils/native-input.page-object.d.ts +4 -5
  78. package/utils/page-object.d.ts +2 -2
  79. package/bundles/taiga-ui-testing-core.umd.js +0 -1388
  80. package/bundles/taiga-ui-testing-core.umd.js.map +0 -1
  81. package/bundles/taiga-ui-testing-cypress.umd.js +0 -484
  82. package/bundles/taiga-ui-testing-cypress.umd.js.map +0 -1
  83. package/bundles/taiga-ui-testing-exceptions.umd.js +0 -351
  84. package/bundles/taiga-ui-testing-exceptions.umd.js.map +0 -1
  85. package/bundles/taiga-ui-testing-mocks.umd.js +0 -369
  86. package/bundles/taiga-ui-testing-mocks.umd.js.map +0 -1
  87. package/bundles/taiga-ui-testing-setup-jest.umd.js +0 -135
  88. package/bundles/taiga-ui-testing-setup-jest.umd.js.map +0 -1
  89. package/bundles/taiga-ui-testing-utils.umd.js +0 -933
  90. package/bundles/taiga-ui-testing-utils.umd.js.map +0 -1
  91. package/bundles/taiga-ui-testing.umd.js +0 -46
  92. package/bundles/taiga-ui-testing.umd.js.map +0 -1
  93. package/core/action.harness.d.ts +0 -7
  94. package/core/marker-icon.harness.d.ts +0 -4
  95. package/core/package.json +0 -10
  96. package/core/taiga-ui-testing-core.d.ts +0 -5
  97. package/core/toggle.harness.d.ts +0 -8
  98. package/cypress/assertions/be-in-viewport.d.ts +0 -14
  99. package/cypress/assertions/index.d.ts +0 -1
  100. package/cypress/commands/wait-all-img-inside.command.d.ts +0 -2
  101. package/cypress/index.d.ts +0 -4
  102. package/cypress/package.json +0 -10
  103. package/cypress/snapshot/command.d.ts +0 -16
  104. package/cypress/snapshot/plugin.d.ts +0 -9
  105. package/cypress/taiga-ui-testing-cypress.d.ts +0 -5
  106. package/esm2015/core/accordion-item.harness.js +0 -49
  107. package/esm2015/core/accordion.harness.js +0 -11
  108. package/esm2015/core/action.harness.js +0 -16
  109. package/esm2015/core/avatar.harness.js +0 -11
  110. package/esm2015/core/badge.harness.js +0 -21
  111. package/esm2015/core/button.harness.js +0 -21
  112. package/esm2015/core/calendar.harness.js +0 -84
  113. package/esm2015/core/card.harness.js +0 -25
  114. package/esm2015/core/hosted-dropdown.harness.js +0 -17
  115. package/esm2015/core/index.js +0 -21
  116. package/esm2015/core/island.harness.js +0 -53
  117. package/esm2015/core/loader.harness.js +0 -25
  118. package/esm2015/core/marker-icon.harness.js +0 -5
  119. package/esm2015/core/primitive-calender.harness.js +0 -40
  120. package/esm2015/core/primitive-spin-button.harness.js +0 -17
  121. package/esm2015/core/primitive-textfield.harness.js +0 -16
  122. package/esm2015/core/primitive-year-month-pagination.harness.js +0 -49
  123. package/esm2015/core/primitive-year-picker.harness.js +0 -29
  124. package/esm2015/core/select.harness.js +0 -21
  125. package/esm2015/core/svg.harness.js +0 -27
  126. package/esm2015/core/tag.harness.js +0 -39
  127. package/esm2015/core/textfield.harness.js +0 -11
  128. package/esm2015/core/toggle.harness.js +0 -21
  129. package/esm2015/cypress/assertions/be-in-viewport.js +0 -28
  130. package/esm2015/cypress/assertions/index.js +0 -2
  131. package/esm2015/cypress/commands/wait-all-img-inside.command.js +0 -62
  132. package/esm2015/cypress/index.js +0 -5
  133. package/esm2015/cypress/snapshot/command.js +0 -25
  134. package/esm2015/cypress/snapshot/plugin.js +0 -26
  135. package/esm2015/cypress/taiga-ui-testing-cypress.js +0 -5
  136. package/esm2015/mocks/event.js +0 -12
  137. package/esm2015/mocks/sanitizer.js +0 -13
  138. package/esm2015/setup-jest/index.js +0 -119
  139. package/esm2015/utils/active-element.js +0 -14
  140. package/esm2015/utils/configure-test-suite.js +0 -32
  141. package/esm2015/utils/date.js +0 -18
  142. package/esm2015/utils/helpers.js +0 -36
  143. package/esm2015/utils/input/cleaner.unit-common.js +0 -79
  144. package/esm2015/utils/input/filler.unit-common.js +0 -50
  145. package/esm2015/utils/input/form-control-state.unit-common.js +0 -37
  146. package/esm2015/utils/input/tooltip.unit-common.js +0 -46
  147. package/esm2015/utils/keyboard-event.js +0 -9
  148. package/esm2015/utils/native-input.page-object.js +0 -58
  149. package/esm2015/utils/page-object.js +0 -25
  150. package/esm2015/utils/replace-nbsp.js +0 -6
  151. package/exceptions/package.json +0 -10
  152. package/exceptions/taiga-ui-testing-exceptions.d.ts +0 -5
  153. package/fesm2015/taiga-ui-testing-core.js +0 -557
  154. package/fesm2015/taiga-ui-testing-core.js.map +0 -1
  155. package/fesm2015/taiga-ui-testing-cypress.js +0 -145
  156. package/fesm2015/taiga-ui-testing-cypress.js.map +0 -1
  157. package/fesm2015/taiga-ui-testing-exceptions.js.map +0 -1
  158. package/fesm2015/taiga-ui-testing-mocks.js +0 -38
  159. package/fesm2015/taiga-ui-testing-mocks.js.map +0 -1
  160. package/fesm2015/taiga-ui-testing-setup-jest.js.map +0 -1
  161. package/fesm2015/taiga-ui-testing-utils.js.map +0 -1
  162. package/fesm2015/taiga-ui-testing.js.map +0 -1
  163. package/mocks/package.json +0 -10
  164. package/mocks/sanitizer.d.ts +0 -7
  165. package/mocks/taiga-ui-testing-mocks.d.ts +0 -5
  166. package/setup-jest/package.json +0 -10
  167. package/setup-jest/taiga-ui-testing-setup-jest.d.ts +0 -5
  168. package/taiga-ui-testing.d.ts +0 -5
  169. package/utils/package.json +0 -10
  170. package/utils/taiga-ui-testing-utils.d.ts +0 -5
  171. /package/{esm2015/core/taiga-ui-testing-core.js → esm2022/core/taiga-ui-testing-core.mjs} +0 -0
  172. /package/{esm2015/exceptions/element-is-not-input.exception.js → esm2022/exceptions/element-is-not-input.exception.mjs} +0 -0
  173. /package/{esm2015/exceptions/field-not-found.exception.js → esm2022/exceptions/field-not-found.exception.mjs} +0 -0
  174. /package/{esm2015/exceptions/index.js → esm2022/exceptions/index.mjs} +0 -0
  175. /package/{esm2015/exceptions/taiga-ui-testing-exceptions.js → esm2022/exceptions/taiga-ui-testing-exceptions.mjs} +0 -0
  176. /package/{esm2015/index.js → esm2022/index.mjs} +0 -0
  177. /package/{esm2015/mocks/switch-ng-dev-mode.js → esm2022/mocks/switch-ng-dev-mode.mjs} +0 -0
  178. /package/{esm2015/mocks/taiga-ui-testing-mocks.js → esm2022/mocks/taiga-ui-testing-mocks.mjs} +0 -0
  179. /package/{esm2015/setup-jest/taiga-ui-testing-setup-jest.js → esm2022/setup-jest/taiga-ui-testing-setup-jest.mjs} +0 -0
  180. /package/{esm2015/taiga-ui-testing.js → esm2022/taiga-ui-testing.mjs} +0 -0
  181. /package/{esm2015/utils/index.js → esm2022/utils/index.mjs} +0 -0
  182. /package/{esm2015/utils/taiga-ui-testing-utils.js → esm2022/utils/taiga-ui-testing-utils.mjs} +0 -0
@@ -1,933 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core/testing'), require('@taiga-ui/cdk'), require('@angular/cdk/testing')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/testing/utils', ['exports', '@angular/core/testing', '@taiga-ui/cdk', '@angular/cdk/testing'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].testing = global["taiga-ui"].testing || {}, global["taiga-ui"].testing.utils = {}), global.ng.core.testing, global.cdk, global.ng.cdk.testing));
5
- })(this, (function (exports, testing, cdk, testing$1) { 'use strict';
6
-
7
- function tuiCreateKeyboardEvent(key, eventType) {
8
- if (eventType === void 0) { eventType = "keydown"; }
9
- var event = new KeyboardEvent(eventType, { bubbles: true });
10
- delete event.target;
11
- Object.defineProperty(event, "type", { value: eventType });
12
- delete event.key;
13
- Object.defineProperty(event, "key", { value: key });
14
- return event;
15
- }
16
-
17
- function tuiDispatchOnActive(key, fixture) {
18
- var _a;
19
- (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.dispatchEvent(tuiCreateKeyboardEvent(key, "keydown"));
20
- fixture === null || fixture === void 0 ? void 0 : fixture.detectChanges();
21
- }
22
- function tuiActiveText() {
23
- var _a, _b, _c;
24
- return (_c = (_b = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim()) !== null && _c !== void 0 ? _c : "";
25
- }
26
- function tuiIsActive(element) {
27
- return document.activeElement === element;
28
- }
29
-
30
- /*! *****************************************************************************
31
- Copyright (c) Microsoft Corporation.
32
-
33
- Permission to use, copy, modify, and/or distribute this software for any
34
- purpose with or without fee is hereby granted.
35
-
36
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
37
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
38
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
39
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
40
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
41
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
42
- PERFORMANCE OF THIS SOFTWARE.
43
- ***************************************************************************** */
44
- /* global Reflect, Promise */
45
- var extendStatics = function (d, b) {
46
- extendStatics = Object.setPrototypeOf ||
47
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
48
- function (d, b) { for (var p in b)
49
- if (Object.prototype.hasOwnProperty.call(b, p))
50
- d[p] = b[p]; };
51
- return extendStatics(d, b);
52
- };
53
- function __extends(d, b) {
54
- if (typeof b !== "function" && b !== null)
55
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
56
- extendStatics(d, b);
57
- function __() { this.constructor = d; }
58
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
59
- }
60
- var __assign = function () {
61
- __assign = Object.assign || function __assign(t) {
62
- for (var s, i = 1, n = arguments.length; i < n; i++) {
63
- s = arguments[i];
64
- for (var p in s)
65
- if (Object.prototype.hasOwnProperty.call(s, p))
66
- t[p] = s[p];
67
- }
68
- return t;
69
- };
70
- return __assign.apply(this, arguments);
71
- };
72
- function __rest(s, e) {
73
- var t = {};
74
- for (var p in s)
75
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
76
- t[p] = s[p];
77
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
78
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
79
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
80
- t[p[i]] = s[p[i]];
81
- }
82
- return t;
83
- }
84
- function __decorate(decorators, target, key, desc) {
85
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
86
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
87
- r = Reflect.decorate(decorators, target, key, desc);
88
- else
89
- for (var i = decorators.length - 1; i >= 0; i--)
90
- if (d = decorators[i])
91
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
92
- return c > 3 && r && Object.defineProperty(target, key, r), r;
93
- }
94
- function __param(paramIndex, decorator) {
95
- return function (target, key) { decorator(target, key, paramIndex); };
96
- }
97
- function __metadata(metadataKey, metadataValue) {
98
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
99
- return Reflect.metadata(metadataKey, metadataValue);
100
- }
101
- function __awaiter(thisArg, _arguments, P, generator) {
102
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
103
- return new (P || (P = Promise))(function (resolve, reject) {
104
- function fulfilled(value) { try {
105
- step(generator.next(value));
106
- }
107
- catch (e) {
108
- reject(e);
109
- } }
110
- function rejected(value) { try {
111
- step(generator["throw"](value));
112
- }
113
- catch (e) {
114
- reject(e);
115
- } }
116
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
117
- step((generator = generator.apply(thisArg, _arguments || [])).next());
118
- });
119
- }
120
- function __generator(thisArg, body) {
121
- var _ = { label: 0, sent: function () { if (t[0] & 1)
122
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
123
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
124
- function verb(n) { return function (v) { return step([n, v]); }; }
125
- function step(op) {
126
- if (f)
127
- throw new TypeError("Generator is already executing.");
128
- while (_)
129
- try {
130
- 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)
131
- return t;
132
- if (y = 0, t)
133
- op = [op[0] & 2, t.value];
134
- switch (op[0]) {
135
- case 0:
136
- case 1:
137
- t = op;
138
- break;
139
- case 4:
140
- _.label++;
141
- return { value: op[1], done: false };
142
- case 5:
143
- _.label++;
144
- y = op[1];
145
- op = [0];
146
- continue;
147
- case 7:
148
- op = _.ops.pop();
149
- _.trys.pop();
150
- continue;
151
- default:
152
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
153
- _ = 0;
154
- continue;
155
- }
156
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
157
- _.label = op[1];
158
- break;
159
- }
160
- if (op[0] === 6 && _.label < t[1]) {
161
- _.label = t[1];
162
- t = op;
163
- break;
164
- }
165
- if (t && _.label < t[2]) {
166
- _.label = t[2];
167
- _.ops.push(op);
168
- break;
169
- }
170
- if (t[2])
171
- _.ops.pop();
172
- _.trys.pop();
173
- continue;
174
- }
175
- op = body.call(thisArg, _);
176
- }
177
- catch (e) {
178
- op = [6, e];
179
- y = 0;
180
- }
181
- finally {
182
- f = t = 0;
183
- }
184
- if (op[0] & 5)
185
- throw op[1];
186
- return { value: op[0] ? op[1] : void 0, done: true };
187
- }
188
- }
189
- var __createBinding = Object.create ? (function (o, m, k, k2) {
190
- if (k2 === undefined)
191
- k2 = k;
192
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
193
- }) : (function (o, m, k, k2) {
194
- if (k2 === undefined)
195
- k2 = k;
196
- o[k2] = m[k];
197
- });
198
- function __exportStar(m, o) {
199
- for (var p in m)
200
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
201
- __createBinding(o, m, p);
202
- }
203
- function __values(o) {
204
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
205
- if (m)
206
- return m.call(o);
207
- if (o && typeof o.length === "number")
208
- return {
209
- next: function () {
210
- if (o && i >= o.length)
211
- o = void 0;
212
- return { value: o && o[i++], done: !o };
213
- }
214
- };
215
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
216
- }
217
- function __read(o, n) {
218
- var m = typeof Symbol === "function" && o[Symbol.iterator];
219
- if (!m)
220
- return o;
221
- var i = m.call(o), r, ar = [], e;
222
- try {
223
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
224
- ar.push(r.value);
225
- }
226
- catch (error) {
227
- e = { error: error };
228
- }
229
- finally {
230
- try {
231
- if (r && !r.done && (m = i["return"]))
232
- m.call(i);
233
- }
234
- finally {
235
- if (e)
236
- throw e.error;
237
- }
238
- }
239
- return ar;
240
- }
241
- /** @deprecated */
242
- function __spread() {
243
- for (var ar = [], i = 0; i < arguments.length; i++)
244
- ar = ar.concat(__read(arguments[i]));
245
- return ar;
246
- }
247
- /** @deprecated */
248
- function __spreadArrays() {
249
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
250
- s += arguments[i].length;
251
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
252
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
253
- r[k] = a[j];
254
- return r;
255
- }
256
- function __spreadArray(to, from, pack) {
257
- if (pack || arguments.length === 2)
258
- for (var i = 0, l = from.length, ar; i < l; i++) {
259
- if (ar || !(i in from)) {
260
- if (!ar)
261
- ar = Array.prototype.slice.call(from, 0, i);
262
- ar[i] = from[i];
263
- }
264
- }
265
- return to.concat(ar || from);
266
- }
267
- function __await(v) {
268
- return this instanceof __await ? (this.v = v, this) : new __await(v);
269
- }
270
- function __asyncGenerator(thisArg, _arguments, generator) {
271
- if (!Symbol.asyncIterator)
272
- throw new TypeError("Symbol.asyncIterator is not defined.");
273
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
274
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
275
- function verb(n) { if (g[n])
276
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
277
- function resume(n, v) { try {
278
- step(g[n](v));
279
- }
280
- catch (e) {
281
- settle(q[0][3], e);
282
- } }
283
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
284
- function fulfill(value) { resume("next", value); }
285
- function reject(value) { resume("throw", value); }
286
- function settle(f, v) { if (f(v), q.shift(), q.length)
287
- resume(q[0][0], q[0][1]); }
288
- }
289
- function __asyncDelegator(o) {
290
- var i, p;
291
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
292
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
293
- }
294
- function __asyncValues(o) {
295
- if (!Symbol.asyncIterator)
296
- throw new TypeError("Symbol.asyncIterator is not defined.");
297
- var m = o[Symbol.asyncIterator], i;
298
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
299
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
300
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
301
- }
302
- function __makeTemplateObject(cooked, raw) {
303
- if (Object.defineProperty) {
304
- Object.defineProperty(cooked, "raw", { value: raw });
305
- }
306
- else {
307
- cooked.raw = raw;
308
- }
309
- return cooked;
310
- }
311
- ;
312
- var __setModuleDefault = Object.create ? (function (o, v) {
313
- Object.defineProperty(o, "default", { enumerable: true, value: v });
314
- }) : function (o, v) {
315
- o["default"] = v;
316
- };
317
- function __importStar(mod) {
318
- if (mod && mod.__esModule)
319
- return mod;
320
- var result = {};
321
- if (mod != null)
322
- for (var k in mod)
323
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
324
- __createBinding(result, mod, k);
325
- __setModuleDefault(result, mod);
326
- return result;
327
- }
328
- function __importDefault(mod) {
329
- return (mod && mod.__esModule) ? mod : { default: mod };
330
- }
331
- function __classPrivateFieldGet(receiver, state, kind, f) {
332
- if (kind === "a" && !f)
333
- throw new TypeError("Private accessor was defined without a getter");
334
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
335
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
336
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
337
- }
338
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
339
- if (kind === "m")
340
- throw new TypeError("Private method is not writable");
341
- if (kind === "a" && !f)
342
- throw new TypeError("Private accessor was defined without a setter");
343
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
344
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
345
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
346
- }
347
-
348
- var configureTestSuite = function (configureModule) {
349
- var testBedApi = testing.getTestBed();
350
- var originReset = testing.TestBed.resetTestingModule;
351
- beforeAll(function () {
352
- testing.TestBed.resetTestingModule();
353
- testing.TestBed.resetTestingModule = function () { return testing.TestBed; };
354
- });
355
- // Custom hook
356
- if (configureModule) {
357
- beforeAll(function () { return __awaiter(void 0, void 0, void 0, function () {
358
- return __generator(this, function (_a) {
359
- switch (_a.label) {
360
- case 0:
361
- configureModule();
362
- return [4 /*yield*/, testing.TestBed.compileComponents()];
363
- case 1:
364
- _a.sent();
365
- return [2 /*return*/];
366
- }
367
- });
368
- }); });
369
- }
370
- afterEach(function () {
371
- // @ts-ignore
372
- testBedApi._activeFixtures.forEach(function (fixture) { return fixture.destroy(); });
373
- // reset ViewEngine TestBed
374
- // @ts-ignore
375
- testBedApi._instantiated = false;
376
- // reset Ivy TestBed
377
- // @ts-ignore
378
- testBedApi._testModuleRef = null;
379
- });
380
- afterAll(function () {
381
- testing.TestBed.resetTestingModule = originReset;
382
- testing.TestBed.resetTestingModule();
383
- });
384
- };
385
-
386
- var OriginalDate = global.Date;
387
- function tuiMockCurrentDate(dateOrNumber) {
388
- var date = cdk.tuiIsNumber(dateOrNumber)
389
- ? new OriginalDate(dateOrNumber)
390
- : dateOrNumber;
391
- var MockDate = /** @class */ (function (_super) {
392
- __extends(MockDate, _super);
393
- function MockDate() {
394
- var _this = _super.call(this) || this;
395
- return date;
396
- }
397
- return MockDate;
398
- }(OriginalDate));
399
- global.Date = MockDate;
400
- }
401
- function tuiRestoreRealDate() {
402
- global.Date = OriginalDate;
403
- }
404
-
405
- /**
406
- * Decorator to add default static 'with' method.
407
- * Use in conjunction with {@link tuiHarnessWith} mixin.
408
- */
409
- function tuiWithPredicate(original) {
410
- original.with = function (options) {
411
- if (options === void 0) { options = {}; }
412
- return new testing$1.HarnessPredicate(original, options);
413
- };
414
- return original;
415
- }
416
- /**
417
- * Mixin to extend {@link ComponentHarness} and add typed
418
- * static 'with' method. Use {@link tuiWithPredicate} decorator
419
- * to monkey-patch default static 'with' method.
420
- */
421
- function tuiHarnessWith(hostSelector) {
422
- var _a;
423
- return _a = /** @class */ (function (_super) {
424
- __extends(_a, _super);
425
- function _a() {
426
- return _super !== null && _super.apply(this, arguments) || this;
427
- }
428
- // @ts-ignore
429
- _a.with = function (_options) {
430
- if (_options === void 0) { _options = {}; }
431
- throw new Error("Hummus");
432
- };
433
- return _a;
434
- }(testing$1.ComponentHarness)),
435
- _a.hostSelector = hostSelector,
436
- _a;
437
- }
438
- var TuiComponentHarness = /** @class */ (function (_super) {
439
- __extends(TuiComponentHarness, _super);
440
- function TuiComponentHarness() {
441
- return _super !== null && _super.apply(this, arguments) || this;
442
- }
443
- TuiComponentHarness.with = function (options) {
444
- return new testing$1.HarnessPredicate(this, options);
445
- };
446
- return TuiComponentHarness;
447
- }(testing$1.ComponentHarness));
448
- var TuiContentContainerComponentHarness = /** @class */ (function (_super) {
449
- __extends(TuiContentContainerComponentHarness, _super);
450
- function TuiContentContainerComponentHarness() {
451
- return _super !== null && _super.apply(this, arguments) || this;
452
- }
453
- TuiContentContainerComponentHarness.with = function (options) {
454
- return new testing$1.HarnessPredicate(this, options);
455
- };
456
- return TuiContentContainerComponentHarness;
457
- }(testing$1.ContentContainerComponentHarness));
458
-
459
- /// <reference types="jasmine" />
460
- function tuiTestCleaner(context, setValue, clearValue) {
461
- if (setValue === void 0) { setValue = "value"; }
462
- if (clearValue === void 0) { clearValue = null; }
463
- var pageObject;
464
- var fixture;
465
- var testComponent;
466
- var inputPO;
467
- describe("Cross for field cleaning", function () {
468
- beforeEach(function () {
469
- pageObject = context.pageObject;
470
- fixture = context.fixture;
471
- testComponent = context.testComponent;
472
- inputPO = context.inputPO;
473
- fixture.autoDetectChanges();
474
- });
475
- describe("Cross included", function () {
476
- beforeEach(function () {
477
- testComponent.cleaner = true;
478
- });
479
- it("If no value is specified, the cross is not shown", function () {
480
- updateValue(clearValue);
481
- fixture.detectChanges();
482
- expect(getCleaner()).toBeNull();
483
- });
484
- it("If the field is readonly, the cross is not shown", function () {
485
- updateValue(setValue);
486
- testComponent.readOnly = true;
487
- fixture.detectChanges();
488
- expect(getCleaner()).toBeNull();
489
- });
490
- it("If the field is disabled, the cross is not shown", function () {
491
- updateValue(setValue);
492
- if (testComponent.control) {
493
- testComponent.control.disable();
494
- }
495
- testComponent.disabled = true;
496
- fixture.detectChanges();
497
- expect(getCleaner()).toBeNull();
498
- });
499
- it("If a value is specified, a cross is shown", function () {
500
- updateValue(setValue);
501
- fixture.detectChanges();
502
- expect(getCleaner()).not.toBeNull();
503
- });
504
- it("When you click on the cross, the field value is cleared", function () {
505
- updateValue(setValue);
506
- fixture.detectChanges();
507
- getCleaner().nativeElement.click();
508
- fixture.detectChanges();
509
- expect(inputPO.value).toBe("");
510
- if (testComponent.control !== undefined) {
511
- expect(testComponent.control.value).toEqual(clearValue);
512
- }
513
- if (testComponent.value !== undefined) {
514
- expect(testComponent.value).toEqual(clearValue);
515
- }
516
- });
517
- });
518
- describe("Cross disabled", function () {
519
- it("The value is set, the cross is not shown", function () {
520
- updateValue(setValue);
521
- testComponent.cleaner = false;
522
- fixture.detectChanges();
523
- expect(getCleaner()).toBeNull();
524
- });
525
- });
526
- });
527
- function updateValue(value) {
528
- if (testComponent.control) {
529
- testComponent.control.setValue(value);
530
- }
531
- else {
532
- testComponent.value = value;
533
- }
534
- }
535
- function getCleaner() {
536
- return pageObject.getByAutomationId(context.prefix + "cleaner");
537
- }
538
- }
539
-
540
- function tuiTestFiller(context, setValue, clearValue) {
541
- var _this = this;
542
- if (setValue === void 0) { setValue = "value"; }
543
- if (clearValue === void 0) { clearValue = null; }
544
- var pageObject;
545
- var fixture;
546
- var testComponent;
547
- var inputPO;
548
- describe("Filler (mask)", function () {
549
- beforeEach(function () {
550
- pageObject = context.pageObject;
551
- fixture = context.fixture;
552
- testComponent = context.testComponent;
553
- inputPO = context.inputPO;
554
- fixture.detectChanges();
555
- });
556
- describe("if there is no value in the field", function () {
557
- beforeEach(function () {
558
- testComponent.control.setValue(clearValue);
559
- fixture.detectChanges();
560
- });
561
- it("not visible", function () {
562
- expect(getFiller()).toBeNull();
563
- });
564
- it("when focusing appears", function () { return __awaiter(_this, void 0, void 0, function () {
565
- return __generator(this, function (_b) {
566
- switch (_b.label) {
567
- case 0:
568
- inputPO.focus();
569
- fixture.detectChanges();
570
- return [4 /*yield*/, fixture.whenStable()];
571
- case 1:
572
- _b.sent();
573
- expect(getFiller()).not.toBeNull();
574
- return [2 /*return*/];
575
- }
576
- });
577
- }); });
578
- });
579
- describe("if the field has a value", function () {
580
- beforeEach(function () {
581
- testComponent.control.setValue(setValue);
582
- fixture.detectChanges();
583
- });
584
- it("not visible", function () {
585
- expect(getFiller()).toBeNull();
586
- });
587
- it("also not visible when focusing", function () {
588
- var _a;
589
- (_a = inputPO.nativeElement) === null || _a === void 0 ? void 0 : _a.focus();
590
- fixture.detectChanges();
591
- expect(getFiller()).toBeNull();
592
- });
593
- });
594
- });
595
- function getFiller() {
596
- return pageObject.getByAutomationId(context.prefix + "filler");
597
- }
598
- }
599
-
600
- function tuiTestFormControlState(context) {
601
- var _this = this;
602
- var fixture;
603
- var testComponent;
604
- var inputPO;
605
- describe("FormControl state", function () {
606
- beforeEach(function () {
607
- fixture = context.fixture;
608
- testComponent = context.testComponent;
609
- inputPO = context.inputPO;
610
- fixture.detectChanges();
611
- });
612
- it("After initializing control dirty === false", function () {
613
- expect(testComponent.control.dirty).toBe(false);
614
- });
615
- it("After control initialization touched === false", function () {
616
- expect(testComponent.control.touched).toBe(false);
617
- });
618
- it("After setting value from outside dirty === false", function () {
619
- testComponent.control.setValue("123");
620
- fixture.detectChanges();
621
- expect(testComponent.control.dirty).toBe(false);
622
- });
623
- it("After entering the value dirty === true", function () {
624
- inputPO.sendText("123");
625
- expect(testComponent.control.dirty).toBe(true);
626
- });
627
- it("After setting and de-focusing touched === true", function () { return __awaiter(_this, void 0, void 0, function () {
628
- return __generator(this, function (_a) {
629
- switch (_a.label) {
630
- case 0:
631
- inputPO.focus();
632
- inputPO.blur();
633
- return [4 /*yield*/, fixture.whenStable()];
634
- case 1:
635
- _a.sent();
636
- fixture.detectChanges();
637
- expect(testComponent.control.touched).toBe(true);
638
- return [2 /*return*/];
639
- }
640
- });
641
- }); });
642
- });
643
- }
644
-
645
- function tuiTestPlaceholder(context, setValue, clearValue) {
646
- if (setValue === void 0) { setValue = "value"; }
647
- if (clearValue === void 0) { clearValue = ""; }
648
- var pageObject;
649
- var fixture;
650
- var testComponent;
651
- describe("Placeholder", function () {
652
- beforeEach(function () {
653
- pageObject = context.pageObject;
654
- fixture = context.fixture;
655
- testComponent = context.testComponent;
656
- fixture.autoDetectChanges();
657
- });
658
- describe("in size S", function () {
659
- beforeEach(function () {
660
- testComponent.size = "s";
661
- fixture.detectChanges();
662
- });
663
- it("if no value, then shown", function () {
664
- updateValue(clearValue);
665
- fixture.detectChanges();
666
- expect(getPlaceholder()).not.toBeNull();
667
- });
668
- it("if specified, not shown", function () {
669
- updateValue(setValue);
670
- fixture.detectChanges();
671
- expect(getPlaceholder()).toBeNull();
672
- });
673
- });
674
- describe("in size M", function () {
675
- beforeEach(function () {
676
- testComponent.size = "m";
677
- fixture.detectChanges();
678
- });
679
- it("if no value, then shown", function () {
680
- updateValue(clearValue);
681
- fixture.detectChanges();
682
- expect(getPlaceholder()).not.toBeNull();
683
- });
684
- it("if a value is given, then", function () {
685
- updateValue(setValue);
686
- testComponent.labelOutside = false;
687
- fixture.detectChanges();
688
- expect(getPlaceholder()).not.toBeNull();
689
- });
690
- it("if value is given but label is outside, then not shown", function () {
691
- updateValue(setValue);
692
- testComponent.labelOutside = true;
693
- fixture.detectChanges();
694
- expect(getPlaceholder()).toBeNull();
695
- });
696
- });
697
- describe("in size L", function () {
698
- beforeEach(function () {
699
- testComponent.size = "l";
700
- fixture.detectChanges();
701
- });
702
- it("if no value, then shown", function () {
703
- updateValue(clearValue);
704
- fixture.detectChanges();
705
- expect(getPlaceholder()).not.toBeNull();
706
- });
707
- it("if a value is given, then", function () {
708
- updateValue(setValue);
709
- testComponent.labelOutside = false;
710
- fixture.detectChanges();
711
- expect(getPlaceholder()).not.toBeNull();
712
- });
713
- it("if value is given but label is outside, then not shown", function () {
714
- updateValue(setValue);
715
- testComponent.labelOutside = true;
716
- fixture.detectChanges();
717
- expect(getPlaceholder()).toBeNull();
718
- });
719
- });
720
- });
721
- function updateValue(value) {
722
- if (testComponent.control) {
723
- testComponent.control.setValue(value);
724
- }
725
- else {
726
- testComponent.value = value;
727
- }
728
- }
729
- function getPlaceholder() {
730
- return pageObject.getByAutomationId(context.prefix + "placeholder");
731
- }
732
- }
733
-
734
- function tuiTestTooltip(context) {
735
- var pageObject;
736
- var fixture;
737
- var testComponent;
738
- describe("Tooltip in a field", function () {
739
- beforeEach(function () {
740
- pageObject = context.pageObject;
741
- fixture = context.fixture;
742
- testComponent = context.testComponent;
743
- fixture.autoDetectChanges();
744
- });
745
- describe("There is tooltip content", function () {
746
- it("if field is disabled, there is no tooltip", function () {
747
- testComponent.disabled = true;
748
- if (testComponent.control) {
749
- testComponent.control.disable();
750
- }
751
- fixture.detectChanges();
752
- expect(getTooltip()).toBeNull();
753
- });
754
- it("if field is not disabled, there is tooltip", function () {
755
- fixture.detectChanges();
756
- expect(getTooltip()).not.toBeNull();
757
- });
758
- it("if field is readonly, there is tooltip", function () {
759
- testComponent.readOnly = true;
760
- fixture.detectChanges();
761
- expect(getTooltip()).not.toBeNull();
762
- });
763
- });
764
- describe("There is no tooltip content", function () {
765
- beforeEach(function () {
766
- testComponent.hintContent = null;
767
- fixture.detectChanges();
768
- });
769
- it("tooltip without content is hidden", function () {
770
- fixture.detectChanges();
771
- expect(getTooltip()).toBeNull();
772
- });
773
- });
774
- });
775
- function getTooltip() {
776
- return pageObject.getByAutomationId(context.prefix + "tooltip");
777
- }
778
- }
779
-
780
- var TuiPageObject = /** @class */ (function () {
781
- function TuiPageObject(fixture) {
782
- this.fixture = fixture;
783
- }
784
- TuiPageObject.getIds = function (_a) {
785
- var nativeElement = _a.nativeElement;
786
- var attributeValue = nativeElement.getAttribute("automation-id");
787
- return attributeValue === null ? [] : attributeValue.split(" ");
788
- };
789
- TuiPageObject.containsId = function (debugElement, automationId) {
790
- return TuiPageObject.getIds(debugElement).includes(automationId);
791
- };
792
- TuiPageObject.byAutomationId = function (automationId) {
793
- return function (debugElement) { return TuiPageObject.containsId(debugElement, automationId); };
794
- };
795
- TuiPageObject.prototype.getByAutomationId = function (automationId, debugElement) {
796
- if (debugElement === void 0) { debugElement = this.fixture.debugElement; }
797
- return debugElement.query(TuiPageObject.byAutomationId(automationId));
798
- };
799
- // Syncing result order with DOM order: https://github.com/angular/angular/issues/13066
800
- TuiPageObject.prototype.getAllByAutomationId = function (automationId, debugElement) {
801
- if (debugElement === void 0) { debugElement = this.fixture.debugElement; }
802
- var debugEls = debugElement.queryAll(TuiPageObject.byAutomationId(automationId));
803
- var domEls = Array.from(debugElement.nativeElement.querySelectorAll("[automation-id='" + automationId + "']"));
804
- return debugEls.sort(function (a, b) { return domEls.indexOf(a.nativeElement) - domEls.indexOf(b.nativeElement); });
805
- };
806
- return TuiPageObject;
807
- }());
808
-
809
- function tuiReplaceNbsp(content) {
810
- var _a;
811
- return (_a = content === null || content === void 0 ? void 0 : content.replace(new RegExp(cdk.CHAR_NO_BREAK_SPACE, "g"), " ")) !== null && _a !== void 0 ? _a : "";
812
- }
813
-
814
- var TuiNativeInputPO = /** @class */ (function () {
815
- function TuiNativeInputPO(fixture, automationId, hostDebugElement) {
816
- this.fixture = fixture;
817
- this.automationId = automationId;
818
- this.hostDebugElement = hostDebugElement;
819
- this.pageObject = new TuiPageObject(fixture);
820
- }
821
- Object.defineProperty(TuiNativeInputPO.prototype, "nativeElement", {
822
- get: function () {
823
- var _a, _b;
824
- return ((_b = (_a = this.pageObject.getByAutomationId(this.automationId, this.hostDebugElement)) === null || _a === void 0 ? void 0 : _a.nativeElement) !== null && _b !== void 0 ? _b : null);
825
- },
826
- enumerable: false,
827
- configurable: true
828
- });
829
- Object.defineProperty(TuiNativeInputPO.prototype, "value", {
830
- get: function () {
831
- var _a, _b;
832
- return tuiReplaceNbsp((_b = (_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "");
833
- },
834
- enumerable: false,
835
- configurable: true
836
- });
837
- Object.defineProperty(TuiNativeInputPO.prototype, "focused", {
838
- get: function () {
839
- return document.activeElement === this.nativeElement;
840
- },
841
- enumerable: false,
842
- configurable: true
843
- });
844
- TuiNativeInputPO.prototype.sendText = function (value) {
845
- this.focus(); // need focus before initial value for emulate user interaction
846
- var nativeElement = this.nativeElement;
847
- if (nativeElement) {
848
- nativeElement.value = value;
849
- nativeElement.dispatchEvent(new Event("input", { bubbles: true }));
850
- }
851
- this.fixture.detectChanges();
852
- };
853
- // @bad TODO: Fix this with actually moving focus rather than just blurring
854
- TuiNativeInputPO.prototype.sendTextAndBlur = function (value) {
855
- this.focus();
856
- this.sendText(value);
857
- this.blur();
858
- };
859
- TuiNativeInputPO.prototype.sendKeydown = function (key) {
860
- var _a;
861
- (_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.dispatchEvent(tuiCreateKeyboardEvent(key, "keydown"));
862
- this.fixture.detectChanges();
863
- };
864
- TuiNativeInputPO.prototype.focus = function () {
865
- var _a;
866
- (_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.focus();
867
- this.fixture.detectChanges();
868
- };
869
- TuiNativeInputPO.prototype.blur = function () {
870
- var _a;
871
- (_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.blur();
872
- this.fixture.detectChanges();
873
- };
874
- TuiNativeInputPO.prototype.click = function () {
875
- var _a;
876
- (_a = this.nativeElement) === null || _a === void 0 ? void 0 : _a.click();
877
- this.fixture.detectChanges();
878
- };
879
- return TuiNativeInputPO;
880
- }());
881
-
882
- function tuiTestingViewport(width, height) {
883
- Object.defineProperty(global, "innerWidth", {
884
- writable: true,
885
- configurable: true,
886
- value: width,
887
- });
888
- Object.defineProperty(global.document.documentElement, "clientWidth", {
889
- writable: true,
890
- configurable: true,
891
- value: width - 15,
892
- });
893
- Object.defineProperty(global, "innerHeight", {
894
- writable: true,
895
- configurable: true,
896
- value: height,
897
- });
898
- Object.defineProperty(global.document.documentElement, "clientHeight", {
899
- writable: true,
900
- configurable: true,
901
- value: height,
902
- });
903
- }
904
-
905
- /**
906
- * Generated bundle index. Do not edit.
907
- */
908
-
909
- exports.TuiComponentHarness = TuiComponentHarness;
910
- exports.TuiContentContainerComponentHarness = TuiContentContainerComponentHarness;
911
- exports.TuiNativeInputPO = TuiNativeInputPO;
912
- exports.TuiPageObject = TuiPageObject;
913
- exports.configureTestSuite = configureTestSuite;
914
- exports.tuiActiveText = tuiActiveText;
915
- exports.tuiCreateKeyboardEvent = tuiCreateKeyboardEvent;
916
- exports.tuiDispatchOnActive = tuiDispatchOnActive;
917
- exports.tuiHarnessWith = tuiHarnessWith;
918
- exports.tuiIsActive = tuiIsActive;
919
- exports.tuiMockCurrentDate = tuiMockCurrentDate;
920
- exports.tuiReplaceNbsp = tuiReplaceNbsp;
921
- exports.tuiRestoreRealDate = tuiRestoreRealDate;
922
- exports.tuiTestCleaner = tuiTestCleaner;
923
- exports.tuiTestFiller = tuiTestFiller;
924
- exports.tuiTestFormControlState = tuiTestFormControlState;
925
- exports.tuiTestPlaceholder = tuiTestPlaceholder;
926
- exports.tuiTestTooltip = tuiTestTooltip;
927
- exports.tuiTestingViewport = tuiTestingViewport;
928
- exports.tuiWithPredicate = tuiWithPredicate;
929
-
930
- Object.defineProperty(exports, '__esModule', { value: true });
931
-
932
- }));
933
- //# sourceMappingURL=taiga-ui-testing-utils.umd.js.map