@taiga-ui/testing 3.491.1-canary.d27927b → 4.0.0-rc.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 (181) 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/esm2022/mocks/sanitizer.mjs +13 -0
  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/{fesm2015/taiga-ui-testing-mocks.js → fesm2022/taiga-ui-testing-mocks.mjs} +5 -3
  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} +21 -21
  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} +94 -104
  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/sanitizer.d.ts +1 -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.map +0 -1
  159. package/fesm2015/taiga-ui-testing-setup-jest.js.map +0 -1
  160. package/fesm2015/taiga-ui-testing-utils.js.map +0 -1
  161. package/fesm2015/taiga-ui-testing.js.map +0 -1
  162. package/mocks/package.json +0 -10
  163. package/mocks/taiga-ui-testing-mocks.d.ts +0 -5
  164. package/setup-jest/package.json +0 -10
  165. package/setup-jest/taiga-ui-testing-setup-jest.d.ts +0 -5
  166. package/taiga-ui-testing.d.ts +0 -5
  167. package/utils/package.json +0 -10
  168. package/utils/taiga-ui-testing-utils.d.ts +0 -5
  169. /package/{esm2015/core/taiga-ui-testing-core.js → esm2022/core/taiga-ui-testing-core.mjs} +0 -0
  170. /package/{esm2015/exceptions/element-is-not-input.exception.js → esm2022/exceptions/element-is-not-input.exception.mjs} +0 -0
  171. /package/{esm2015/exceptions/field-not-found.exception.js → esm2022/exceptions/field-not-found.exception.mjs} +0 -0
  172. /package/{esm2015/exceptions/index.js → esm2022/exceptions/index.mjs} +0 -0
  173. /package/{esm2015/exceptions/taiga-ui-testing-exceptions.js → esm2022/exceptions/taiga-ui-testing-exceptions.mjs} +0 -0
  174. /package/{esm2015/index.js → esm2022/index.mjs} +0 -0
  175. /package/{esm2015/mocks/index.js → esm2022/mocks/index.mjs} +0 -0
  176. /package/{esm2015/mocks/switch-ng-dev-mode.js → esm2022/mocks/switch-ng-dev-mode.mjs} +0 -0
  177. /package/{esm2015/mocks/taiga-ui-testing-mocks.js → esm2022/mocks/taiga-ui-testing-mocks.mjs} +0 -0
  178. /package/{esm2015/setup-jest/taiga-ui-testing-setup-jest.js → esm2022/setup-jest/taiga-ui-testing-setup-jest.mjs} +0 -0
  179. /package/{esm2015/taiga-ui-testing.js → esm2022/taiga-ui-testing.mjs} +0 -0
  180. /package/{esm2015/utils/index.js → esm2022/utils/index.mjs} +0 -0
  181. /package/{esm2015/utils/taiga-ui-testing-utils.js → esm2022/utils/taiga-ui-testing-utils.mjs} +0 -0
package/package.json CHANGED
@@ -1,19 +1,55 @@
1
1
  {
2
2
  "name": "@taiga-ui/testing",
3
- "version": "3.491.1-canary.d27927b",
3
+ "version": "4.0.0-rc.1",
4
4
  "description": "Utils functions for testing Taiga UI packages",
5
- "dependencies": {
6
- "cypress-image-snapshot": "4.0.1",
7
- "tslib": ">=2.0.0"
8
- },
9
5
  "peerDependencies": {
10
- "@taiga-ui/cdk": ">=3.49.1"
6
+ "@taiga-ui/cdk": "^4.0.0-rc.1"
11
7
  },
12
- "main": "bundles/taiga-ui-testing.umd.js",
13
- "module": "fesm2015/taiga-ui-testing.js",
14
- "es2015": "fesm2015/taiga-ui-testing.js",
15
- "esm2015": "esm2015/taiga-ui-testing.js",
16
- "fesm2015": "fesm2015/taiga-ui-testing.js",
17
- "typings": "taiga-ui-testing.d.ts",
18
- "sideEffects": false
8
+ "module": "fesm2022/taiga-ui-testing.mjs",
9
+ "typings": "index.d.ts",
10
+ "exports": {
11
+ "./package.json": {
12
+ "default": "./package.json"
13
+ },
14
+ ".": {
15
+ "types": "./index.d.ts",
16
+ "esm2022": "./esm2022/taiga-ui-testing.mjs",
17
+ "esm": "./esm2022/taiga-ui-testing.mjs",
18
+ "default": "./fesm2022/taiga-ui-testing.mjs"
19
+ },
20
+ "./core": {
21
+ "types": "./core/index.d.ts",
22
+ "esm2022": "./esm2022/core/taiga-ui-testing-core.mjs",
23
+ "esm": "./esm2022/core/taiga-ui-testing-core.mjs",
24
+ "default": "./fesm2022/taiga-ui-testing-core.mjs"
25
+ },
26
+ "./exceptions": {
27
+ "types": "./exceptions/index.d.ts",
28
+ "esm2022": "./esm2022/exceptions/taiga-ui-testing-exceptions.mjs",
29
+ "esm": "./esm2022/exceptions/taiga-ui-testing-exceptions.mjs",
30
+ "default": "./fesm2022/taiga-ui-testing-exceptions.mjs"
31
+ },
32
+ "./mocks": {
33
+ "types": "./mocks/index.d.ts",
34
+ "esm2022": "./esm2022/mocks/taiga-ui-testing-mocks.mjs",
35
+ "esm": "./esm2022/mocks/taiga-ui-testing-mocks.mjs",
36
+ "default": "./fesm2022/taiga-ui-testing-mocks.mjs"
37
+ },
38
+ "./setup-jest": {
39
+ "types": "./setup-jest/index.d.ts",
40
+ "esm2022": "./esm2022/setup-jest/taiga-ui-testing-setup-jest.mjs",
41
+ "esm": "./esm2022/setup-jest/taiga-ui-testing-setup-jest.mjs",
42
+ "default": "./fesm2022/taiga-ui-testing-setup-jest.mjs"
43
+ },
44
+ "./utils": {
45
+ "types": "./utils/index.d.ts",
46
+ "esm2022": "./esm2022/utils/taiga-ui-testing-utils.mjs",
47
+ "esm": "./esm2022/utils/taiga-ui-testing-utils.mjs",
48
+ "default": "./fesm2022/taiga-ui-testing-utils.mjs"
49
+ }
50
+ },
51
+ "sideEffects": false,
52
+ "dependencies": {
53
+ "tslib": "^2.6.3"
54
+ }
19
55
  }
@@ -1,4 +1,4 @@
1
- import { ComponentFixture } from '@angular/core/testing';
1
+ import type { ComponentFixture } from '@angular/core/testing';
2
2
  export declare function tuiDispatchOnActive<T>(key: string, fixture?: ComponentFixture<T>): void;
3
3
  export declare function tuiActiveText(): string;
4
4
  export declare function tuiIsActive(element: Element): boolean;
@@ -1 +1,2 @@
1
- export declare const configureTestSuite: (configureModule?: (() => void) | undefined) => void;
1
+ /** deprecated, will be removed in 4.0 */
2
+ export declare const configureTestSuite: (configureModule?: () => void) => void;
@@ -1,4 +1,5 @@
1
- import { BaseHarnessFilters, ComponentHarness, ComponentHarnessConstructor, ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
1
+ import type { BaseHarnessFilters, ComponentHarnessConstructor } from '@angular/cdk/testing';
2
+ import { ComponentHarness, ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
2
3
  /**
3
4
  * Decorator to add default static 'with' method.
4
5
  * Use in conjunction with {@link tuiHarnessWith} mixin.
@@ -1,15 +1,15 @@
1
- import { ComponentFixture } from '@angular/core/testing';
2
- import { FormControl } from '@angular/forms';
3
- import { TuiNativeInputPO } from '../native-input.page-object';
4
- import { TuiPageObject } from '../page-object';
1
+ import type { ComponentFixture } from '@angular/core/testing';
2
+ import type { FormControl } from '@angular/forms';
3
+ import type { TuiNativeInputPO } from '../native-input.page-object';
4
+ import type { TuiPageObject } from '../page-object';
5
5
  interface TestParams {
6
6
  fixture: ComponentFixture<unknown>;
7
7
  inputPO: TuiNativeInputPO;
8
8
  pageObject: TuiPageObject<unknown>;
9
9
  prefix: string;
10
- testComponent: TestComponent;
10
+ testComponent: Test;
11
11
  }
12
- interface TestComponent {
12
+ interface Test {
13
13
  cleaner: boolean;
14
14
  control?: FormControl;
15
15
  disabled?: boolean;
@@ -1,15 +1,15 @@
1
- import { ComponentFixture } from '@angular/core/testing';
2
- import { FormControl } from '@angular/forms';
3
- import { TuiNativeInputPO } from '../native-input.page-object';
4
- import { TuiPageObject } from '../page-object';
1
+ import type { ComponentFixture } from '@angular/core/testing';
2
+ import type { FormControl } from '@angular/forms';
3
+ import type { TuiNativeInputPO } from '../native-input.page-object';
4
+ import type { TuiPageObject } from '../page-object';
5
5
  interface TestParams {
6
6
  fixture: ComponentFixture<unknown>;
7
7
  inputPO: TuiNativeInputPO;
8
8
  pageObject: TuiPageObject<unknown>;
9
9
  prefix: string;
10
- testComponent: TestComponent;
10
+ testComponent: Test;
11
11
  }
12
- interface TestComponent {
12
+ interface Test {
13
13
  control: FormControl;
14
14
  }
15
15
  export declare function tuiTestFiller(context: TestParams, setValue?: unknown, clearValue?: unknown): void;
@@ -1,12 +1,12 @@
1
- import { ComponentFixture } from '@angular/core/testing';
2
- import { FormControl } from '@angular/forms';
3
- import { TuiNativeInputPO } from '../native-input.page-object';
1
+ import type { ComponentFixture } from '@angular/core/testing';
2
+ import type { FormControl } from '@angular/forms';
3
+ import type { TuiNativeInputPO } from '../native-input.page-object';
4
4
  interface TestParams {
5
5
  fixture: ComponentFixture<unknown>;
6
6
  inputPO: TuiNativeInputPO;
7
- testComponent: TestComponent;
7
+ testComponent: Test;
8
8
  }
9
- interface TestComponent {
9
+ interface Test {
10
10
  control: FormControl;
11
11
  }
12
12
  export declare function tuiTestFormControlState(context: TestParams): void;
@@ -1,13 +1,13 @@
1
- import { ComponentFixture } from '@angular/core/testing';
2
- import { FormControl } from '@angular/forms';
3
- import { TuiPageObject } from '../page-object';
1
+ import type { ComponentFixture } from '@angular/core/testing';
2
+ import type { FormControl } from '@angular/forms';
3
+ import type { TuiPageObject } from '../page-object';
4
4
  interface TestParams {
5
5
  fixture: ComponentFixture<unknown>;
6
6
  pageObject: TuiPageObject<unknown>;
7
7
  prefix: string;
8
- testComponent: TestComponent;
8
+ testComponent: Test;
9
9
  }
10
- interface TestComponent {
10
+ interface Test {
11
11
  control?: FormControl;
12
12
  labelOutside: boolean;
13
13
  size: 'l' | 'm' | 's';
@@ -1,13 +1,13 @@
1
- import { ComponentFixture } from '@angular/core/testing';
2
- import { FormControl } from '@angular/forms';
3
- import { TuiPageObject } from '../page-object';
1
+ import type { ComponentFixture } from '@angular/core/testing';
2
+ import type { FormControl } from '@angular/forms';
3
+ import type { TuiPageObject } from '../page-object';
4
4
  interface TestParams {
5
5
  fixture: ComponentFixture<unknown>;
6
6
  pageObject: TuiPageObject<unknown>;
7
7
  prefix: string;
8
- testComponent: TestComponent;
8
+ testComponent: Test;
9
9
  }
10
- interface TestComponent {
10
+ interface Test {
11
11
  control?: FormControl;
12
12
  disabled?: boolean;
13
13
  hintContent: string | null;
@@ -1,11 +1,10 @@
1
- import { DebugElement } from '@angular/core';
2
- import { ComponentFixture } from '@angular/core/testing';
1
+ import type { DebugElement } from '@angular/core';
2
+ import type { ComponentFixture } from '@angular/core/testing';
3
3
  export declare class TuiNativeInputPO {
4
4
  private readonly fixture;
5
- private readonly automationId;
6
- private readonly hostDebugElement?;
5
+ private readonly automationIdOrElement;
7
6
  private readonly pageObject;
8
- constructor(fixture: ComponentFixture<unknown>, automationId: string, hostDebugElement?: DebugElement | undefined);
7
+ constructor(fixture: ComponentFixture<unknown>, automationIdOrElement: DebugElement | string);
9
8
  get nativeElement(): HTMLInputElement | HTMLTextAreaElement | null;
10
9
  get value(): string;
11
10
  get focused(): boolean;
@@ -1,5 +1,5 @@
1
- import { DebugElement } from '@angular/core';
2
- import { ComponentFixture } from '@angular/core/testing';
1
+ import type { DebugElement } from '@angular/core';
2
+ import type { ComponentFixture } from '@angular/core/testing';
3
3
  export declare class TuiPageObject<T> {
4
4
  protected fixture: ComponentFixture<T>;
5
5
  constructor(fixture: ComponentFixture<T>);