@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.
- package/LICENSE +190 -0
- package/core/accordion.harness.d.ts +0 -1
- package/core/avatar.harness.d.ts +1 -1
- package/core/badge.harness.d.ts +3 -3
- package/core/{primitive-calender.harness.d.ts → calendar-sheet.harness.d.ts} +1 -1
- package/core/{primitive-year-month-pagination.harness.d.ts → calendar-spin.harness.d.ts} +1 -1
- package/core/{primitive-year-picker.harness.d.ts → calendar-year.harness.d.ts} +1 -1
- package/core/calendar.harness.d.ts +3 -3
- package/core/card.harness.d.ts +0 -6
- package/core/dialog.harness.d.ts +6 -0
- package/core/{hosted-dropdown.harness.d.ts → dropdown-open.harness.d.ts} +1 -1
- package/core/index.d.ts +6 -6
- package/core/island.harness.d.ts +1 -1
- package/core/select.harness.d.ts +1 -1
- package/core/{primitive-spin-button.harness.d.ts → spin-button.harness.d.ts} +1 -1
- package/core/tag.harness.d.ts +2 -3
- package/esm2022/core/accordion-item.harness.mjs +32 -0
- package/esm2022/core/accordion.harness.mjs +6 -0
- package/esm2022/core/avatar.harness.mjs +9 -0
- package/esm2022/core/badge.harness.mjs +15 -0
- package/esm2022/core/button.harness.mjs +17 -0
- package/esm2022/core/calendar-sheet.harness.mjs +30 -0
- package/esm2022/core/calendar-spin.harness.mjs +33 -0
- package/esm2022/core/calendar-year.harness.mjs +23 -0
- package/esm2022/core/calendar.harness.mjs +51 -0
- package/esm2022/core/card.harness.mjs +15 -0
- package/esm2022/core/dialog.harness.mjs +12 -0
- package/esm2022/core/dropdown-open.harness.mjs +13 -0
- package/esm2022/core/index.mjs +21 -0
- package/esm2022/core/island.harness.mjs +39 -0
- package/esm2022/core/loader.harness.mjs +20 -0
- package/esm2022/core/primitive-textfield.harness.mjs +12 -0
- package/esm2022/core/select.harness.mjs +17 -0
- package/esm2022/core/spin-button.harness.mjs +13 -0
- package/esm2022/core/svg.harness.mjs +18 -0
- package/esm2022/core/tag.harness.mjs +26 -0
- package/esm2022/core/textfield.harness.mjs +9 -0
- package/esm2022/mocks/event.mjs +14 -0
- package/esm2022/mocks/sanitizer.mjs +13 -0
- package/esm2022/setup-jest/index.mjs +119 -0
- package/esm2022/utils/active-element.mjs +12 -0
- package/esm2022/utils/configure-test-suite.mjs +32 -0
- package/esm2022/utils/date.mjs +18 -0
- package/esm2022/utils/helpers.mjs +34 -0
- package/esm2022/utils/input/cleaner.unit-common.mjs +79 -0
- package/esm2022/utils/input/filler.unit-common.mjs +48 -0
- package/esm2022/utils/input/form-control-state.unit-common.mjs +36 -0
- package/{esm2015/utils/input/placeholder.unit-common.js → esm2022/utils/input/placeholder.unit-common.mjs} +17 -17
- package/esm2022/utils/input/tooltip.unit-common.mjs +46 -0
- package/esm2022/utils/keyboard-event.mjs +9 -0
- package/esm2022/utils/native-input.page-object.mjs +53 -0
- package/esm2022/utils/page-object.mjs +25 -0
- package/esm2022/utils/replace-nbsp.mjs +5 -0
- package/{esm2015/utils/viewport.js → esm2022/utils/viewport.mjs} +5 -5
- package/fesm2022/taiga-ui-testing-core.mjs +365 -0
- package/fesm2022/taiga-ui-testing-core.mjs.map +1 -0
- package/{fesm2015/taiga-ui-testing-exceptions.js → fesm2022/taiga-ui-testing-exceptions.mjs} +1 -1
- package/fesm2022/taiga-ui-testing-exceptions.mjs.map +1 -0
- package/{fesm2015/taiga-ui-testing-mocks.js → fesm2022/taiga-ui-testing-mocks.mjs} +5 -3
- package/fesm2022/taiga-ui-testing-mocks.mjs.map +1 -0
- package/{fesm2015/taiga-ui-testing-setup-jest.js → fesm2022/taiga-ui-testing-setup-jest.mjs} +21 -21
- package/fesm2022/taiga-ui-testing-setup-jest.mjs.map +1 -0
- package/{fesm2015/taiga-ui-testing-utils.js → fesm2022/taiga-ui-testing-utils.mjs} +94 -104
- package/fesm2022/taiga-ui-testing-utils.mjs.map +1 -0
- package/{fesm2015/taiga-ui-testing.js → fesm2022/taiga-ui-testing.mjs} +1 -1
- package/fesm2022/taiga-ui-testing.mjs.map +1 -0
- package/mocks/sanitizer.d.ts +1 -1
- package/package.json +49 -13
- package/utils/active-element.d.ts +1 -1
- package/utils/configure-test-suite.d.ts +2 -1
- package/utils/helpers.d.ts +2 -1
- package/utils/input/cleaner.unit-common.d.ts +6 -6
- package/utils/input/filler.unit-common.d.ts +6 -6
- package/utils/input/form-control-state.unit-common.d.ts +5 -5
- package/utils/input/placeholder.unit-common.d.ts +5 -5
- package/utils/input/tooltip.unit-common.d.ts +5 -5
- package/utils/native-input.page-object.d.ts +4 -5
- package/utils/page-object.d.ts +2 -2
- package/bundles/taiga-ui-testing-core.umd.js +0 -1388
- package/bundles/taiga-ui-testing-core.umd.js.map +0 -1
- package/bundles/taiga-ui-testing-cypress.umd.js +0 -484
- package/bundles/taiga-ui-testing-cypress.umd.js.map +0 -1
- package/bundles/taiga-ui-testing-exceptions.umd.js +0 -351
- package/bundles/taiga-ui-testing-exceptions.umd.js.map +0 -1
- package/bundles/taiga-ui-testing-mocks.umd.js +0 -369
- package/bundles/taiga-ui-testing-mocks.umd.js.map +0 -1
- package/bundles/taiga-ui-testing-setup-jest.umd.js +0 -135
- package/bundles/taiga-ui-testing-setup-jest.umd.js.map +0 -1
- package/bundles/taiga-ui-testing-utils.umd.js +0 -933
- package/bundles/taiga-ui-testing-utils.umd.js.map +0 -1
- package/bundles/taiga-ui-testing.umd.js +0 -46
- package/bundles/taiga-ui-testing.umd.js.map +0 -1
- package/core/action.harness.d.ts +0 -7
- package/core/marker-icon.harness.d.ts +0 -4
- package/core/package.json +0 -10
- package/core/taiga-ui-testing-core.d.ts +0 -5
- package/core/toggle.harness.d.ts +0 -8
- package/cypress/assertions/be-in-viewport.d.ts +0 -14
- package/cypress/assertions/index.d.ts +0 -1
- package/cypress/commands/wait-all-img-inside.command.d.ts +0 -2
- package/cypress/index.d.ts +0 -4
- package/cypress/package.json +0 -10
- package/cypress/snapshot/command.d.ts +0 -16
- package/cypress/snapshot/plugin.d.ts +0 -9
- package/cypress/taiga-ui-testing-cypress.d.ts +0 -5
- package/esm2015/core/accordion-item.harness.js +0 -49
- package/esm2015/core/accordion.harness.js +0 -11
- package/esm2015/core/action.harness.js +0 -16
- package/esm2015/core/avatar.harness.js +0 -11
- package/esm2015/core/badge.harness.js +0 -21
- package/esm2015/core/button.harness.js +0 -21
- package/esm2015/core/calendar.harness.js +0 -84
- package/esm2015/core/card.harness.js +0 -25
- package/esm2015/core/hosted-dropdown.harness.js +0 -17
- package/esm2015/core/index.js +0 -21
- package/esm2015/core/island.harness.js +0 -53
- package/esm2015/core/loader.harness.js +0 -25
- package/esm2015/core/marker-icon.harness.js +0 -5
- package/esm2015/core/primitive-calender.harness.js +0 -40
- package/esm2015/core/primitive-spin-button.harness.js +0 -17
- package/esm2015/core/primitive-textfield.harness.js +0 -16
- package/esm2015/core/primitive-year-month-pagination.harness.js +0 -49
- package/esm2015/core/primitive-year-picker.harness.js +0 -29
- package/esm2015/core/select.harness.js +0 -21
- package/esm2015/core/svg.harness.js +0 -27
- package/esm2015/core/tag.harness.js +0 -39
- package/esm2015/core/textfield.harness.js +0 -11
- package/esm2015/core/toggle.harness.js +0 -21
- package/esm2015/cypress/assertions/be-in-viewport.js +0 -28
- package/esm2015/cypress/assertions/index.js +0 -2
- package/esm2015/cypress/commands/wait-all-img-inside.command.js +0 -62
- package/esm2015/cypress/index.js +0 -5
- package/esm2015/cypress/snapshot/command.js +0 -25
- package/esm2015/cypress/snapshot/plugin.js +0 -26
- package/esm2015/cypress/taiga-ui-testing-cypress.js +0 -5
- package/esm2015/mocks/event.js +0 -12
- package/esm2015/mocks/sanitizer.js +0 -13
- package/esm2015/setup-jest/index.js +0 -119
- package/esm2015/utils/active-element.js +0 -14
- package/esm2015/utils/configure-test-suite.js +0 -32
- package/esm2015/utils/date.js +0 -18
- package/esm2015/utils/helpers.js +0 -36
- package/esm2015/utils/input/cleaner.unit-common.js +0 -79
- package/esm2015/utils/input/filler.unit-common.js +0 -50
- package/esm2015/utils/input/form-control-state.unit-common.js +0 -37
- package/esm2015/utils/input/tooltip.unit-common.js +0 -46
- package/esm2015/utils/keyboard-event.js +0 -9
- package/esm2015/utils/native-input.page-object.js +0 -58
- package/esm2015/utils/page-object.js +0 -25
- package/esm2015/utils/replace-nbsp.js +0 -6
- package/exceptions/package.json +0 -10
- package/exceptions/taiga-ui-testing-exceptions.d.ts +0 -5
- package/fesm2015/taiga-ui-testing-core.js +0 -557
- package/fesm2015/taiga-ui-testing-core.js.map +0 -1
- package/fesm2015/taiga-ui-testing-cypress.js +0 -145
- package/fesm2015/taiga-ui-testing-cypress.js.map +0 -1
- package/fesm2015/taiga-ui-testing-exceptions.js.map +0 -1
- package/fesm2015/taiga-ui-testing-mocks.js.map +0 -1
- package/fesm2015/taiga-ui-testing-setup-jest.js.map +0 -1
- package/fesm2015/taiga-ui-testing-utils.js.map +0 -1
- package/fesm2015/taiga-ui-testing.js.map +0 -1
- package/mocks/package.json +0 -10
- package/mocks/taiga-ui-testing-mocks.d.ts +0 -5
- package/setup-jest/package.json +0 -10
- package/setup-jest/taiga-ui-testing-setup-jest.d.ts +0 -5
- package/taiga-ui-testing.d.ts +0 -5
- package/utils/package.json +0 -10
- package/utils/taiga-ui-testing-utils.d.ts +0 -5
- /package/{esm2015/core/taiga-ui-testing-core.js → esm2022/core/taiga-ui-testing-core.mjs} +0 -0
- /package/{esm2015/exceptions/element-is-not-input.exception.js → esm2022/exceptions/element-is-not-input.exception.mjs} +0 -0
- /package/{esm2015/exceptions/field-not-found.exception.js → esm2022/exceptions/field-not-found.exception.mjs} +0 -0
- /package/{esm2015/exceptions/index.js → esm2022/exceptions/index.mjs} +0 -0
- /package/{esm2015/exceptions/taiga-ui-testing-exceptions.js → esm2022/exceptions/taiga-ui-testing-exceptions.mjs} +0 -0
- /package/{esm2015/index.js → esm2022/index.mjs} +0 -0
- /package/{esm2015/mocks/index.js → esm2022/mocks/index.mjs} +0 -0
- /package/{esm2015/mocks/switch-ng-dev-mode.js → esm2022/mocks/switch-ng-dev-mode.mjs} +0 -0
- /package/{esm2015/mocks/taiga-ui-testing-mocks.js → esm2022/mocks/taiga-ui-testing-mocks.mjs} +0 -0
- /package/{esm2015/setup-jest/taiga-ui-testing-setup-jest.js → esm2022/setup-jest/taiga-ui-testing-setup-jest.mjs} +0 -0
- /package/{esm2015/taiga-ui-testing.js → esm2022/taiga-ui-testing.mjs} +0 -0
- /package/{esm2015/utils/index.js → esm2022/utils/index.mjs} +0 -0
- /package/{esm2015/utils/taiga-ui-testing-utils.js → esm2022/utils/taiga-ui-testing-utils.mjs} +0 -0
package/LICENSE
ADDED
@@ -0,0 +1,190 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
Copyright 2024 Acpekt
|
179
|
+
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
181
|
+
you may not use this file except in compliance with the License.
|
182
|
+
You may obtain a copy of the License at
|
183
|
+
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
185
|
+
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
189
|
+
See the License for the specific language governing permissions and
|
190
|
+
limitations under the License.
|
package/core/avatar.harness.d.ts
CHANGED
package/core/badge.harness.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
2
2
|
export declare class TuiBadgeHarness extends TuiComponentHarness {
|
3
3
|
static hostSelector: string;
|
4
|
-
text(): Promise<string>;
|
5
|
-
padding(): Promise<string | null>;
|
6
|
-
hasClass(cls: string): Promise<boolean>;
|
4
|
+
protected text(): Promise<string>;
|
5
|
+
protected padding(): Promise<string | null>;
|
6
|
+
protected hasClass(cls: string): Promise<boolean>;
|
7
7
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
2
|
-
export declare class
|
2
|
+
export declare class TuiCalendarSheetHarness extends TuiComponentHarness {
|
3
3
|
static hostSelector: string;
|
4
4
|
clickDay(day: number): Promise<void>;
|
5
5
|
hoverDay(day: number): Promise<void>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
2
|
-
export declare class
|
2
|
+
export declare class TuiCalendarSpinHarness extends TuiComponentHarness {
|
3
3
|
static hostSelector: string;
|
4
4
|
private readonly buttonLeft;
|
5
5
|
private readonly content;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
2
|
-
export declare class
|
2
|
+
export declare class TuiCalendarYearHarness extends TuiComponentHarness {
|
3
3
|
static hostSelector: string;
|
4
4
|
clickYear(year: string): Promise<void>;
|
5
5
|
}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
2
2
|
export declare class TuiCalendarHarness extends TuiComponentHarness {
|
3
3
|
static hostSelector: string;
|
4
|
-
private readonly
|
5
|
-
private readonly
|
6
|
-
private readonly
|
4
|
+
private readonly getCalendarYearHarness;
|
5
|
+
private readonly getCalendarSpinHarness;
|
6
|
+
private readonly getCalendarSheetHarness;
|
7
7
|
yearPickerShown(): Promise<boolean>;
|
8
8
|
yearMonthPaginationShown(): Promise<boolean>;
|
9
9
|
primitiveCalendarShown(): Promise<boolean>;
|
package/core/card.harness.d.ts
CHANGED
@@ -4,9 +4,3 @@ export declare class TuiThumbnailCardHarness extends TuiComponentHarness {
|
|
4
4
|
hasPaymentSystemLogo(): Promise<boolean>;
|
5
5
|
hasBrandLogo(): Promise<boolean>;
|
6
6
|
}
|
7
|
-
/**
|
8
|
-
* @deprecated use {@link TuiThumbnailCardHarness}
|
9
|
-
*/
|
10
|
-
export declare class TuiCardHarness extends TuiThumbnailCardHarness {
|
11
|
-
static hostSelector: string;
|
12
|
-
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { TuiContentContainerComponentHarness } from '@taiga-ui/testing/utils';
|
2
|
+
import { TuiButtonHarness } from './button.harness';
|
3
|
+
export declare class TuiDialogHarness extends TuiContentContainerComponentHarness {
|
4
|
+
static hostSelector: string;
|
5
|
+
getCloseButton(): Promise<TuiButtonHarness | null>;
|
6
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TuiContentContainerComponentHarness } from '@taiga-ui/testing/utils';
|
2
|
-
export declare class
|
2
|
+
export declare class TuiDropdownOpenHarness extends TuiContentContainerComponentHarness {
|
3
3
|
static hostSelector: string;
|
4
4
|
sendSpaceKey(): Promise<void>;
|
5
5
|
sendEscKey(): Promise<void>;
|
package/core/index.d.ts
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
export * from './accordion.harness';
|
2
2
|
export * from './accordion-item.harness';
|
3
|
-
export * from './action.harness';
|
4
3
|
export * from './avatar.harness';
|
5
4
|
export * from './badge.harness';
|
6
5
|
export * from './button.harness';
|
7
6
|
export * from './calendar.harness';
|
7
|
+
export * from './calendar-sheet.harness';
|
8
|
+
export * from './calendar-spin.harness';
|
9
|
+
export * from './calendar-year.harness';
|
8
10
|
export * from './card.harness';
|
9
|
-
export * from './
|
11
|
+
export * from './dialog.harness';
|
12
|
+
export * from './dropdown-open.harness';
|
10
13
|
export * from './island.harness';
|
11
14
|
export * from './loader.harness';
|
12
|
-
export * from './marker-icon.harness';
|
13
|
-
export * from './primitive-calender.harness';
|
14
|
-
export * from './primitive-spin-button.harness';
|
15
15
|
export * from './primitive-textfield.harness';
|
16
16
|
export * from './select.harness';
|
17
|
+
export * from './spin-button.harness';
|
17
18
|
export * from './svg.harness';
|
18
19
|
export * from './tag.harness';
|
19
20
|
export * from './textfield.harness';
|
20
|
-
export * from './toggle.harness';
|
package/core/island.harness.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { TuiSizeL, TuiSizeS } from '@taiga-ui/core';
|
1
|
+
import type { TuiSizeL, TuiSizeS } from '@taiga-ui/core/types';
|
2
2
|
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
3
3
|
export declare class TuiIslandHarness extends TuiComponentHarness {
|
4
4
|
static hostSelector: string;
|
package/core/select.harness.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
2
2
|
export declare class TuiSelectHarness extends TuiComponentHarness {
|
3
3
|
static hostSelector: string;
|
4
|
-
private readonly
|
4
|
+
private readonly dropdown;
|
5
5
|
sendSpaceKey(): Promise<void>;
|
6
6
|
sendEscKey(): Promise<void>;
|
7
7
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
2
|
-
export declare class
|
2
|
+
export declare class TuiSpinButtonHarness extends TuiComponentHarness {
|
3
3
|
static hostSelector: string;
|
4
4
|
isLeftDisabled(): Promise<boolean>;
|
5
5
|
isRightDisabled(): Promise<boolean>;
|
package/core/tag.harness.d.ts
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
import { TestElement } from '@angular/cdk/testing';
|
1
|
+
import type { TestElement } from '@angular/cdk/testing';
|
2
2
|
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
3
|
-
import { TuiSvgHarness } from './svg.harness';
|
4
3
|
export declare class TuiTagHarness extends TuiComponentHarness {
|
5
4
|
static hostSelector: string;
|
6
|
-
getCrossIcon(): Promise<
|
5
|
+
getCrossIcon(): Promise<TestElement | null>;
|
7
6
|
getBackgroundColor(): Promise<string>;
|
8
7
|
getInput(): Promise<TestElement | null>;
|
9
8
|
sendEnter(): Promise<void>;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { TestKey } from '@angular/cdk/testing';
|
2
|
+
import { TuiContentContainerComponentHarness } from '@taiga-ui/testing/utils';
|
3
|
+
class TuiAccordionItemHarness extends TuiContentContainerComponentHarness {
|
4
|
+
constructor() {
|
5
|
+
super(...arguments);
|
6
|
+
this.header = this.locatorFor('.t-header');
|
7
|
+
}
|
8
|
+
static { this.hostSelector = 'tui-accordion-item'; }
|
9
|
+
async getTitle() {
|
10
|
+
return (await this.locatorFor('.t-title')()).text();
|
11
|
+
}
|
12
|
+
async getContent() {
|
13
|
+
return (await this.locatorForOptional('.t-content')())?.text() ?? null;
|
14
|
+
}
|
15
|
+
async clickHeader() {
|
16
|
+
return (await this.locatorFor('.t-header')()).click();
|
17
|
+
}
|
18
|
+
async getBorders() {
|
19
|
+
return (await this.host()).getAttribute('data-borders');
|
20
|
+
}
|
21
|
+
async hasArrow() {
|
22
|
+
return !!(await this.locatorForOptional('.t-icon')()) ?? false;
|
23
|
+
}
|
24
|
+
async focus() {
|
25
|
+
return (await this.header()).focus();
|
26
|
+
}
|
27
|
+
async sendEscKey() {
|
28
|
+
return (await this.header()).sendKeys(TestKey.ESCAPE);
|
29
|
+
}
|
30
|
+
}
|
31
|
+
export { TuiAccordionItemHarness };
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3JkaW9uLWl0ZW0uaGFybmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3Rlc3RpbmcvY29yZS9hY2NvcmRpb24taXRlbS5oYXJuZXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ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9uYWwoJy50LWNvbnRlbnQnKSgpKT8udGV4dCgpID8/IG51bGw7XG4gICAgfVxuXG4gICAgcHVibGljIGFzeW5jIGNsaWNrSGVhZGVyKCk6IFByb21pc2U8dm9pZD4ge1xuICAgICAgICByZXR1cm4gKGF3YWl0IHRoaXMubG9jYXRvckZvcignLnQtaGVhZGVyJykoKSkuY2xpY2soKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgYXN5bmMgZ2V0Qm9yZGVycygpOiBQcm9taXNlPHN0cmluZyB8IG51bGw+IHtcbiAgICAgICAgcmV0dXJuIChhd2FpdCB0aGlzLmhvc3QoKSkuZ2V0QXR0cmlidXRlKCdkYXRhLWJvcmRlcnMnKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgYXN5bmMgaGFzQXJyb3coKTogUHJvbWlzZTxib29sZWFuPiB7XG4gICAgICAgIHJldHVybiAhIShhd2FpdCB0aGlzLmxvY2F0b3JGb3JPcHRpb25hbCgnLnQtaWNvbicpKCkpID8/IGZhbHNlO1xuICAgIH1cblxuICAgIHB1YmxpYyBhc3luYyBmb2N1cygpOiBQcm9taXNlPHZvaWQ+IHtcbiAgICAgICAgcmV0dXJuIChhd2FpdCB0aGlzLmhlYWRlcigpKS5mb2N1cygpO1xuICAgIH1cblxuICAgIHB1YmxpYyBhc3luYyBzZW5kRXNjS2V5KCk6IFByb21pc2U8dm9pZD4ge1xuICAgICAgICByZXR1cm4gKGF3YWl0IHRoaXMuaGVhZGVyKCkpLnNlbmRLZXlzKFRlc3RLZXkuRVNDQVBFKTtcbiAgICB9XG59XG4iXX0=
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { TuiContentContainerComponentHarness } from '@taiga-ui/testing/utils';
|
2
|
+
class TuiAccordionHarness extends TuiContentContainerComponentHarness {
|
3
|
+
static { this.hostSelector = 'tui-accordion'; }
|
4
|
+
}
|
5
|
+
export { TuiAccordionHarness };
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3JkaW9uLmhhcm5lc3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy90ZXN0aW5nL2NvcmUvYWNjb3JkaW9uLmhhcm5lc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLG1DQUFtQyxFQUFDLE1BQU0seUJBQXlCLENBQUM7QUFFNUUsTUFBYSxtQkFBb0IsU0FBUSxtQ0FBbUM7YUFDMUQsaUJBQVksR0FBRyxlQUFlLENBQUM7O1NBRHBDLG1CQUFtQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7VHVpQ29udGVudENvbnRhaW5lckNvbXBvbmVudEhhcm5lc3N9IGZyb20gJ0B0YWlnYS11aS90ZXN0aW5nL3V0aWxzJztcblxuZXhwb3J0IGNsYXNzIFR1aUFjY29yZGlvbkhhcm5lc3MgZXh0ZW5kcyBUdWlDb250ZW50Q29udGFpbmVyQ29tcG9uZW50SGFybmVzcyB7XG4gICAgcHVibGljIHN0YXRpYyBob3N0U2VsZWN0b3IgPSAndHVpLWFjY29yZGlvbic7XG59XG4iXX0=
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
2
|
+
class TuiAvatarHarness extends TuiComponentHarness {
|
3
|
+
static { this.hostSelector = 'tui-avatar'; }
|
4
|
+
async text() {
|
5
|
+
return (await this.host()).text();
|
6
|
+
}
|
7
|
+
}
|
8
|
+
export { TuiAvatarHarness };
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXZhdGFyLmhhcm5lc3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy90ZXN0aW5nL2NvcmUvYXZhdGFyLmhhcm5lc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLG1CQUFtQixFQUFDLE1BQU0seUJBQXlCLENBQUM7QUFFNUQsTUFBYSxnQkFBaUIsU0FBUSxtQkFBbUI7YUFDdkMsaUJBQVksR0FBRyxZQUFZLENBQUM7SUFFaEMsS0FBSyxDQUFDLElBQUk7UUFDaEIsT0FBTyxDQUFDLE1BQU0sSUFBSSxDQUFDLElBQUksRUFBRSxDQUFDLENBQUMsSUFBSSxFQUFFLENBQUM7SUFDdEMsQ0FBQzs7U0FMUSxnQkFBZ0IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1R1aUNvbXBvbmVudEhhcm5lc3N9IGZyb20gJ0B0YWlnYS11aS90ZXN0aW5nL3V0aWxzJztcblxuZXhwb3J0IGNsYXNzIFR1aUF2YXRhckhhcm5lc3MgZXh0ZW5kcyBUdWlDb21wb25lbnRIYXJuZXNzIHtcbiAgICBwdWJsaWMgc3RhdGljIGhvc3RTZWxlY3RvciA9ICd0dWktYXZhdGFyJztcblxuICAgIHByb3RlY3RlZCBhc3luYyB0ZXh0KCk6IFByb21pc2U8c3RyaW5nPiB7XG4gICAgICAgIHJldHVybiAoYXdhaXQgdGhpcy5ob3N0KCkpLnRleHQoKTtcbiAgICB9XG59XG4iXX0=
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
2
|
+
class TuiBadgeHarness extends TuiComponentHarness {
|
3
|
+
static { this.hostSelector = 'tui-badge'; }
|
4
|
+
async text() {
|
5
|
+
return (await this.host()).text();
|
6
|
+
}
|
7
|
+
async padding() {
|
8
|
+
return (await this.host()).getAttribute('data-padding');
|
9
|
+
}
|
10
|
+
async hasClass(cls) {
|
11
|
+
return (await this.host()).hasClass(cls);
|
12
|
+
}
|
13
|
+
}
|
14
|
+
export { TuiBadgeHarness };
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFkZ2UuaGFybmVzcy5qc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ByZXR1cm4gKGF3YWl0IHRoaXMuaG9zdCgpKS50ZXh0KCk7XG4gICAgfVxuXG4gICAgcHJvdGVjdGVkIGFzeW5jIHBhZGRpbmcoKTogUHJvbWlzZTxzdHJpbmcgfCBudWxsPiB7XG4gICAgICAgIHJldHVybiAoYXdhaXQgdGhpcy5ob3N0KCkpLmdldEF0dHJpYnV0ZSgnZGF0YS1wYWRkaW5nJyk7XG4gICAgfVxuXG4gICAgcHJvdGVjdGVkIGFzeW5jIGhhc0NsYXNzKGNsczogc3RyaW5nKTogUHJvbWlzZTxib29sZWFuPiB7XG4gICAgICAgIHJldHVybiAoYXdhaXQgdGhpcy5ob3N0KCkpLmhhc0NsYXNzKGNscyk7XG4gICAgfVxufVxuIl19
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
2
|
+
import { TuiLoaderHarness } from './loader.harness';
|
3
|
+
class TuiButtonHarness extends TuiComponentHarness {
|
4
|
+
constructor() {
|
5
|
+
super(...arguments);
|
6
|
+
this.loader = this.locatorForOptional(TuiLoaderHarness);
|
7
|
+
}
|
8
|
+
static { this.hostSelector = 'button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]'; }
|
9
|
+
async isLoading() {
|
10
|
+
return !!(await this.loader());
|
11
|
+
}
|
12
|
+
async hasClass(input) {
|
13
|
+
return (await this.host()).hasClass(input);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
export { TuiButtonHarness };
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmhhcm5lc3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy90ZXN0aW5nL2NvcmUvYnV0dG9uLmhhcm5lc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLG1CQUFtQixFQUFDLE1BQU0seUJBQX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ZXJIYXJuZXNzKTtcblxuICAgIHB1YmxpYyBhc3luYyBpc0xvYWRpbmcoKTogUHJvbWlzZTxib29sZWFuPiB7XG4gICAgICAgIHJldHVybiAhIShhd2FpdCB0aGlzLmxvYWRlcigpKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgYXN5bmMgaGFzQ2xhc3MoaW5wdXQ6IHN0cmluZyk6IFByb21pc2U8Ym9vbGVhbj4ge1xuICAgICAgICByZXR1cm4gKGF3YWl0IHRoaXMuaG9zdCgpKS5oYXNDbGFzcyhpbnB1dCk7XG4gICAgfVxufVxuIl19
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
2
|
+
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
3
|
+
class TuiDayCellHarness extends ComponentHarness {
|
4
|
+
static { this.hostSelector = '.t-cell:not(.t-cell_unavailable)'; }
|
5
|
+
static with(options) {
|
6
|
+
return new HarnessPredicate(TuiDayCellHarness, options).addOption('day', options.day, async (harness, text) => HarnessPredicate.stringMatches(harness.getText(), `${text}`));
|
7
|
+
}
|
8
|
+
async getText() {
|
9
|
+
return (await this.locatorFor('.t-item')()).text();
|
10
|
+
}
|
11
|
+
async click() {
|
12
|
+
return (await this.host()).click();
|
13
|
+
}
|
14
|
+
async hover() {
|
15
|
+
return (await this.host()).hover();
|
16
|
+
}
|
17
|
+
}
|
18
|
+
class TuiCalendarSheetHarness extends TuiComponentHarness {
|
19
|
+
static { this.hostSelector = 'tui-calendar-sheet'; }
|
20
|
+
async clickDay(day) {
|
21
|
+
const dayCell = await this.locatorFor(TuiDayCellHarness.with({ day, ancestor: '.t-row:not(.t-row_weekday)' }))();
|
22
|
+
return dayCell.click();
|
23
|
+
}
|
24
|
+
async hoverDay(day) {
|
25
|
+
const dayCell = await this.locatorFor(TuiDayCellHarness.with({ day, ancestor: '.t-row:not(.t-row_weekday)' }))();
|
26
|
+
return dayCell.hover();
|
27
|
+
}
|
28
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HVybiAoYXdhaXQgdGhpcy5ob3N0KCkpLmNsaWNrKCk7XG4gICAgfVxuXG4gICAgcHVibGljIGFzeW5jIGhvdmVyKCk6IFByb21pc2U8dm9pZD4ge1xuICAgICAgICByZXR1cm4gKGF3YWl0IHRoaXMuaG9zdCgpKS5ob3ZlcigpO1xuICAgIH1cbn1cblxuZXhwb3J0IGNsYXNzIFR1aUNhbGVuZGFyU2hlZXRIYXJuZXNzIGV4dGVuZHMgVHVpQ29tcG9uZW50SGFybmVzcyB7XG4gICAgcHVibGljIHN0YXRpYyBob3N0U2VsZWN0b3IgPSAndHVpLWNhbGVuZGFyLXNoZWV0JztcblxuICAgIHB1YmxpYyBhc3luYyBjbGlja0RheShkYXk6IG51bWJlcik6IFByb21pc2U8dm9pZD4ge1xuICAgICAgICBjb25zdCBkYXlDZWxsID0gYXdhaXQgdGhpcy5sb2NhdG9yRm9yKFxuICAgICAgICAgICAgVHVpRGF5Q2VsbEhhcm5lc3Mud2l0aCh7ZGF5LCBhbmNlc3RvcjogJy50LXJvdzpub3QoLnQtcm93X3dlZWtkYXkpJ30pLFxuICAgICAgICApKCk7XG5cbiAgICAgICAgcmV0dXJuIGRheUNlbGwuY2xpY2soKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgYXN5bmMgaG92ZXJEYXkoZGF5OiBudW1iZXIpOiBQcm9taXNlPHZvaWQ+IHtcbiAgICAgICAgY29uc3QgZGF5Q2VsbCA9IGF3YWl0IHRoaXMubG9jYXRvckZvcihcbiAgICAgICAgICAgIFR1aURheUNlbGxIYXJuZXNzLndpdGgoe2RheSwgYW5jZXN0b3I6ICcudC1yb3c6bm90KC50LXJvd193ZWVrZGF5KSd9KSxcbiAgICAgICAgKSgpO1xuXG4gICAgICAgIHJldHVybiBkYXlDZWxsLmhvdmVyKCk7XG4gICAgfVxufVxuIl19
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
2
|
+
import { TuiSpinButtonHarness } from './spin-button.harness';
|
3
|
+
class TuiCalendarSpinHarness extends TuiComponentHarness {
|
4
|
+
constructor() {
|
5
|
+
super(...arguments);
|
6
|
+
this.buttonLeft = this.locatorForOptional('button[tuiIconButton]:first-child');
|
7
|
+
this.content = this.locatorForOptional('.t-calendar-title');
|
8
|
+
this.buttonRight = this.locatorForOptional('button[tuiIconButton]:last-child');
|
9
|
+
this.button = this.locatorForOptional('#year-btn');
|
10
|
+
this.primitiveSpinButton = this.locatorFor(TuiSpinButtonHarness);
|
11
|
+
}
|
12
|
+
static { this.hostSelector = 'tui-calendar-spin'; }
|
13
|
+
async clickLeft() {
|
14
|
+
return (await this.buttonLeft())?.click();
|
15
|
+
}
|
16
|
+
async getContentText() {
|
17
|
+
return (await this.content())?.text() ?? '';
|
18
|
+
}
|
19
|
+
async clickRight() {
|
20
|
+
return (await this.buttonRight())?.click();
|
21
|
+
}
|
22
|
+
async clickYear() {
|
23
|
+
return (await this.button())?.click();
|
24
|
+
}
|
25
|
+
async isLeftDisabled() {
|
26
|
+
return (await this.primitiveSpinButton()).isLeftDisabled();
|
27
|
+
}
|
28
|
+
async isRightDisabled() {
|
29
|
+
return (await this.primitiveSpinButton()).isRightDisabled();
|
30
|
+
}
|
31
|
+
}
|
32
|
+
export { TuiCalendarSpinHarness };
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsZW5kYXItc3Bpbi5oYXJuZXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvdGVzdGluZy9jb3JlL2NhbGVuZGFyLXNwaW4uaGFybmVzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsbUJBQW1CLEVBQUMsTUFBTSx5QkFBeUIsQ0FBQztBQUU1RCxPQUFPLEVBQUMsb0JBQW9CLEVBQUMsTUFBTSx1QkFBdUIsQ0FBQztBQUU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
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
2
|
+
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
3
|
+
class TuiYearCellHarness extends ComponentHarness {
|
4
|
+
static { this.hostSelector = '.t-cell'; }
|
5
|
+
static with(options) {
|
6
|
+
return new HarnessPredicate(TuiYearCellHarness, options).addOption('year', options.year, async (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text));
|
7
|
+
}
|
8
|
+
async getText() {
|
9
|
+
return (await this.locatorFor('.t-item')()).text();
|
10
|
+
}
|
11
|
+
async click() {
|
12
|
+
return (await this.host()).click();
|
13
|
+
}
|
14
|
+
}
|
15
|
+
class TuiCalendarYearHarness extends TuiComponentHarness {
|
16
|
+
static { this.hostSelector = 'tui-calendar-year'; }
|
17
|
+
async clickYear(year) {
|
18
|
+
const yearCell = await this.locatorFor(TuiYearCellHarness.with({ year }))();
|
19
|
+
return yearCell.click();
|
20
|
+
}
|
21
|
+
}
|
22
|
+
export { TuiCalendarYearHarness };
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsZW5kYXIteWVhci5oYXJuZXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvdGVzdGluZy9jb3JlL2NhbGVuZGFyLXllYXIuaGFybmVzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUMsZ0JBQWdCLEVBQUUsZ0JBQWdCLEVBQUMsTUFBTSxzQkFBc0IsQ0FBQztBQUN4RSxPQUFPLEVBQUMsbUJBQW1CLEVBQUMsTUFBTSx5QkFBeUIsQ0FBQztBQU01RCxNQUFNLGtCQUFtQixTQUFRLGdCQUFnQjthQUMvQixpQkFBWSxHQUFHLFNBQVMsQ0FBQztJQUVoQyxNQUFNLENBQUMsSUFBSSxDQUNkLE9BQ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GFzeW5jIGNsaWNrKCk6IFByb21pc2U8dm9pZD4ge1xuICAgICAgICByZXR1cm4gKGF3YWl0IHRoaXMuaG9zdCgpKS5jbGljaygpO1xuICAgIH1cbn1cblxuZXhwb3J0IGNsYXNzIFR1aUNhbGVuZGFyWWVhckhhcm5lc3MgZXh0ZW5kcyBUdWlDb21wb25lbnRIYXJuZXNzIHtcbiAgICBwdWJsaWMgc3RhdGljIGhvc3RTZWxlY3RvciA9ICd0dWktY2FsZW5kYXIteWVhcic7XG5cbiAgICBwdWJsaWMgYXN5bmMgY2xpY2tZZWFyKHllYXI6IHN0cmluZyk6IFByb21pc2U8dm9pZD4ge1xuICAgICAgICBjb25zdCB5ZWFyQ2VsbCA9IGF3YWl0IHRoaXMubG9jYXRvckZvcihUdWlZZWFyQ2VsbEhhcm5lc3Mud2l0aCh7eWVhcn0pKSgpO1xuXG4gICAgICAgIHJldHVybiB5ZWFyQ2VsbC5jbGljaygpO1xuICAgIH1cbn1cbiJdfQ==
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import { TuiComponentHarness } from '@taiga-ui/testing/utils';
|
2
|
+
import { TuiCalendarSheetHarness } from './calendar-sheet.harness';
|
3
|
+
import { TuiCalendarSpinHarness } from './calendar-spin.harness';
|
4
|
+
import { TuiCalendarYearHarness } from './calendar-year.harness';
|
5
|
+
class TuiCalendarHarness extends TuiComponentHarness {
|
6
|
+
constructor() {
|
7
|
+
super(...arguments);
|
8
|
+
this.getCalendarYearHarness = this.locatorForOptional(TuiCalendarYearHarness);
|
9
|
+
this.getCalendarSpinHarness = this.locatorForOptional(TuiCalendarSpinHarness);
|
10
|
+
this.getCalendarSheetHarness = this.locatorForOptional(TuiCalendarSheetHarness);
|
11
|
+
}
|
12
|
+
static { this.hostSelector = 'tui-calendar'; }
|
13
|
+
async yearPickerShown() {
|
14
|
+
return !!(await this.getCalendarYearHarness());
|
15
|
+
}
|
16
|
+
async yearMonthPaginationShown() {
|
17
|
+
return !!(await this.getCalendarSpinHarness());
|
18
|
+
}
|
19
|
+
async primitiveCalendarShown() {
|
20
|
+
return !!(await this.getCalendarSheetHarness());
|
21
|
+
}
|
22
|
+
async isPaginationLeftDisabled() {
|
23
|
+
return (await this.getCalendarSpinHarness())?.isLeftDisabled() ?? false;
|
24
|
+
}
|
25
|
+
async isPaginationRightDisabled() {
|
26
|
+
return (await this.getCalendarSpinHarness())?.isRightDisabled() ?? false;
|
27
|
+
}
|
28
|
+
async clickMonthLeft() {
|
29
|
+
return (await this.getCalendarSpinHarness())?.clickLeft();
|
30
|
+
}
|
31
|
+
async getContentText() {
|
32
|
+
return (await this.getCalendarSpinHarness())?.getContentText() ?? '';
|
33
|
+
}
|
34
|
+
async clickMonthRight() {
|
35
|
+
return (await this.getCalendarSpinHarness())?.clickRight();
|
36
|
+
}
|
37
|
+
async clickPaginationYear() {
|
38
|
+
return (await this.getCalendarSpinHarness())?.clickYear();
|
39
|
+
}
|
40
|
+
async clickPickerYear(year) {
|
41
|
+
return (await this.getCalendarYearHarness())?.clickYear(year);
|
42
|
+
}
|
43
|
+
async clickDay(day) {
|
44
|
+
return (await this.getCalendarSheetHarness())?.clickDay(day);
|
45
|
+
}
|
46
|
+
async hoverDay(day) {
|
47
|
+
return (await this.getCalendarSheetHarness())?.hoverDay(day);
|
48
|
+
}
|
49
|
+
}
|
50
|
+
export { TuiCalendarHarness };
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsZW5kYXIuaGFybmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3Rlc3RpbmcvY29yZS9jYWxlbmRhci5oYXJuZXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxtQkFBbUIsRUFBQyxNQUFNLHlCQUF5QixDQUFDO0FBRTVELE9BQU8sRUFBQyx1QkFBdUIsRUFBQyxNQUFNL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