@skbkontur/playwright-react-ui-components 1.14.2 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/build/src/assertions/AutocompleteAssertions.js +9 -9
  2. package/build/src/assertions/ButtonAssertions.js +8 -8
  3. package/build/src/assertions/CheckboxAssertions.js +11 -11
  4. package/build/src/assertions/ComboBoxAssertions.js +8 -8
  5. package/build/src/assertions/ComponentListAssertions.js +5 -5
  6. package/build/src/assertions/CurrencyInputAssertions.js +8 -8
  7. package/build/src/assertions/DateInputAssertions.js +8 -8
  8. package/build/src/assertions/DatePickerAssertions.js +8 -8
  9. package/build/src/assertions/DateRangePickerAssertions.js +2 -2
  10. package/build/src/assertions/DropdownAssertions.js +8 -8
  11. package/build/src/assertions/DropdownMenuAssertions.js +4 -4
  12. package/build/src/assertions/FileUploaderAssertions.js +2 -2
  13. package/build/src/assertions/FxInputAssertions.js +8 -8
  14. package/build/src/assertions/InputAssertions.js +9 -9
  15. package/build/src/assertions/KebabAssertions.js +2 -2
  16. package/build/src/assertions/LabelAssertions.js +6 -6
  17. package/build/src/assertions/LinkAssertions.js +8 -8
  18. package/build/src/assertions/LoaderAssertions.js +1 -1
  19. package/build/src/assertions/MenuItemAssertations.js +4 -4
  20. package/build/src/assertions/PagingAssertions.js +2 -2
  21. package/build/src/assertions/PortalAssertions.js +2 -2
  22. package/build/src/assertions/RadioAssertions.js +12 -12
  23. package/build/src/assertions/RadioGroupAssertions.js +2 -2
  24. package/build/src/assertions/SelectAssertions.js +6 -6
  25. package/build/src/assertions/SpinnerAssertions.js +1 -1
  26. package/build/src/assertions/TabAssertions.js +8 -8
  27. package/build/src/assertions/TextareaAssertions.js +8 -8
  28. package/build/src/assertions/ToastAssertions.js +1 -1
  29. package/build/src/assertions/ToggleAssertions.js +10 -10
  30. package/build/src/assertions/TokenAssertions.js +7 -7
  31. package/build/src/assertions/TokenInputAssertions.js +6 -6
  32. package/build/src/assertions/TooltipAssertions.js +4 -4
  33. package/build/src/extensions/mergedExpects.d.ts +1 -2
  34. package/build/src/extensions/mergedExpects.js +1 -2
  35. package/build/src/matchers/component/toBeChecked.d.ts +3 -0
  36. package/build/src/matchers/component/{toBeCheckedEx.js → toBeChecked.js} +2 -2
  37. package/build/src/matchers/component/toBeCheckedByIndex.js +2 -2
  38. package/build/src/matchers/component/toBeCheckedByText.js +2 -2
  39. package/build/src/matchers/component/toBeCheckedByValue.js +2 -2
  40. package/build/src/matchers/component/toBeDisabled.d.ts +3 -0
  41. package/build/src/matchers/component/{toBeDisabledEx.js → toBeDisabled.js} +5 -5
  42. package/build/src/matchers/component/toBeEmpty.d.ts +3 -0
  43. package/build/src/matchers/component/{toBeEmptyEx.js → toBeEmpty.js} +4 -4
  44. package/build/src/matchers/component/toBeEnabled.d.ts +3 -0
  45. package/build/src/matchers/component/{toBeEnabledEx.js → toBeEnabled.js} +4 -4
  46. package/build/src/matchers/component/toBeFocused.d.ts +3 -0
  47. package/build/src/matchers/component/{toBeFocusedEx.js → toBeFocused.js} +2 -2
  48. package/build/src/matchers/component/toBeHidden.d.ts +3 -0
  49. package/build/src/matchers/component/{toBeHiddenEx.js → toBeHidden.js} +2 -2
  50. package/build/src/matchers/component/toBeUnchecked.js +1 -1
  51. package/build/src/matchers/component/toBeVisible.d.ts +3 -0
  52. package/build/src/matchers/component/{toBeVisibleEx.js → toBeVisible.js} +2 -2
  53. package/build/src/matchers/component/toContainFormattedText.d.ts +3 -0
  54. package/build/src/matchers/component/toContainFormattedText.js +77 -0
  55. package/build/src/matchers/component/toContainItem.d.ts +1 -1
  56. package/build/src/matchers/component/toContainItem.js +2 -1
  57. package/build/src/matchers/component/toContainItems.js +1 -1
  58. package/build/src/matchers/component/toContainTabs.js +2 -2
  59. package/build/src/matchers/component/toContainText.d.ts +3 -0
  60. package/build/src/matchers/component/{toContainTextEx.js → toContainText.js} +2 -2
  61. package/build/src/matchers/component/toContainTokens.js +2 -2
  62. package/build/src/matchers/component/toContainUploadedFiles.js +2 -2
  63. package/build/src/matchers/component/toHaveAttribute.d.ts +3 -0
  64. package/build/src/matchers/component/{toHaveAttributeEx.js → toHaveAttribute.js} +2 -2
  65. package/build/src/matchers/component/toHaveCount.d.ts +3 -0
  66. package/build/src/matchers/component/{toHaveCountEx.js → toHaveCount.js} +2 -2
  67. package/build/src/matchers/component/toHaveError.js +1 -1
  68. package/build/src/matchers/component/toHaveFormattedText.d.ts +3 -0
  69. package/build/src/matchers/component/toHaveFormattedText.js +77 -0
  70. package/build/src/matchers/component/toHaveFormattedValue.d.ts +3 -0
  71. package/build/src/matchers/component/toHaveFormattedValue.js +77 -0
  72. package/build/src/matchers/component/toHaveItems.js +1 -1
  73. package/build/src/matchers/component/toHaveText.d.ts +3 -0
  74. package/build/src/matchers/component/{toHaveTextEx.js → toHaveText.js} +2 -2
  75. package/build/src/matchers/component/{toHaveValueEx.d.ts → toHaveValue.d.ts} +1 -1
  76. package/build/src/matchers/component/{toHaveValueEx.js → toHaveValue.js} +6 -6
  77. package/build/src/matchers/component/toHaveWarning.js +1 -1
  78. package/build/src/matchers/componentMatchers.d.ts +178 -22
  79. package/build/src/matchers/componentMatchers.js +117 -48
  80. package/build/src/matchers/createAsyncMatcher.d.ts +36 -0
  81. package/build/src/matchers/createAsyncMatcher.js +76 -0
  82. package/build/src/matchers/index.d.ts +0 -1
  83. package/build/src/matchers/index.js +0 -1
  84. package/build/src/options/AssertionOptions.d.ts +1 -1
  85. package/build/src/utils/removeSpaces.d.ts +6 -0
  86. package/build/src/utils/removeSpaces.js +10 -0
  87. package/package.json +2 -2
  88. package/build/src/matchers/component/toBeCheckedEx.d.ts +0 -3
  89. package/build/src/matchers/component/toBeDisabledEx.d.ts +0 -3
  90. package/build/src/matchers/component/toBeEmptyEx.d.ts +0 -3
  91. package/build/src/matchers/component/toBeEnabledEx.d.ts +0 -3
  92. package/build/src/matchers/component/toBeFocusedEx.d.ts +0 -3
  93. package/build/src/matchers/component/toBeHiddenEx.d.ts +0 -3
  94. package/build/src/matchers/component/toBeVisibleEx.d.ts +0 -3
  95. package/build/src/matchers/component/toContainFormattedTextEx.d.ts +0 -3
  96. package/build/src/matchers/component/toContainFormattedTextEx.js +0 -55
  97. package/build/src/matchers/component/toContainTextEx.d.ts +0 -3
  98. package/build/src/matchers/component/toHaveAttributeEx.d.ts +0 -3
  99. package/build/src/matchers/component/toHaveCountEx.d.ts +0 -3
  100. package/build/src/matchers/component/toHaveFormattedTextEx.d.ts +0 -3
  101. package/build/src/matchers/component/toHaveFormattedTextEx.js +0 -56
  102. package/build/src/matchers/component/toHaveFormattedValueEx.d.ts +0 -3
  103. package/build/src/matchers/component/toHaveFormattedValueEx.js +0 -56
  104. package/build/src/matchers/component/toHaveTextEx.d.ts +0 -3
  105. package/build/src/matchers/formattedMatchers.d.ts +0 -21
  106. package/build/src/matchers/formattedMatchers.js +0 -129
@@ -1,22 +1,11 @@
1
1
  declare const matchers: {
2
- readonly toBeEmptyEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0?: import("..").EmptyOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
3
- readonly toBeVisibleEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").VisibleOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
4
- readonly toBeHiddenEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").HiddenOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
5
- readonly toBeEnabledEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
6
- readonly toBeDisabledEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
7
- readonly toBeFocusedEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeFocusableElementLocator, args_0?: import("..").FocusedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
8
- readonly toBeCheckedEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeCheckableElementLocator, args_0?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
9
- readonly toHaveAttributeEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToHaveAttributeElementLocator, args_0: string, args_1?: string | RegExp | undefined, args_2?: import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
10
- readonly toHaveValueEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0: string | number | RegExp | readonly (string | RegExp)[] | {
11
- start?: string;
12
- end?: string;
13
- }, args_1?: import("..").ValueOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
14
- readonly toHaveTextEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string | RegExp | readonly (string | RegExp)[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
15
- readonly toHaveCountEx: (this: import("@playwright/test").ExpectMatcherState, component: import("..").ComponentList<any>, args_0: number, args_1?: import("..").CountOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
16
- readonly toHaveFormattedValueEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
17
- readonly toHaveFormattedTextEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
18
- readonly toContainTextEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string | RegExp | readonly (string | RegExp)[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
19
- readonly toContainFormattedTextEx: (this: import("@playwright/test").ExpectMatcherState, component: import("..").Label, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
2
+ readonly toBeEmpty: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0?: import("..").EmptyOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
3
+ readonly toBeVisible: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").VisibleOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
4
+ readonly toBeHidden: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").HiddenOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
5
+ readonly toBeEnabled: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
6
+ readonly toBeDisabled: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
7
+ readonly toBeFocused: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeFocusableElementLocator, args_0?: import("..").FocusedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
8
+ readonly toBeChecked: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeCheckableElementLocator, args_0?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
20
9
  readonly toBeAutoMode: (this: import("@playwright/test").ExpectMatcherState, component: import("..").FxInput, args_0?: import("..").VisibleOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
21
10
  readonly toBeUnchecked: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeCheckableElementLocator, args_0?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
22
11
  readonly toBeActiveTab: (this: import("@playwright/test").ExpectMatcherState, component: import("..").Tab, args_0?: import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
@@ -27,6 +16,13 @@ declare const matchers: {
27
16
  readonly toBeUncheckedByIndex: (this: import("@playwright/test").ExpectMatcherState, component: import("..").RadioGroup, args_0: number, args_1?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
28
17
  readonly toBeCheckedByText: (this: import("@playwright/test").ExpectMatcherState, component: import("..").RadioGroup, args_0: string | RegExp, args_1?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
29
18
  readonly toBeUncheckedByText: (this: import("@playwright/test").ExpectMatcherState, component: import("..").RadioGroup, args_0: string | RegExp, args_1?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
19
+ readonly toHaveAttribute: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToHaveAttributeElementLocator, args_0: string, args_1?: string | RegExp | undefined, args_2?: import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
20
+ readonly toHaveValue: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0: string | number | RegExp | readonly (string | RegExp)[] | {
21
+ start?: string;
22
+ end?: string;
23
+ }, args_1?: import("..").ValueOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
24
+ readonly toHaveText: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string | RegExp | readonly (string | RegExp)[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
25
+ readonly toHaveCount: (this: import("@playwright/test").ExpectMatcherState, component: import("..").ComponentList<any>, args_0: number, args_1?: import("..").CountOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
30
26
  readonly toHaveHref: (this: import("@playwright/test").ExpectMatcherState, component: import("..").Link, args_0: string | RegExp, args_1?: import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
31
27
  readonly toHaveItems: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToHaveItemsElementLocator, args_0: string[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
32
28
  readonly toHaveError: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").RootSymbolLocator, args_0?: import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
@@ -38,6 +34,8 @@ declare const matchers: {
38
34
  readonly toHaveActivePage: (this: import("@playwright/test").ExpectMatcherState, component: import("..").Paging, args_0: number, args_1?: {
39
35
  timeout?: number;
40
36
  } | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
37
+ readonly toHaveFormattedValue: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
38
+ readonly toHaveFormattedText: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
41
39
  readonly toContainItems: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToHaveItemsElementLocator, args_0: string[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
42
40
  readonly toContainItem: (this: import("@playwright/test").ExpectMatcherState, component: import("..").MenuComponent & import("./component/LocatorSymbols").ToContainItemElementLocator, args_0: string, args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
43
41
  readonly toContainTokens: (this: import("@playwright/test").ExpectMatcherState, component: import("..").TokenInput, args_0: string[], args_1?: {
@@ -48,27 +46,96 @@ declare const matchers: {
48
46
  readonly toContainUploadedFiles: (this: import("@playwright/test").ExpectMatcherState, component: import("..").FileUploader, args_0: string[], args_1?: {
49
47
  timeout?: number;
50
48
  } | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
51
- };
52
- export type ComponentMatchers = typeof matchers;
53
- export declare const componentMatchers: import("@playwright/test").Expect<{
49
+ readonly toContainText: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string | RegExp | readonly (string | RegExp)[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
50
+ readonly toContainFormattedText: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
51
+ /**
52
+ * @deprecated will be removed in the next major version
53
+ * @see {@link toBeVisible}
54
+ */
54
55
  readonly toBeEmptyEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0?: import("..").EmptyOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
56
+ /**
57
+ * @deprecated will be removed in the next major version
58
+ * @see {@link toBeVisible}
59
+ */
55
60
  readonly toBeVisibleEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").VisibleOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
61
+ /**
62
+ * @deprecated will be removed in the next major version
63
+ * @see {@link toBeHidden}
64
+ */
56
65
  readonly toBeHiddenEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").HiddenOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
66
+ /**
67
+ * @deprecated will be removed in the next major version
68
+ * @see {@link toBeEnabled}
69
+ */
57
70
  readonly toBeEnabledEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
71
+ /**
72
+ * @deprecated will be removed in the next major version
73
+ * @see {@link toBeDisabled}
74
+ */
58
75
  readonly toBeDisabledEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
76
+ /**
77
+ * @deprecated will be removed in the next major version
78
+ * @see {@link toBeFocused}
79
+ */
59
80
  readonly toBeFocusedEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeFocusableElementLocator, args_0?: import("..").FocusedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
81
+ /**
82
+ * @deprecated will be removed in the next major version
83
+ * @see {@link toBeChecked}
84
+ */
60
85
  readonly toBeCheckedEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeCheckableElementLocator, args_0?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
86
+ /**
87
+ * @deprecated will be removed in the next major version
88
+ * @see {@link toHaveAttribute}
89
+ */
61
90
  readonly toHaveAttributeEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToHaveAttributeElementLocator, args_0: string, args_1?: string | RegExp | undefined, args_2?: import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
91
+ /**
92
+ * @deprecated will be removed in the next major version
93
+ * @see {@link toHaveValue}
94
+ */
62
95
  readonly toHaveValueEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0: string | number | RegExp | readonly (string | RegExp)[] | {
63
96
  start?: string;
64
97
  end?: string;
65
98
  }, args_1?: import("..").ValueOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
99
+ /**
100
+ * @deprecated will be removed in the next major version
101
+ * @see {@link toHaveText}
102
+ */
66
103
  readonly toHaveTextEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string | RegExp | readonly (string | RegExp)[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
104
+ /**
105
+ * @deprecated will be removed in the next major version
106
+ * @see {@link toHaveCount}
107
+ */
67
108
  readonly toHaveCountEx: (this: import("@playwright/test").ExpectMatcherState, component: import("..").ComponentList<any>, args_0: number, args_1?: import("..").CountOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
109
+ /**
110
+ * @deprecated will be removed in the next major version
111
+ * @see {@link toHaveFormattedValue}
112
+ */
68
113
  readonly toHaveFormattedValueEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
114
+ /**
115
+ * @deprecated will be removed in the next major version
116
+ * @see {@link toHaveFormattedText}
117
+ */
69
118
  readonly toHaveFormattedTextEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
119
+ /**
120
+ * @deprecated will be removed in the next major version
121
+ * @see {@link toContainText}
122
+ */
70
123
  readonly toContainTextEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string | RegExp | readonly (string | RegExp)[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
71
- readonly toContainFormattedTextEx: (this: import("@playwright/test").ExpectMatcherState, component: import("..").Label, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
124
+ /**
125
+ * @deprecated will be removed in the next major version
126
+ * @see {@link toContainFormattedText}
127
+ */
128
+ readonly toContainFormattedTextEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
129
+ };
130
+ export type ComponentMatchers = typeof matchers;
131
+ export declare const componentMatchers: import("@playwright/test").Expect<{
132
+ readonly toBeEmpty: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0?: import("..").EmptyOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
133
+ readonly toBeVisible: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").VisibleOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
134
+ readonly toBeHidden: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").HiddenOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
135
+ readonly toBeEnabled: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
136
+ readonly toBeDisabled: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
137
+ readonly toBeFocused: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeFocusableElementLocator, args_0?: import("..").FocusedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
138
+ readonly toBeChecked: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeCheckableElementLocator, args_0?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
72
139
  readonly toBeAutoMode: (this: import("@playwright/test").ExpectMatcherState, component: import("..").FxInput, args_0?: import("..").VisibleOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
73
140
  readonly toBeUnchecked: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeCheckableElementLocator, args_0?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
74
141
  readonly toBeActiveTab: (this: import("@playwright/test").ExpectMatcherState, component: import("..").Tab, args_0?: import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
@@ -79,6 +146,13 @@ export declare const componentMatchers: import("@playwright/test").Expect<{
79
146
  readonly toBeUncheckedByIndex: (this: import("@playwright/test").ExpectMatcherState, component: import("..").RadioGroup, args_0: number, args_1?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
80
147
  readonly toBeCheckedByText: (this: import("@playwright/test").ExpectMatcherState, component: import("..").RadioGroup, args_0: string | RegExp, args_1?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
81
148
  readonly toBeUncheckedByText: (this: import("@playwright/test").ExpectMatcherState, component: import("..").RadioGroup, args_0: string | RegExp, args_1?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
149
+ readonly toHaveAttribute: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToHaveAttributeElementLocator, args_0: string, args_1?: string | RegExp | undefined, args_2?: import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
150
+ readonly toHaveValue: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0: string | number | RegExp | readonly (string | RegExp)[] | {
151
+ start?: string;
152
+ end?: string;
153
+ }, args_1?: import("..").ValueOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
154
+ readonly toHaveText: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string | RegExp | readonly (string | RegExp)[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
155
+ readonly toHaveCount: (this: import("@playwright/test").ExpectMatcherState, component: import("..").ComponentList<any>, args_0: number, args_1?: import("..").CountOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
82
156
  readonly toHaveHref: (this: import("@playwright/test").ExpectMatcherState, component: import("..").Link, args_0: string | RegExp, args_1?: import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
83
157
  readonly toHaveItems: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToHaveItemsElementLocator, args_0: string[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
84
158
  readonly toHaveError: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").RootSymbolLocator, args_0?: import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
@@ -90,6 +164,8 @@ export declare const componentMatchers: import("@playwright/test").Expect<{
90
164
  readonly toHaveActivePage: (this: import("@playwright/test").ExpectMatcherState, component: import("..").Paging, args_0: number, args_1?: {
91
165
  timeout?: number;
92
166
  } | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
167
+ readonly toHaveFormattedValue: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
168
+ readonly toHaveFormattedText: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
93
169
  readonly toContainItems: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToHaveItemsElementLocator, args_0: string[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
94
170
  readonly toContainItem: (this: import("@playwright/test").ExpectMatcherState, component: import("..").MenuComponent & import("./component/LocatorSymbols").ToContainItemElementLocator, args_0: string, args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
95
171
  readonly toContainTokens: (this: import("@playwright/test").ExpectMatcherState, component: import("..").TokenInput, args_0: string[], args_1?: {
@@ -100,5 +176,85 @@ export declare const componentMatchers: import("@playwright/test").Expect<{
100
176
  readonly toContainUploadedFiles: (this: import("@playwright/test").ExpectMatcherState, component: import("..").FileUploader, args_0: string[], args_1?: {
101
177
  timeout?: number;
102
178
  } | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
179
+ readonly toContainText: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string | RegExp | readonly (string | RegExp)[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
180
+ readonly toContainFormattedText: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
181
+ /**
182
+ * @deprecated will be removed in the next major version
183
+ * @see {@link toBeVisible}
184
+ */
185
+ readonly toBeEmptyEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0?: import("..").EmptyOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
186
+ /**
187
+ * @deprecated will be removed in the next major version
188
+ * @see {@link toBeVisible}
189
+ */
190
+ readonly toBeVisibleEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").VisibleOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
191
+ /**
192
+ * @deprecated will be removed in the next major version
193
+ * @see {@link toBeHidden}
194
+ */
195
+ readonly toBeHiddenEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").VisibleElementLocator, args_0?: import("..").HiddenOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
196
+ /**
197
+ * @deprecated will be removed in the next major version
198
+ * @see {@link toBeEnabled}
199
+ */
200
+ readonly toBeEnabledEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
201
+ /**
202
+ * @deprecated will be removed in the next major version
203
+ * @see {@link toBeDisabled}
204
+ */
205
+ readonly toBeDisabledEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ControlElementLocator, args_0?: import("..").EnabledOptions | import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
206
+ /**
207
+ * @deprecated will be removed in the next major version
208
+ * @see {@link toBeFocused}
209
+ */
210
+ readonly toBeFocusedEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeFocusableElementLocator, args_0?: import("..").FocusedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
211
+ /**
212
+ * @deprecated will be removed in the next major version
213
+ * @see {@link toBeChecked}
214
+ */
215
+ readonly toBeCheckedEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToBeCheckableElementLocator, args_0?: import("..").CheckedOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
216
+ /**
217
+ * @deprecated will be removed in the next major version
218
+ * @see {@link toHaveAttribute}
219
+ */
220
+ readonly toHaveAttributeEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToHaveAttributeElementLocator, args_0: string, args_1?: string | RegExp | undefined, args_2?: import("..").AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
221
+ /**
222
+ * @deprecated will be removed in the next major version
223
+ * @see {@link toHaveValue}
224
+ */
225
+ readonly toHaveValueEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0: string | number | RegExp | readonly (string | RegExp)[] | {
226
+ start?: string;
227
+ end?: string;
228
+ }, args_1?: import("..").ValueOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
229
+ /**
230
+ * @deprecated will be removed in the next major version
231
+ * @see {@link toHaveText}
232
+ */
233
+ readonly toHaveTextEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string | RegExp | readonly (string | RegExp)[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
234
+ /**
235
+ * @deprecated will be removed in the next major version
236
+ * @see {@link toHaveCount}
237
+ */
238
+ readonly toHaveCountEx: (this: import("@playwright/test").ExpectMatcherState, component: import("..").ComponentList<any>, args_0: number, args_1?: import("..").CountOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
239
+ /**
240
+ * @deprecated will be removed in the next major version
241
+ * @see {@link toHaveFormattedValue}
242
+ */
243
+ readonly toHaveFormattedValueEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToWithValueElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
244
+ /**
245
+ * @deprecated will be removed in the next major version
246
+ * @see {@link toHaveFormattedText}
247
+ */
248
+ readonly toHaveFormattedTextEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
249
+ /**
250
+ * @deprecated will be removed in the next major version
251
+ * @see {@link toContainText}
252
+ */
253
+ readonly toContainTextEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string | RegExp | readonly (string | RegExp)[], args_1?: import("..").TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
254
+ /**
255
+ * @deprecated will be removed in the next major version
256
+ * @see {@link toContainFormattedText}
257
+ */
258
+ readonly toContainFormattedTextEx: (this: import("@playwright/test").ExpectMatcherState, component: import("./component/LocatorSymbols").ToTextElementLocator, args_0: string, args_1?: import("..").TransformOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
103
259
  }>;
104
260
  export {};
@@ -2,66 +2,52 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.componentMatchers = void 0;
4
4
  var test_1 = require("@playwright/test");
5
- var toBeEmptyEx_1 = require("./component/toBeEmptyEx");
6
- var toBeVisibleEx_1 = require("./component/toBeVisibleEx");
7
- var toBeHiddenEx_1 = require("./component/toBeHiddenEx");
8
- var toBeEnabledEx_1 = require("./component/toBeEnabledEx");
9
- var toBeDisabledEx_1 = require("./component/toBeDisabledEx");
10
- var toHaveAttributeEx_1 = require("./component/toHaveAttributeEx");
11
- var toHaveValueEx_1 = require("./component/toHaveValueEx");
12
- var toBeFocusedEx_1 = require("./component/toBeFocusedEx");
13
- var toBeCheckedEx_1 = require("./component/toBeCheckedEx");
5
+ var toBeEmpty_1 = require("./component/toBeEmpty");
6
+ var toBeVisible_1 = require("./component/toBeVisible");
7
+ var toBeHidden_1 = require("./component/toBeHidden");
8
+ var toBeEnabled_1 = require("./component/toBeEnabled");
9
+ var toBeDisabled_1 = require("./component/toBeDisabled");
10
+ var toBeFocused_1 = require("./component/toBeFocused");
11
+ var toBeChecked_1 = require("./component/toBeChecked");
14
12
  var toBeUnchecked_1 = require("./component/toBeUnchecked");
15
- var toHaveTextEx_1 = require("./component/toHaveTextEx");
16
- var toContainTextEx_1 = require("./component/toContainTextEx");
17
- var toHaveCountEx_1 = require("./component/toHaveCountEx");
18
- var toContainFormattedTextEx_1 = require("./component/toContainFormattedTextEx");
19
- var toHaveFormattedValueEx_1 = require("./component/toHaveFormattedValueEx");
20
- var toHaveFormattedTextEx_1 = require("./component/toHaveFormattedTextEx");
21
- var toHaveItems_1 = require("./component/toHaveItems");
22
- var toContainItems_1 = require("./component/toContainItems");
23
- var toContainItem_1 = require("./component/toContainItem");
24
13
  var toBeActiveTab_1 = require("./component/toBeActiveTab");
25
14
  var toBeInactiveTab_1 = require("./component/toBeInactiveTab");
26
15
  var toBeAutoMode_1 = require("./component/toBeAutoMode");
27
- var toHaveError_1 = require("./component/toHaveError");
28
- var toHaveWarning_1 = require("./component/toHaveWarning");
29
- var toContainUploadedFiles_1 = require("./component/toContainUploadedFiles");
30
- var toContainTokens_1 = require("./component/toContainTokens");
31
- var toHaveActiveTab_1 = require("./component/toHaveActiveTab");
32
- var toContainTabs_1 = require("./component/toContainTabs");
33
- var toHaveHref_1 = require("./component/toHaveHref");
34
- var toHavePageCount_1 = require("./component/toHavePageCount");
35
16
  var toBeCheckedByValue_1 = require("./component/toBeCheckedByValue");
36
17
  var toBeCheckedByIndex_1 = require("./component/toBeCheckedByIndex");
37
18
  var toBeUncheckedByValue_1 = require("./component/toBeUncheckedByValue");
38
19
  var toBeUncheckedByIndex_1 = require("./component/toBeUncheckedByIndex");
39
- var toContainSelectValue_1 = require("./component/toContainSelectValue");
40
20
  var toBeCheckedByText_1 = require("./component/toBeCheckedByText");
41
21
  var toBeUncheckedByText_1 = require("./component/toBeUncheckedByText");
22
+ var toHaveAttribute_1 = require("./component/toHaveAttribute");
23
+ var toHaveValue_1 = require("./component/toHaveValue");
24
+ var toHaveText_1 = require("./component/toHaveText");
25
+ var toHaveCount_1 = require("./component/toHaveCount");
26
+ var toHaveFormattedValue_1 = require("./component/toHaveFormattedValue");
27
+ var toHaveFormattedText_1 = require("./component/toHaveFormattedText");
28
+ var toHaveItems_1 = require("./component/toHaveItems");
29
+ var toHaveError_1 = require("./component/toHaveError");
30
+ var toHaveWarning_1 = require("./component/toHaveWarning");
31
+ var toHaveActiveTab_1 = require("./component/toHaveActiveTab");
32
+ var toHaveHref_1 = require("./component/toHaveHref");
33
+ var toHavePageCount_1 = require("./component/toHavePageCount");
42
34
  var toHaveActivePage_1 = require("./component/toHaveActivePage");
35
+ var toContainText_1 = require("./component/toContainText");
36
+ var toContainFormattedText_1 = require("./component/toContainFormattedText");
37
+ var toContainItems_1 = require("./component/toContainItems");
38
+ var toContainItem_1 = require("./component/toContainItem");
39
+ var toContainUploadedFiles_1 = require("./component/toContainUploadedFiles");
40
+ var toContainTokens_1 = require("./component/toContainTokens");
41
+ var toContainTabs_1 = require("./component/toContainTabs");
42
+ var toContainSelectValue_1 = require("./component/toContainSelectValue");
43
43
  var matchers = {
44
- /*
45
- NOTE: некоторые кастомные матчеры содержат суффикс "Ex",
46
- для того чтобы не переопределять стандартные матчеры playwright,
47
- тк. уже есть матчеры с такими же именами 'toBeEmpty' и тд и при extend они мутируются и перезаписываются { ...matchers, ...customMatchers }
48
- https://playwright.dev/docs/test-assertions#auto-retrying-assertions
49
- */
50
- toBeEmptyEx: toBeEmptyEx_1.toBeEmptyEx,
51
- toBeVisibleEx: toBeVisibleEx_1.toBeVisibleEx,
52
- toBeHiddenEx: toBeHiddenEx_1.toBeHiddenEx,
53
- toBeEnabledEx: toBeEnabledEx_1.toBeEnabledEx,
54
- toBeDisabledEx: toBeDisabledEx_1.toBeDisabledEx,
55
- toBeFocusedEx: toBeFocusedEx_1.toBeFocusedEx,
56
- toBeCheckedEx: toBeCheckedEx_1.toBeCheckedEx,
57
- toHaveAttributeEx: toHaveAttributeEx_1.toHaveAttributeEx,
58
- toHaveValueEx: toHaveValueEx_1.toHaveValueEx,
59
- toHaveTextEx: toHaveTextEx_1.toHaveTextEx,
60
- toHaveCountEx: toHaveCountEx_1.toHaveCountEx,
61
- toHaveFormattedValueEx: toHaveFormattedValueEx_1.toHaveFormattedValueEx,
62
- toHaveFormattedTextEx: toHaveFormattedTextEx_1.toHaveFormattedTextEx,
63
- toContainTextEx: toContainTextEx_1.toContainTextEx,
64
- toContainFormattedTextEx: toContainFormattedTextEx_1.toContainFormattedTextEx,
44
+ toBeEmpty: toBeEmpty_1.toBeEmpty,
45
+ toBeVisible: toBeVisible_1.toBeVisible,
46
+ toBeHidden: toBeHidden_1.toBeHidden,
47
+ toBeEnabled: toBeEnabled_1.toBeEnabled,
48
+ toBeDisabled: toBeDisabled_1.toBeDisabled,
49
+ toBeFocused: toBeFocused_1.toBeFocused,
50
+ toBeChecked: toBeChecked_1.toBeChecked,
65
51
  toBeAutoMode: toBeAutoMode_1.toBeAutoMode,
66
52
  toBeUnchecked: toBeUnchecked_1.toBeUnchecked,
67
53
  toBeActiveTab: toBeActiveTab_1.toBeActiveTab,
@@ -72,6 +58,10 @@ var matchers = {
72
58
  toBeUncheckedByIndex: toBeUncheckedByIndex_1.toBeUncheckedByIndex,
73
59
  toBeCheckedByText: toBeCheckedByText_1.toBeCheckedByText,
74
60
  toBeUncheckedByText: toBeUncheckedByText_1.toBeUncheckedByText,
61
+ toHaveAttribute: toHaveAttribute_1.toHaveAttribute,
62
+ toHaveValue: toHaveValue_1.toHaveValue,
63
+ toHaveText: toHaveText_1.toHaveText,
64
+ toHaveCount: toHaveCount_1.toHaveCount,
75
65
  toHaveHref: toHaveHref_1.toHaveHref,
76
66
  toHaveItems: toHaveItems_1.toHaveItems,
77
67
  toHaveError: toHaveError_1.toHaveError,
@@ -79,11 +69,90 @@ var matchers = {
79
69
  toHaveActiveTab: toHaveActiveTab_1.toHaveActiveTab,
80
70
  toHavePageCount: toHavePageCount_1.toHavePageCount,
81
71
  toHaveActivePage: toHaveActivePage_1.toHaveActivePage,
72
+ toHaveFormattedValue: toHaveFormattedValue_1.toHaveFormattedValue,
73
+ toHaveFormattedText: toHaveFormattedText_1.toHaveFormattedText,
82
74
  toContainItems: toContainItems_1.toContainItems,
83
75
  toContainItem: toContainItem_1.toContainItem,
84
76
  toContainTokens: toContainTokens_1.toContainTokens,
85
77
  toContainTabs: toContainTabs_1.toContainTabs,
86
78
  toContainSelectValue: toContainSelectValue_1.toContainSelectValue,
87
79
  toContainUploadedFiles: toContainUploadedFiles_1.toContainUploadedFiles,
80
+ toContainText: toContainText_1.toContainText,
81
+ toContainFormattedText: toContainFormattedText_1.toContainFormattedText,
82
+ /**
83
+ * @deprecated will be removed in the next major version
84
+ * @see {@link toBeVisible}
85
+ */
86
+ toBeEmptyEx: toBeEmpty_1.toBeEmpty,
87
+ /**
88
+ * @deprecated will be removed in the next major version
89
+ * @see {@link toBeVisible}
90
+ */
91
+ toBeVisibleEx: toBeVisible_1.toBeVisible,
92
+ /**
93
+ * @deprecated will be removed in the next major version
94
+ * @see {@link toBeHidden}
95
+ */
96
+ toBeHiddenEx: toBeHidden_1.toBeHidden,
97
+ /**
98
+ * @deprecated will be removed in the next major version
99
+ * @see {@link toBeEnabled}
100
+ */
101
+ toBeEnabledEx: toBeEnabled_1.toBeEnabled,
102
+ /**
103
+ * @deprecated will be removed in the next major version
104
+ * @see {@link toBeDisabled}
105
+ */
106
+ toBeDisabledEx: toBeDisabled_1.toBeDisabled,
107
+ /**
108
+ * @deprecated will be removed in the next major version
109
+ * @see {@link toBeFocused}
110
+ */
111
+ toBeFocusedEx: toBeFocused_1.toBeFocused,
112
+ /**
113
+ * @deprecated will be removed in the next major version
114
+ * @see {@link toBeChecked}
115
+ */
116
+ toBeCheckedEx: toBeChecked_1.toBeChecked,
117
+ /**
118
+ * @deprecated will be removed in the next major version
119
+ * @see {@link toHaveAttribute}
120
+ */
121
+ toHaveAttributeEx: toHaveAttribute_1.toHaveAttribute,
122
+ /**
123
+ * @deprecated will be removed in the next major version
124
+ * @see {@link toHaveValue}
125
+ */
126
+ toHaveValueEx: toHaveValue_1.toHaveValue,
127
+ /**
128
+ * @deprecated will be removed in the next major version
129
+ * @see {@link toHaveText}
130
+ */
131
+ toHaveTextEx: toHaveText_1.toHaveText,
132
+ /**
133
+ * @deprecated will be removed in the next major version
134
+ * @see {@link toHaveCount}
135
+ */
136
+ toHaveCountEx: toHaveCount_1.toHaveCount,
137
+ /**
138
+ * @deprecated will be removed in the next major version
139
+ * @see {@link toHaveFormattedValue}
140
+ */
141
+ toHaveFormattedValueEx: toHaveFormattedValue_1.toHaveFormattedValue,
142
+ /**
143
+ * @deprecated will be removed in the next major version
144
+ * @see {@link toHaveFormattedText}
145
+ */
146
+ toHaveFormattedTextEx: toHaveFormattedText_1.toHaveFormattedText,
147
+ /**
148
+ * @deprecated will be removed in the next major version
149
+ * @see {@link toContainText}
150
+ */
151
+ toContainTextEx: toContainText_1.toContainText,
152
+ /**
153
+ * @deprecated will be removed in the next major version
154
+ * @see {@link toContainFormattedText}
155
+ */
156
+ toContainFormattedTextEx: toContainFormattedText_1.toContainFormattedText,
88
157
  };
89
158
  exports.componentMatchers = test_1.expect.extend(matchers);
@@ -70,3 +70,39 @@ export declare function createComponentAsyncMatcher<TComponent, TArgs extends un
70
70
  * );
71
71
  */
72
72
  export declare function createAsyncMatcher<TLocatorSymbolInterface extends Record<symbol, LocatorTypeFn>, TArgs extends unknown[], TComponent = unknown>(matcherName: string, getLocator: (component: TComponent & TLocatorSymbolInterface) => LocatorType, createMatcherLogicAsync: (params: CreateMatcherLogicParams<TComponent>, ...args: TArgs) => Promise<void>, createExpectMessage?: (isNot: boolean, ...args: TArgs) => string): (this: ExpectMatcherState, component: TComponent & TLocatorSymbolInterface, ...args: TArgs) => Promise<MatcherReturnType>;
73
+ /**
74
+ * Создает асинхронный типизированный матчер для компонента с символом локатора
75
+ *
76
+ *
77
+ * @param matcherName - уникальное имя матчера
78
+ * @param componentSymbol - символ локатора компонента
79
+ * @param createMatcherLogicAsync - асинхронная функция для создания логики матчера
80
+ * @param createExpectMessage - функция для создания сообщения для ожидания
81
+ *
82
+ * @example
83
+ * export type ToExampleLocator = {
84
+ * [toExampleLocator]: () => Locator;
85
+ * }
86
+ *
87
+ * export const toExampleLocator = Symbol.for('toExampleLocator');
88
+ *
89
+ * Дженерик аргументы:
90
+ *
91
+ * createSymbolMatcher<TLocatorSymbolInterface, TArgs, Component>
92
+ * - TLocatorSymbolInterface - тип с символом локатора
93
+ * - TArgs - массив аргументов матчера
94
+ * - TComponent - тип компонента
95
+ *
96
+ *
97
+ * const toExample = createSymbolMatcher<ToExampleExLocator, [AttributeOptions?], Component>(
98
+ * 'toExample',
99
+ * toExampleExLocator,
100
+ * async ({ isNot, locator, component }, options) => {
101
+ * await component.waitFor();
102
+ * const expectation = isNot ? baseExpect(locator).not : baseExpect(locator);
103
+ * await expectation.toBeEmpty();
104
+ * },
105
+ * isNot => (isNot ? 'not to be example' : 'to be example'),
106
+ * );
107
+ */
108
+ export declare function createSymbolMatcher<TLocatorSymbolInterface extends Record<symbol, LocatorTypeFn>, TArgs extends unknown[], TComponent = unknown>(matcherName: string, componentSymbol: symbol, createMatcherLogicAsync: (params: CreateMatcherLogicParams<TComponent>, ...args: TArgs) => Promise<void>, createExpectMessage?: (isNot: boolean, ...args: TArgs) => string): (this: ExpectMatcherState, component: TComponent & TLocatorSymbolInterface, ...args: TArgs) => Promise<MatcherReturnType>;
@@ -47,6 +47,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
48
  exports.createComponentAsyncMatcher = createComponentAsyncMatcher;
49
49
  exports.createAsyncMatcher = createAsyncMatcher;
50
+ exports.createSymbolMatcher = createSymbolMatcher;
50
51
  var utils_1 = require("../utils");
51
52
  var utils_2 = require("../utils");
52
53
  /**
@@ -178,3 +179,78 @@ function createAsyncMatcher(matcherName, getLocator, createMatcherLogicAsync, cr
178
179
  });
179
180
  };
180
181
  }
182
+ /**
183
+ * Создает асинхронный типизированный матчер для компонента с символом локатора
184
+ *
185
+ *
186
+ * @param matcherName - уникальное имя матчера
187
+ * @param componentSymbol - символ локатора компонента
188
+ * @param createMatcherLogicAsync - асинхронная функция для создания логики матчера
189
+ * @param createExpectMessage - функция для создания сообщения для ожидания
190
+ *
191
+ * @example
192
+ * export type ToExampleLocator = {
193
+ * [toExampleLocator]: () => Locator;
194
+ * }
195
+ *
196
+ * export const toExampleLocator = Symbol.for('toExampleLocator');
197
+ *
198
+ * Дженерик аргументы:
199
+ *
200
+ * createSymbolMatcher<TLocatorSymbolInterface, TArgs, Component>
201
+ * - TLocatorSymbolInterface - тип с символом локатора
202
+ * - TArgs - массив аргументов матчера
203
+ * - TComponent - тип компонента
204
+ *
205
+ *
206
+ * const toExample = createSymbolMatcher<ToExampleExLocator, [AttributeOptions?], Component>(
207
+ * 'toExample',
208
+ * toExampleExLocator,
209
+ * async ({ isNot, locator, component }, options) => {
210
+ * await component.waitFor();
211
+ * const expectation = isNot ? baseExpect(locator).not : baseExpect(locator);
212
+ * await expectation.toBeEmpty();
213
+ * },
214
+ * isNot => (isNot ? 'not to be example' : 'to be example'),
215
+ * );
216
+ */
217
+ function createSymbolMatcher(matcherName, componentSymbol, createMatcherLogicAsync, createExpectMessage) {
218
+ return function matcher(component) {
219
+ var args = [];
220
+ for (var _i = 1; _i < arguments.length; _i++) {
221
+ args[_i - 1] = arguments[_i];
222
+ }
223
+ return __awaiter(this, void 0, void 0, function () {
224
+ var locatorResult, _a, locator;
225
+ var _this = this;
226
+ return __generator(this, function (_b) {
227
+ switch (_b.label) {
228
+ case 0:
229
+ if (!component[componentSymbol]) return [3 /*break*/, 2];
230
+ return [4 /*yield*/, component[componentSymbol]()];
231
+ case 1:
232
+ _a = _b.sent();
233
+ return [3 /*break*/, 3];
234
+ case 2:
235
+ _a = component;
236
+ _b.label = 3;
237
+ case 3:
238
+ locatorResult = _a;
239
+ locator = locatorResult;
240
+ return [2 /*return*/, (0, utils_2.toMatchMessage)(this, matcherName, locator, function (isNot, locator) {
241
+ return (0, utils_1.makeMatcher)(isNot, function () { return __awaiter(_this, void 0, void 0, function () {
242
+ return __generator(this, function (_a) {
243
+ switch (_a.label) {
244
+ case 0: return [4 /*yield*/, createMatcherLogicAsync.apply(void 0, __spreadArray([{ isNot: isNot, locator: locator, component: component }], args, false))];
245
+ case 1:
246
+ _a.sent();
247
+ return [2 /*return*/];
248
+ }
249
+ });
250
+ }); });
251
+ }, createExpectMessage === null || createExpectMessage === void 0 ? void 0 : createExpectMessage.apply(void 0, __spreadArray([this.isNot], args, false)))];
252
+ }
253
+ });
254
+ });
255
+ };
256
+ }
@@ -1,2 +1 @@
1
- export * from './formattedMatchers';
2
1
  export * from './componentMatchers';